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
if [ -d ~/.profile.d ]; then | |
for f in ~/.profile.d/*.sh; do source "$f"; done | |
unset f | |
fi | |
# -- RVM -- | |
[[ -s "$HOME/.rvm/scripts/rvm" ]] && source "$HOME/.rvm/scripts/rvm" |
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
# encoding: utf-8 | |
require 'firewatir' | |
require 'iconv' | |
$KCODE = 'u' | |
# useful extension to FireWatir | |
class Element | |
# http://docs.jquery.com/Release:jQuery_1.3.2#:visible.2F:hidden_Overhauled |
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
"G FMNC RM UGL UGRF LMRFGLE AMLACYJCB MP FCJB ZYAI DSJJ DPMLRYJ".split('').map(function(c) c == " " ? c : String.fromCharCode((c.charCodeAt() - 63) % 26 + 65)).join(''); |
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
Gem::Specification.new do |spec| | |
spec.name = 'contrast-color' | |
spec.version = '0.1.1' | |
spec.platform = Gem::Platform::RUBY | |
spec.author = 'Tobias H. Michaelsen' | |
spec.email = '[email protected]' | |
spec.summary = 'Generate contrast colors in SASS' | |
spec.description = 'A simple extension to SASS that alows you to calculate colors that conforms to WAI and WCAG20 contrast requirements.' | |
spec.homepage = 'https://gist.github.com/243103' | |
spec.license = 'MIT' |
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
// 'super' with prototype inheritance | |
function A() {} | |
A.prototype.say = function(m) { console.log('A: ' + m); }; | |
function B() {} | |
B.prototype = new A(); | |
B.prototype.say = function(m) { | |
this.constructor.prototype.say(m); | |
console.log('\nB: ' + m); |
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
try { | |
print(fn1); | |
print(fn2); | |
function fn1 () {} // FunctionDeclarations | |
(function fn2 () {}) // FunctionExpression | |
} catch (e) { |
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
// Source: http://www.pluralsight-training.net/community/blogs/keith/archive/2010/11/12/min-max-between-limit.aspx | |
public static class IComparableExtensions | |
{ | |
public static T Limit<T>(this T value, T minValue, T maxValue) where T : IComparable | |
{ | |
if (value.CompareTo(minValue) < 0) | |
return minValue; | |
if (value.CompareTo(maxValue) > 0) | |
return maxValue; | |
return value; |
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
function foo() { return 'foo'; } | |
function bar() { return foo; } | |
foo() | |
//=> "foo" | |
bar() | |
//=> function foo() { return 'foo'; } | |
new foo() | |
//=> [Object foo] | |
new bar() | |
//=> function foo() { return 'foo'; } |
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
24c24 | |
< ResourceFile := "AutoHotkeySC.bin" ; you many comment out one of | |
--- | |
> ;ResourceFile := "AutoHotkeySC.bin" ; you many comment out one of | |
71a72 | |
> { | |
72a74,75 | |
> GoSub,RT_ICON ; 2011-02-03/THM: Add another copy of the same icon to work around a bug in Stack Docklet 2.0 | |
> } |
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
<?xml version="1.0" encoding="UTF-8"?> | |
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> | |
<plist version="1.0"> | |
<dict> | |
<key>beforeRunningCommand</key> | |
<string>nop</string> | |
<key>command</key> | |
<string>`which node` "$TM_FILEPATH"</string> | |
<key>input</key> | |
<string>none</string> |
OlderNewer