Fairly easy. The important line here is: proxy_buffering off; I think this one works at least for most Rack based applications. The application itself runs on thin ( besides that, I only know Unicorn and Rainbow(s?) that have Streaming Support. Webrick won’t do that (yet)) My vhost config. upstream stream { server 127.0.0.1:4800; server 127.0.0.1:4801; [...]
Kategorien-Archiv: Ohne Kategorie
Map Scale: Distance in Meters to Pixels depending on Zoom level
Took me a while to wrap my head around this: I tried to draw a circle around a specific coordinate (latitude & longitude) on a (google maps like) map. My first attempt was: EARTH_CIRCUMFERENCE / 2 ^ ZOOM_LEVEL / TILE_SIZE which resulted in a circle whose radius was off by about 20% in my tests. [...]
memcached gem 1.3.5 on Lion 10.7.2
Maybe Xcode 4.2 and its compiler change (LLVM) is the reason I couldn’t install the darn thing. This helped: $ export CC=gcc-4.2 $ gem install memcached
Ubuntu – RVM – Error?
RVM Installation seems pretty simple, worked flawlessly almost every time I used it on OSX. On my new production machine I couldn’t install it. mkdir: cannot create directory `/usr/local/rvm’: Permission denied Every Tutorial or Snippet I tried looked liked this: bash < ~/.rvmrc $ echo 'export rvm_path="$HOME/.rvm"' >> ~/.rvmrc Then rerun the above bash/curl line.
Rake Tasks for non-Rails application
put in your Rakefile: Load seeds: namespace :db do task :seed => :environment do seed_file = File.join(File.dirname(__FILE__), ‘db’, ‘seeds.rb’) load(seed_file) if File.exist?(seed_file) end end run Migrations & Rollback namespace :db do desc "Migrate the database through scripts in db/migrate." task :migrate => :environment do ActiveRecord::Migration.verbose = ENV["VERBOSE"] ? ENV["VERBOSE"] == "true" : true ActiveRecord::Migrator.migrate("db/migrate/", ENV["VERSION"] [...]
Global ActiveRecord Observers
Have you ever tried to get ActiveRecord Observers working in a Sinatra environment? I spent hours crawling trough the Rails sources but eventually gave up. Plus: My goal anyway was to have some kind of global observer through all models in my application. So, easy decision – I build my one solution – as always: [...]
Typo3 – AMenu is missing a bunch of entries
Was solved by plugin.tt_news.amenuStart = 1.1.2000
VMware Server 2 – DNS stops working?
a few days ago, almost all services (that somehow require a working DNS lookup) spread across three virtual machines (1x Ubuntu; 2x WinXP) stopped working. After two fracking years! Well, it took me about two days to figure out some kind of workaround (no real “solution” yet). Before you continue … you should check if [...]