HTTP 503 from IE6 on dreamhost

It seems that dreamhost somehow returns HTTP 503 if the user agent is exactly “Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1)”. This is from the modern.ie IE6 windows XP build. wget –user-agent “Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1)” “http://hellomynameis.org.uk/” –2014-04-09 11:31:18– http://hellomynameis.org.uk/ HTTP request sent, awaiting response… 503 Service Temporarily Unavailable 2014-04-09… Continue reading HTTP 503 from IE6 on dreamhost

Thunderbird: “The server may have gone down or there may be a network problem” [SOLVED]

Bizare issue on OS X 10.6 effecting both Mail and Thunderbird. Mail simply fails to download inbox, silently without error – helpful. Thunderbird reports “server email@example.org has disconnected. The server may have gone down or there may be a network problem” Cause avast email virus scanner. Solution. Disable email virus scanner.

Published
Categorized as geek

See which packages you’ve installed Ubuntu 13.10

grep “Commandline: apt-get install” /var/log/apt/history.log Commandline: apt-get install emacs Commandline: apt-get install aptitude Commandline: apt-get install openjdk-7-jdk Commandline: apt-get install libxss1 Commandline: apt-get install gradle Commandline: apt-get install ruby Commandline: apt-get install nodejs Commandline: apt-get install gimp imagemagick Commandline: apt-get install git Commandline: apt-get install ruby-bundler Commandline: apt-get install libproj-dev Commandline: apt-get install libmagickwand-dev Commandline:… Continue reading See which packages you’ve installed Ubuntu 13.10

HTTP compression of static content with .htaccess

I was originally using mod_deflate however I had the following issues Content-length was not populated which meant I couldn’t implement an AJAX progress bar Weird error net::ERR_INVALID_CHUNKED_ENCODING on OS X with Chrome on transfers bigger than 1MB – I couldn’t find any other platforms effected by this. Unnecessary server load Things to note. The header… Continue reading HTTP compression of static content with .htaccess

Jasmine 2.0 + RequireJS + Blanket + Backbone

Jasmine 2.0 provides a JavaScript unit test framework, RequireJS provides a dependency modelling/loading and Blanket provides native in-browser JavaScript code coverage – no need for a coverage server etc. So why not use all three together, well, it’s kind of tricky and kept me busy all evening. I’m going to provide a small but scalable… Continue reading Jasmine 2.0 + RequireJS + Blanket + Backbone

Ruby – latitude/longitude from start point, bearing and distance

class CoordinatesCalc def CoordinatesCalc.offset_coordinate(lat_deg, lon_deg, distance_m, bearing_deg) r = 6371000.0; lat = lat_deg * Math::PI / 180 lon = lon_deg * Math::PI / 180 bearing = bearing_deg * Math::PI / 180 distance_by_r = distance_m / r lat2 = Math.asin( Math.sin(lat) * Math.cos(distance_by_r) + Math.cos(lat) * Math.sin(distance_by_r) * Math.cos(bearing) ) lon2 = lon + Math.atan2(Math.sin(bearing) *… Continue reading Ruby – latitude/longitude from start point, bearing and distance

Published
Categorized as geek Tagged

Rails 4.0.0 with Ruby 2.0 on a Dreamhost shared server

Build ruby from source. RVM won’t work out of the box because it tries to use sudo. It’s quite easy. cd mkdir build cd build http://cache.ruby-lang.org/pub/ruby/2.0/ruby-2.0.0-p247.tar.gz tar xzf ruby-2.0.0-p247.tar.gz cd ruby-2.0.0-p247 ./configure –prefix /home/adamish/ruby # <=== make sure you install to your own home directory make install Make your custom ruby default. Add the following… Continue reading Rails 4.0.0 with Ruby 2.0 on a Dreamhost shared server