Skip to content

Instantly share code, notes, and snippets.

@moeffju
moeffju / gist:1115879
Created July 30, 2011 19:18
brew upgrade / brew install -v poppler fails
==> Downloading http://poppler.freedesktop.org/poppler-0.16.7.tar.gz
File already downloaded in /Users/moeffju/Library/Caches/Homebrew
/usr/bin/tar xf /Users/moeffju/Library/Caches/Homebrew/poppler-0.16.7.tar.gz
==> ./configure --disable-dependency-tracking --prefix=/usr/local/Cellar/poppler/0.16.7
./configure --disable-dependency-tracking --prefix=/usr/local/Cellar/poppler/0.16.7
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... ./install-sh -c -d
checking for gawk... no
checking for mawk... no
@moeffju
moeffju / gist:894670
Created March 30, 2011 15:59
If you want to use clickheat, but don't want to bother with mixing PHP and Ruby, or getting mixed-content warnings on SSL, etc.
get '/c' => proc { |env|
request = Rack::Request.new(env)
params = request.params
unless params['x'] && params['y'] && params['w'] && params['g'] && params['s'] && params['b'] && params['c']
[200, {}, 'KO']
else
final = [params['s'].gsub(/[^a-z_0-9\-]+/, '_'), params['g'].gsub(/[^a-z_0-9\-]+/, '_')].join(',')
log_path = Rails.root.join('log', 'clickheat', final)
FileUtils.mkdir_p(log_path)
File.open([log_path, "#{Time.now.strftime('%Y-%m-%d')}.log"].join('/'), 'a') do |f|
@moeffju
moeffju / keybase.md
Created March 21, 2014 00:51
keybase prove github

Keybase proof

I hereby claim:

  • I am moeffju on github.
  • I am moeffju (https://keybase.io/moeffju) on keybase.
  • I have a public key whose fingerprint is 0960 7358 4D2A 0443 E950 BA66 AE3A 82E8 79AC F996

To claim this, I am signing this object: