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
= javascript_include_tag "https://ajax.googleapis.com/ajax/libs/jquery/1.6.2/jquery.min.js" | |
-# Local fallback for if/when Google decides to stop hosting jQuery | |
:javascript | |
!window.jQuery && document.write(unescape(#{URI::escape javascript_include_tag("jquery.1.6.2.min.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
# Bedazzle terminal with Git branch information | |
NO_COLOR="\[\033[0m\]" | |
BLACK="\[\033[0;30m\]" | |
RED="\[\033[0;31m\]" | |
GREEN="\[\033[0;32m\]" | |
YELLOW="\[\033[0;33m\]" | |
BLUE="\[\033[0;34m\]" | |
PURPLE="\[\033[0;35m\]" | |
CYAN="\[\033[0;36m\]" | |
GRAY="\[\033[0;90m\]" |
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
$ nodester app create synynyms | |
nodester info creating app: synynyms server.js | |
nodester info successfully created app synynyms to will run on port 12398 from server.js | |
nodester info run nodester app init synynyms to setup this app. | |
$ | |
$ | |
$ nodester app info synynyms | |
nodester info Gathering information about: synynyms | |
nodester warn synynyms on port 12398 running: false (pid: unknown) | |
nodester info gitrepo: [email protected]:/node/git/rschenk/4245-08cf4fe1d8242013d68cca50d4f02eb5.git |
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
require 'date' | |
d1 = Date.parse('Apr 1, 2011') | |
d2 = Date.parse('Feb 1, 2011') | |
if d2 > d1 | |
p "#{d2} comes before #{d1}" | |
elsif d1 > d2 | |
p "#{d1} comes before #{d2}" | |
else |
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
ssh family_computer | |
sudo su | |
su wife -c "osascript -e 'tell application \"iTunes\"' -e 'set the sound volume to 0' -e 'pause' -e 'end tell'" | |
afplay path/to/tom_waits.mp3 | |
su wife -c "osascript -e 'tell application \"iTunes\"' -e 'set the sound volume to 100' -e 'play' -e 'end tell'" | |
exit | |
exit |
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 get_gni_data( options ) { | |
alert( options.search_term ); | |
alert( options.add_register_link ); | |
// defaults are annoying. You could do something like this: | |
options.search_term = options.search_term || "some default"; | |
// OR if you're using a library like Underscore, you could do | |
options = _({ search_term: "default_value", add_regsiter_link: 1}).extend( options ); |
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( (desiredInterval / [[timescaleIntervals objectAtIndex:(i-1)] doubleValue]) < ([[timescaleIntervals i] doubleValue] / desiredInterval) ) | |
if desiredInterval / timescaleIntervals[i-1] < timescaleIntervals[i] / desiredInterval | |
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
# Bedazzle terminal with Git branch information | |
NO_COLOR="\[\033[0m\]" | |
BLACK="\[\033[0;30m\]" | |
RED="\[\033[0;31m\]" | |
GREEN="\[\033[0;32m\]" | |
YELLOW="\[\033[0;33m\]" | |
BLUE="\[\033[0;34m\]" | |
PURPLE="\[\033[0;35m\]" | |
CYAN="\[\033[0;36m\]" | |
GRAY="\[\033[0;90m\]" |
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
adjectives = %w(Modern Global Discursive Rural Representational Credit Affective Domestic Transnational Nuclear Colonial Saharan Queer Fordist Contemporary Socialist Socioeconomic Marxist Buddhist Kinky Forgotten Ghandian Conservative) | |
prefixes = %w(Pre Post Meta Neo Sub Multi Self Trans) | |
locations = ["Empire", "United States", "South America", "New Europe", "Chile", "Diaspora", "Worlds", "State", "India", "China", "Labor Camps", "Margin", "Tibet", "Urban Space", "Cyberspace", "Africa", "Bollywood", "Wall Street", "Truth", "Fear", "Violence", "Corporations"] | |
nouns = ["The Gaze", "Survival", "Privatization", "Commodity", "Conservation", "Mediation", "Protest", "Sovereignty", "Narrative", "Stiob", "Communication", "Materiality", "Faciality", "Territorialization", "New Media", "Industrialism", "Machine", "Ethnography", "Dialectic", "Cyborg", "Anthropology", "Economy", "Philanthropy", "Sexuality", "Life", "Democracy", "Personhood", "Revival", "Culture"] | |
adjective_phrase = { | |
:a => adjectives, | |
:b => [prefixes |
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
Dir[Rails.root.join('app', 'models', 'mixins', '*.rb')].each do |filename| | |
require filename | |
end |
OlderNewer