Skip to content

Instantly share code, notes, and snippets.

View atog's full-sized avatar

Koen Van der Auwera atog

View GitHub Profile
@atog
atog / missing.md
Last active August 29, 2015 14:15
iPad experiment
  • garmin upload
  • icloud mail forwarding settings
  • print to pdf
  • java swing
  • vmware fusion / windows
  • pass mjolnir config
  • excel to csv
  • batch banktoestanden
var delay = (function() {
var timer = 0;
return function(ms, callback) {
clearTimeout(timer);
return timer = setTimeout(callback, ms);
};
})();
USAGE:

Keybase proof

I hereby claim:

  • I am atog on github.
  • I am atog (https://keybase.io/atog) on keybase.
  • I have a public key whose fingerprint is 947D 3BC6 3C3F A68E 0437 2140 E63E 0B9D 1B81 8B66

To claim this, I am signing this object:

@atog
atog / example.txt
Created November 30, 2012 14:13
Example prettify_json
curl http://api.twitter.com/1/statuses/user_timeline.json\?screen_name\=atog | prettify_json.rb
-- via https://speakerdeck.com/jeg2/10-things-you-didnt-know-ruby-could-do
@atog
atog / local_ip.rb
Created November 9, 2012 11:14
Get your local IP address
require 'socket'
def local_ip
orig, Socket.do_not_reverse_lookup = Socket.do_not_reverse_lookup, true # turn off reverse DNS resolution temporarily
UDPSocket.open do |s|
s.connect '64.233.187.99', 1
s.addr.last
end
ensure
Socket.do_not_reverse_lookup = orig
/*
As of version 1.1.2, Propane will load and execute the contents of
~Library/Application Support/Propane/unsupported/caveatPatchor.js
immediately following the execution of its own enhancer.js file.
You can use this mechanism to add your own customizations to Campfire
in Propane.
Below you'll find two customization examples.
@atog
atog / prinses.rb
Created December 30, 2010 13:31
Prinses en de kikker kleurplaten
`wget http://www.kids-n-fun.nl/kleurplaten/prinses%20en%20de%20kikker/prinsess_en_kikker_#{sprintf("%02d", i)}.jpg`
@atog
atog / tumblr_cleaner.rb
Created December 29, 2010 13:58
Delete tumblr posts
require "rubygems"
require "hpricot"
doc = Hpricot.XML(`tumblr read num=10`)
(doc/"post").each do |p|
puts `tumblr delete post-id=#{p.attributes['id']}`
end
@atog
atog / rinari
Created May 25, 2010 09:36 — forked from pjaspers/rinari
Restart passenger from emacs
;; As seen on
;; http://lucky-dip.net/articles/2009/08/06/restart-passenger-from-emacs-using-rinari/
;; Anyway, here is a small snippet of emacs lisp to easily restart the
;; Passenger server for the project you are currently working on. It
;; assumes you have Rinari installed.
(defun restart-passenger ()
"Restart passenger using the current rinari root" (interactive)
(shell-command (concat "touch " (rinari-root) "tmp/restart.txt"))
(message "Passenger restarted"))
require "rubygems"
require "hpricot"
doc = Hpricot.XML(`tumblr read num=10`)
(doc/"post").each do |p|
puts `tumblr delete post-id=#{p.attributes['id']}`
end