Get Homebrew installed on your mac if you don't already have it
Install highlight. "brew install highlight". (This brings down Lua and Boost as well)
| var http = require('http'), | |
| sys = require('sys'), | |
| URL = require('url'), | |
| querystring = require('querystring'), | |
| OAuth = require('oauth').OAuth; | |
| var oa = new OAuth('https://api.twitter.com/oauth/request_token', | |
| 'https://api.twitter.com/oauth/access_token', | |
| 'YOUR APP CONSUMER KEY HERE', | |
| 'YOUR APP CONSUMER SECRET HERE', |
| # Want to show hidden files and folders in your TextMate project drawer? Simple, just modify the file and folder patterns in TextMate's preferences. | |
| # Instructions: | |
| # Go to TextMate > Preferences... | |
| # Click Advanced | |
| # Select Folder References | |
| # Replace the following: | |
| # File Pattern |
| function hideAddressBar() | |
| { | |
| if(!window.location.hash) | |
| { | |
| if(document.height < window.outerHeight) | |
| { | |
| document.body.style.height = (window.outerHeight + 50) + 'px'; | |
| } | |
| setTimeout( function(){ window.scrollTo(0, 1); }, 50 ); |
Get Homebrew installed on your mac if you don't already have it
Install highlight. "brew install highlight". (This brings down Lua and Boost as well)
| #!/usr/bin/env sh | |
| ## | |
| # This is script with usefull tips taken from: | |
| # https://github.com/mathiasbynens/dotfiles/blob/master/.osx | |
| # | |
| # install it: | |
| # curl -sL https://raw.github.com/gist/2108403/hack.sh | sh | |
| # |
| # Allow text selection in Quick Look | |
| defaults write com.apple.finder QLEnableTextSelection -bool true |
| var parser = document.createElement('a'); | |
| parser.href = "http://example.com:3000/pathname/?search=test#hash"; | |
| parser.protocol; // => "http:" | |
| parser.hostname; // => "example.com" | |
| parser.port; // => "3000" | |
| parser.pathname; // => "/pathname/" | |
| parser.search; // => "?search=test" | |
| parser.hash; // => "#hash" | |
| parser.host; // => "example.com:3000" |
| var fs = require("fs"); | |
| var jParser = require("jParser"); | |
| var eof = false; | |
| fs.readFile("sample.jpg",function(err,data) { | |
| if (!err) { | |
| var view = new jDataView(data, undefined, undefined, false); | |
| var parser = new jParser(view,{ | |
| // JPG |
| sudo defaults write /Library/Preferences/com.apple.windowserver DisplayResolutionEnabled -bool YES; | |
| sudo defaults delete /Library/Preferences/com.apple.windowserver DisplayResolutionDisabled; | |
| // by the way, you need to logout and log back in for this to take effect. Or at least that's what | |
| // Quartz Debug says. Who knows, maybe it's lying? | |
| // P.S. Go to [Apple menu --> System Preferences --> Displays --> Display --> Scaled] after logging | |
| // back in, and you'll see a bunch of "HiDPI" resolutions in the list to choose from. |
| width = 102 # width of rectangle | |
| height = 40 # height of rectangle | |
| pos_x = 3 # x coordinate for entire grid | |
| pos_y = 3 # y coordinate for entire grid | |
| y_margin = 3 # vertical space between rectangles | |
| x_margin = 3 # horizontal space between rectangles | |
| columns = 3 # number of columns | |
| rows = 5 # number of rows | |
| columns.times do |col| # number of columns |