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
set -g mode-mouse on | |
set -g mouse-select-pane on | |
set -g mouse-resize-pane on | |
# important! | |
bind-key d confirm-before -p "detach-client? (NO) (y/n)" detach-client | |
set -g status-bg black | |
set -g status-left-fg green |
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
from /home/alunny/.rvm/gems/RUBY_VERSION/gems/capistrano/lib/capistrano/configuration/loading.rb:93:in `instance_eval' | |
from /home/alunny/.rvm/gems/RUBY_VERSION/gems/capistrano/lib/capistrano/configuration/loading.rb:93:in `load' | |
from /home/alunny/.rvm/gems/RUBY_VERSION/gems/capistrano/lib/capistrano/configuration/loading.rb:172:in `load_from_file' | |
from /home/alunny/.rvm/gems/RUBY_VERSION/gems/capistrano/lib/capistrano/configuration/loading.rb:89:in `load' | |
from /home/alunny/.rvm/gems/RUBY_VERSION/gems/capistrano/lib/capistrano/configuration/loading.rb:86:in `block in load' | |
from /home/alunny/.rvm/gems/RUBY_VERSION/gems/capistrano/lib/capistrano/configuration/loading.rb:86:in `each' | |
from /home/alunny/.rvm/gems/RUBY_VERSION/gems/capistrano/lib/capistrano/configuration/loading.rb:86:in `load' | |
from ./config/deploy.rb:17:in `load' | |
from /home/alunny/.rvm/gems/RUBY_VERSION/gems/capistrano/lib/capistrano/configuration/loading.rb:93:in `instance_eval' | |
from /home/alunny/.rvm/gems/RUBY_VERSION/gems/capistrano/lib |
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
Sub LockAllVisibleToolbars() | |
Dim cb As CommandBar | |
For Each cb In CommandBars | |
If cb.Visible = True Then | |
cb.Protection = msoBarNoChangeDock + _ | |
msoBarNoChangeVisible + _ | |
msoBarNoCustomize + _ | |
msoBarNoMove + _ | |
msoBarNoResize |
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 Foo = function Foo() { | |
var someValue = 1; | |
this.noSuchMethodHandler(id, args) { | |
if (id == "increment") { | |
return someValue++; | |
} | |
} | |
}; | |
Foo.prototype.exec = function(id,args) { |
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
// courtesy https://twitter.com/tomdevdiary/status/8946331934 | |
("foo" + + "bar") === "fooNaN" // true |
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
// using node 1.90 | |
var sys = require('sys'), http = require('http'); | |
var crockfordator = http.createClient(80, 'crockfordfacts.com'); | |
var req = crockfordator.request('GET', '/', | |
{ | |
'accept':'application/json', | |
'host':'crockfordfacts.com' | |
} | |
); |
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
/***** | |
To authorize on Twitter API through xAuth, you need HMAC-SHA1 | |
I'm using the following lib for that: | |
http://jssha.sourceforge.net | |
Make sure you have sha.js included! | |
<script src="http://jssha.sourceforge.net/sha.js"></script> | |
Also, you need to email api@twitter.com to get xAuth access | |
I cannot do that for you - see http://dev.twitter.com/pages/xauth | |
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/ruby | |
# usage: ruby convert.rb icon.jpg png | |
require 'rubygems' | |
require 'image_science' | |
if ARGV.length == 2 | |
source_file = ARGV.first | |
target_extension = ARGV.last | |
target_file = source_file.sub /[\w\d]+$/, target_extension | |
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
// insert this into your AppDelegate.m file | |
// this will fire an "appActive" event on the webview every time the app is launched | |
// whether through fast-app switching or a cold launch | |
- (void)applicationDidBecomeActive:(UIApplication *)application { | |
// delay of 1ms ensures code will be executed in new stack trace | |
// that way, event listener can't block applicationDidBecomeActive | |
// and crash the app | |
NSString *fireActiveEvent = @"window.setTimeout(function() { \n" | |
"var appActive = document.createEvent('Events'); \n" |
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
// private method | |
// Wraps the HTML in a TAG, Tag is optional | |
// If the html starts with a Tag, it will wrap the context in that tag. | |
// doesn't ACTUALLY work | |
function wrap(xhtml, tag) { | |
// new approach | |
// createDocumentFragment | |
var docFrag = document.createDocumentFragment(), | |
dummy, | |
wrapTag; |
OlderNewer