This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Copy the gem location to clipboard | |
bundle show yajl-ruby | pbcopy | |
# Example: /Users/gedrovits/.rbenv/versions/1.9.3-p484/lib/ruby/gems/1.9.1/gems/yajl-ruby-0.8.2 | |
cd <cmd + v> | |
cd ext/yajl | |
# Now we need to replace 'inline void' to 'static void'. This will also create backup of old files. | |
sed -i '.bak' 's/inline void/static void/g' yajl_ext.h yajl_ext.c | |
# Now we must rebuild changed extension | |
make clean all | |
# After this you should not have any problems with yajl-ruby |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var _ = require('underscore'), | |
util = require('util'); | |
// intercept stdout, passes thru callback | |
// also pass console.error thru stdout so it goes to callback too | |
// (stdout.write and stderr.write are both refs to the same stream.write function) | |
// returns an unhook() function, call when done intercepting | |
module.exports = function interceptStdout(callback) { | |
var old_stdout_write = process.stdout.write, | |
old_console_error = console.error; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ps axc -o pid | grep -v PID | ruby -e 'puts STDIN.read.split("\n").shuffle.join("\n")' | head -1 | xargs kill |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env ruby -wKU | |
class Object | |
def destruct! | |
print "This message will self-destruct in..." | |
5.downto(0) {|i| print "#{i}..."; $stdout.flush; sleep(1)} | |
File.open(__FILE__, 'w') { } | |
end | |
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Found this tip in comment here: http://www.tipb.com/2011/01/04/tipb-bug-home-button-working-iphone/ | |
1.) Open any application | |
2.) Press and hold the power button until the slide to shutdown swipe bar appears. | |
3.) Release Power button | |
4.) Press and hold Home button Lightly | |
until screen returns to icon screen |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#============================================================== | |
# .picasa.ini FILE STRUCTURE | |
# | |
# reverse-engineered by Franz Buchinger <fbuchinger@gmail.com> | |
# licensed to the public domain | |
# | |
# Picasa Version(s): 3.8.0 | |
# | |
# Changelog: | |
# v0.1: initial release |
NewerOlder