Skip to content

Instantly share code, notes, and snippets.

View nulltask's full-sized avatar

Seiya KONNO nulltask

View GitHub Profile
request({ uri: 'http://example.org/foo.png', encoding: 'binary' }, function(err, res, body) {
// body is not broken!
});
@nulltask
nulltask / trapezoid.js
Created February 15, 2012 12:53
trapezoid image transform with node-canvas
/**
* Trapezoid
* - Image transforming class.
*
* Heavily inspired from:
* http://www.leven.ch/canvas/perspective.html
*/
/**
* Module dependencies.
@nulltask
nulltask / main.js
Created February 15, 2012 13:08
Prototype inheritance example
/**
* Super class constructor.
*/
function Animal() {
this.type = 'animal';
}
/**
* Set `Animal` prototype methods.
@nulltask
nulltask / fiddle.css
Created February 17, 2012 11:34
JavaScript pseudo private function
body {
font-family: "Helvetica Neue", "Arial";
}
function User() {
// constructor.
}
User.prototype.publicFn = function() {
// call private function.
this._privateFn();
};
User.prototype._privateFn = function() {
ma:~ nulltask$ sudo /Developer/Library/uninstall-devtools --mode=all
Start time: 土 2 18 05:35:12 JST 2012
Started uninstalling shared non-relocatable developer tools content.
Shutting down Instruments...
Analyzing devtools package: 'com.apple.pkg.BluetoothSDKLeo'...
Analyzing devtools package: 'com.apple.pkg.CoreAudioSDKLeo'...
Analyzing devtools package: 'com.apple.pkg.DevSDKLeo'...
Analyzing devtools package: 'com.apple.pkg.DeveloperToolsCLILeo'...
Analyzing devtools package: 'com.apple.pkg.DeveloperToolsSystemSupportLeo'...
Analyzing devtools package: 'com.apple.pkg.DistributedBuildsSupportLeo'...
@nulltask
nulltask / install-ruby-1.9.3-p125-with-clang.log
Created February 18, 2012 06:43
rvm install 1.9.3-p125
ma:~ nulltask$ rvm install 1.9.3-p125 --with-gcc=clang
Fetching yaml-0.1.4.tar.gz to /Users/nulltask/.rvm/archives
Extracting yaml-0.1.4.tar.gz to /Users/nulltask/.rvm/src
Configuring yaml in /Users/nulltask/.rvm/src/yaml-0.1.4.
Compiling yaml in /Users/nulltask/.rvm/src/yaml-0.1.4.
Installing yaml to /Users/nulltask/.rvm/usr
Installing Ruby from source to: /Users/nulltask/.rvm/rubies/ruby-1.9.3-p125, this may take a while depending on your cpu(s)...
ruby-1.9.3-p125 - #fetching
ruby-1.9.3-p125 - #extracted to /Users/nulltask/.rvm/src/ruby-1.9.3-p125 (already extracted)
@nulltask
nulltask / brew-list.log
Created February 18, 2012 07:05
brew list
ma:~ nulltask$ brew list
android-sdk gettext libfreenect little-cms pixman x264
boost giflib libgcrypt macvim pkg-config xvid
cairo glib libgpg-error mongodb qt xz
cmake gnutls libogg mysql readline yasm
coreutils imagemagick libtasn1 opencore-amr redis zeromq
dmd jasper libtiff opencv rtmpdump
faac jpeg libusb-freenect pcre tbb
ffmpeg lame libvorbis phantomjs theora
gauche libffi libvpx pidof wget
@nulltask
nulltask / brew-env-use-gcc.log
Created February 18, 2012 07:51
brew --env with Xcode 4.3
$ brew --env --use-gcc
Error: GCC could not be found
ma:~ nulltask$ sudo gem list
Invalid gemspec in [/Library/Ruby/Gems/1.8/specifications/capistrano-2.9.0.gemspec]: invalid date format in specification: "2011-09-24 00:00:00.000000000Z"
Invalid gemspec in [/Library/Ruby/Gems/1.8/specifications/heroku-2.20.1.gemspec]: invalid date format in specification: "2012-02-16 00:00:00.000000000Z"
Invalid gemspec in [/Library/Ruby/Gems/1.8/specifications/rubyzip-0.9.6.1.gemspec]: invalid date format in specification: "2012-02-08 00:00:00.000000000Z"
Invalid gemspec in [/Library/Ruby/Gems/1.8/specifications/spruz-0.2.13.gemspec]: invalid date format in specification: "2011-08-17 00:00:00.000000000Z"
Invalid gemspec in [/Library/Ruby/Gems/1.8/specifications/term-ansicolor-1.0.7.gemspec]: invalid date format in specification: "2011-10-13 00:00:00.000000000Z"
Invalid gemspec in [/Library/Ruby/Gems/1.8/specifications/terminal-table-1.4.4.gemspec]: invalid date format in specification: "2011-11-07 00:00:00.000000000Z"
*** LOCAL GEMS ***