View key error
Jul 27 19:03:33 thumbor thumbor: 2016-07-27 19:03:33 tornado.application:ERROR Exception in callback None
Jul 27 19:03:33 thumbor thumbor: Traceback (most recent call last):
Jul 27 19:03:33 thumbor thumbor: File "/usr/local/lib/python2.7/site-packages/tornado/ioloop.py", line 886, in start
Jul 27 19:03:33 thumbor thumbor: fd_obj, handler_func = self._handlers[fd]
Jul 27 19:03:33 thumbor thumbor: KeyError: 24
Jul 27 19:03:33 thumbor thumbor: 2016-07-27 19:03:33 tornado.application:ERROR Exception in callback None
Jul 27 19:03:33 thumbor thumbor: Traceback (most recent call last):
Jul 27 19:03:33 thumbor thumbor: File "/usr/local/lib/python2.7/site-packages/tornado/ioloop.py", line 886, in start
Jul 27 19:03:33 thumbor thumbor: fd_obj, handler_func = self._handlers[fd]
Jul 27 19:03:33 thumbor thumbor: KeyError: 24
View artifacts.py
#!/usr/bin/python
# -*- coding: utf-8 -*-
# This script reproduces the issue with artifacts when
# handling (semi)transparent PNG files:
# https://github.com/python-pillow/Pillow/issues/1449
# Version used:
#
View default_start_line.php
<? goto 💩; die "PHP, die you piece of 💩!"; 💩:
View heroku.rake
namespace :heroku do
desc "generate GC settings"
task gc: [:environment] do
# https://discussion.heroku.com/t/tuning-rgengc-2-1-on-heroku/359/6
# http://tmm1.net/ruby21-rgengc/
# http://thorstenball.com/blog/2014/03/12/watching-understanding-ruby-2.1-garbage-collector/
# http://collectiveidea.com/blog/archives/2015/02/19/optimizing-rails-for-memory-usage-part-1-before-you-optimize/
settings = {
RUBY_GC_HEAP_FREE_SLOTS: 600000, # default is 4096,
RUBY_GC_HEAP_GROWTH_FACTOR: 1.25, # default is 1.8,
View vagrant_nfs_inversion.rb
config.export_nfs.each do |export|
config.trigger.before :halt, stdout: true do
mount_point = export[1]
system("sudo umount -f #{mount_point}")
end
config.trigger.after [:up, :reload], stdout: true do
remote_point = "#{PRIVATE_IP}:#{export[0]}"
mount_point = export[1]
puts "mounting #{remote_point} to #{mount_point}"
View docker_alias.sh
function docker {
cmd=/usr/local/bin/docker
case $1 in
"status") shift && $cmd ps $@;;
*) $cmd $@;;
esac
}
View Gemfile
# A sample Gemfile
source "https://rubygems.org"
gem 'activerecord', github: 'rails/rails', branch: 'master'
gem 'arel', github: 'rails/arel', branch: 'master'
gem 'pg'
View reroute_dns.md

I use unblock-us to access services that have this really stupid idea of IP-based positioning (hey guys, my IP does not mean anything!). This service (like many others) proxies your DNS traffic through their own servers so you can pretend to be anywhere on the planet. You only have to add their DNS-servers to your computers network settings or to your WIFI-router so all your devices can use it without changing their configuration.

Unfortunately, the chromecast has it's own google DNS configured and those google assholes don't let you change it or disable the feature. In the linked support thread, you can see how you can spoof the DNS traffic using iptables in your router, so the chromecast will actually talk to unblock-us instead.

My WIFI router is an oldish Apple Timecapsule and those things are quite 💩 when it comes to co

View typus.de.yml
de:
typus:
shared:
no_entries_found: "Keine Einträge gefunden."
help: "Hilfe"
settings: "Einstellungen"
confirm_question: "Bist du sicher?"
restore_question: 'Wiederherstellen?'
buttons:
View restart_all_apps.rb
#! /usr/bin/env ruby
require_relative 'util'
include Util
auth_key = key_hash(ARGV.last)
puts "restarting all processes"
apps = curl('https://api.heroku.com/apps', auth_key)
apps.each do |app|