Skip to content

Instantly share code, notes, and snippets.

@thilo
thilo / patiently.rb
Created June 11, 2010 12:22 — forked from langalex/patiently.rb
holzhammer methode für Ajax Calls
def patiently(&block)
cycles = 0
begin
yield
rescue => e
cycles += 1
sleep 0.1
if cycles < 10
retry
else
We have discovered the cause of [bug], and it is both simple and surprising.
Upon investigation, we were stunned to find that the [function] is totally wrong.
# to run rails 3.0 with 1.9.2 you can use the 1.9.2 beta stack like this
heroku create --stack bamboo-mri-1.9.2 --remote trybamboo
@thilo
thilo / gist:793294
Created January 24, 2011 14:35
implementation of dev interface
## steps
Before do
Client::Config.backend_uri.values.each do |uri|
begin
HTTParty.post("#{uri}dev/purge_db", :body => {})
rescue Errno::ECONNREFUSED
p "could not reach #{uri}"
end
end
The Keynote Speakers
We are super excited to announce our two EuRuKo keynote speakers
* Yukihiro Matsumoto (Matz)
* Paul Campbell
Having the creator of the Ruby language as a speaker is a great honor for us. His regular appearance at the EuRuKo speaks of his dedication to the community while his humble and inspiring talks always left a lasting impression. Matz’s presentation at last year’s EuRuKo was one of the highlights and his “We are Blave” slide became legendary.
Paul is an amazingly talented speaker and his slide style make his talks even more exceptional. He has impressed us where ever we saw him speaking throughout the last year and we are anxious to see what he has prepared for us this time.
@thilo
thilo / Job: Community Management und Assistenz im Coworking Space
Created May 13, 2011 11:16
Job: Community Management und Assistenz im Coworking Space
Job: Community Management und Assistenz im Coworking Space
Hallo wir sind upstream. Eigentlich entwickeln wir Software im Internet, doch das hat uns nicht gereicht. Darum betreiben wir nebenbei einen Coworking Space in Kreuzberg - genannt co.up. In unserem Space arbeiten viele interessante Menschen, vor allem Webentwickler, Designer und Usability-Experten. Durch die Begegnung und Zusammenarbeit mit diesen Menschen sind viele spannende Projekte entstanden. Die Arbeit, die wir mit der Organisation des Space, der Menschen und Events haben, ist mit der Zeit immer weiter angewachsen. Dafür suchen wir dich.
Für etwas 10 Stunden pro Woche brauchen wir deine Hilfe bei folgenden Aufgaben:
* Coworkern bei Problemen helfen, neue Coworker einweisen
* Unsere Coworker und alle, die sich für unsere Projekte interessieren, mit Informationen versorgen
* Events organisieren (z.B. Coworker Meetings, Workshops, User Groups)
* Dich an der Verbesserung/Verschönerung des Space beteiligen
@thilo
thilo / widget.html
Created September 25, 2011 18:13
A Singleton UI Widget. I wonder if this is a sane approach?
// a ui dialog that can only appear one at a time uses jquery dialog
Widgets.UI = function() {
//gather the dom elements that made up the UI
var dialog = $('#dialog'),
linkTargetField = dialog.find("#link-target"),
saveBotton = dialog.find('#save'),
//changing state
node = undefined;
//event handler
@thilo
thilo / gist:1670428
Created January 24, 2012 14:27
ngix ssl proxy config
#user nobody;
worker_processes 1;
#error_log logs/error.log;
#error_log logs/error.log notice;
#error_log logs/error.log info;
#pid logs/nginx.pid;
@thilo
thilo / gist:3742120
Created September 18, 2012 08:54
Simple video conversion and streaming with node.js
var http = require('http')
ffmpeg = require('fluent-ffmpeg');
http.createServer(function (req, res) {
res.writeHead(200, {'Content-Type': 'video/x-flv'});
var pathToMovie = '/public/video.mp4';
var proc = new ffmpeg({ source: pathToMovie, logger: true, nolog: false })
.toFormat('flv')
.updateFlvMetadata()
.withSize('320x?')
@thilo
thilo / unicorn.rb
Created October 9, 2013 19:30
A default unicorn config for a Rack app (not Rails) on Heroku
worker_processes 3
timeout 10
preload_app true
before_fork do |server, worker|
Signal.trap 'TERM' do
puts 'Unicorn master intercepting TERM and sending myself QUIT instead'
Process.kill 'QUIT', Process.pid
end