View angular.visibility.js
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
angular.module('dom.util', []) | |
.service('inDom', function($document) { | |
return function inDom(element) { | |
var el = angular.element(element); | |
return $document[0].body.contains(el[0]); | |
}; | |
}) | |
.service('isVisible', function(inDom) { |
View SassMeister-input.scss
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
// ---- | |
// Sass (v3.3.9) | |
// Compass (v1.0.0.alpha.20) | |
// ---- | |
/* Because of the http prefix on URL, Sass will interpret this as a regular | |
* CSS import directive. See output... */ | |
@import "http://wiseheartdesign.com/stylesheets/blankslate.css"; |
View smiley.bas
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
DECLARE SUB EraseBackToGB (X AS INTEGER, Y AS INTEGER) | |
DECLARE SUB AddRoundAbout (X AS INTEGER, Y AS INTEGER, Dir AS STRING) | |
DECLARE SUB DoRoundAbouts () | |
'The SMiLEY Game | |
'$DYNAMIC | |
DECLARE SUB AnimateLevWarp () | |
DECLARE SUB AnimateSmiley () | |
DECLARE SUB AddBouncer (X AS INTEGER, Y AS INTEGER, v AS INTEGER, Dir AS STRING) | |
DECLARE SUB AddCaterpillar (X AS STRING, Y AS STRING, Dir AS STRING) | |
DECLARE SUB AddCoin (X AS INTEGER, Y AS INTEGER) |
View .irbrc
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
# Completion | |
require 'irb/completion' | |
# Benchmarking utility method | |
def time(times = 1) | |
require 'benchmark' | |
ret = nil | |
Benchmark.bm { |x| x.report { times.times { ret = yield } } } | |
ret | |
end |
View .bash_profile
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
# Environment Variables | |
export PS1="\u@\h:\w$ " | |
export PATH=$HOME/bin:/opt/local/bin:/usr/local/bin:/usr/local/sbin:/usr/local/mysql/bin:/usr/local/git/bin:$PATH | |
export MANPATH=$MANPATH:/opt/local/share/man:/usr/local/git/man | |
export INFOPATH=$INFOPATH:/opt/local/share/info | |
export EDITOR=vi | |
export CVS_RSH=ssh | |
export DEPLOY_TO=staging | |
# Aliases |
View fancyzoombehavior.js
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
FancyZoomImageBehavior = Behavior.create({ | |
initialize: function() { | |
var src = this.element.readAttribute('href'); | |
var div = $div($img({src: src})); | |
document.body.insert({after: div}); | |
this.element.writeAttribute('href', '#' + div.identify()); | |
new FancyZoom(this.element); | |
} | |
}); |
View case.rb
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
case | |
when expression_1 | |
... | |
when expression_2 | |
... | |
when expression_3 | |
... | |
else | |
... | |
end |
View .gitconfig
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
[user] | |
email = me@....com | |
name = John W. Long | |
[alias] | |
br = branch | |
ci = commit | |
cia = commit -a | |
co = checkout | |
df = diff | |
lg = log |
View gist:107357
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
$ tweettail -f railsconf | |
/Library/Ruby/Gems/1.8/gems/tweettail-1.0.0/lib/tweet-tail/tweet_poller.rb:28:in `initial_json_data': uninitialized constant TweetTail::TweetPoller::Net (NameError) | |
from /Library/Ruby/Gems/1.8/gems/tweettail-1.0.0/lib/tweet-tail/tweet_poller.rb:10:in `refresh' | |
from /Library/Ruby/Gems/1.8/gems/tweettail-1.0.0/lib/tweet-tail/cli.rb:30:in `execute' | |
from /Library/Ruby/Gems/1.8/gems/tweettail-1.0.0/bin/tweettail:10 | |
from /usr/bin/tweettail:19:in `load' | |
from /usr/bin/tweettail:19 | |
View .vimrc
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 runtimepath+=,/usr/share/vim/vimfiles | |
set backspace=indent,eol,start | |
if has("vms") | |
set nobackup " do not keep a backup file, use versions instead | |
else | |
set backup " keep a backup file | |
endif | |
" Switch syntax highlighting on, when the terminal has colors |
OlderNewer