This file contains hidden or 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
$('body').empty() | |
$.ajax | |
url:'/' | |
success: (e) -> | |
name = e[0].project_title | |
$('body').append 'hello ' + name |
This file contains hidden or 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
/**********************************************/ | |
/* | |
/* IR_Black Skin by Ben Truyman - 2011 | |
/* | |
/* Based on Todd Werth's IR_Black: | |
/* http://blog.toddwerth.com/entries/2 | |
/* | |
/* Inspired by Darcy Clarke's blog post: | |
/* http://darcyclarke.me/design/skin-your-chrome-inspector/ | |
/* |
This file contains hidden or 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
{ | |
appDir: '../www', | |
baseUrl: 'js/lib', | |
paths: { | |
app: '../app' | |
}, | |
dir: '../www-built', | |
modules: [ | |
//First set up the common build layer. | |
{ |
This file contains hidden or 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
xmlUrl = '/mta' | |
$.ajax | |
url:xmlUrl | |
success: (d) -> | |
xmlDoc = $.parseXML(d) | |
$xml = $(xmlDoc) | |
console.log xmlDoc | |
date = $xml.find('Date')[0] | |
dateText = $(date).text() | |
time = $xml.find('Time')[0] |
This file contains hidden or 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($){ | |
// $(this).empty().append('load images here') | |
$.fn.flickrPhotos = function(){ | |
var that = this | |
, next = '<button id=next>next</button>' | |
, prev = '<button id=prev>prev</button>' | |
$('body').append(next).append(prev) | |
$.getJSON('http://api.flickr.com/services/feeds/photos_public.gne?jsoncallback=?&limit=50', { | |
format:'json' |
This file contains hidden or 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
// implement module pattern with single var | |
var MODULE = (function(){ | |
var module = {} | |
, flickrUrl = 'http://api.flickr.com/services/feeds/photos_public.gne?jsoncallback=?&limit=50' | |
// define a function expression | |
module.showPhotoUI = function(){ | |
var loopImages = function(d){ |
This file contains hidden or 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 express = require('express'); | |
var sys = require('util'); | |
var oauth = require('oauth'); | |
var app = express.createServer(); | |
var _twitterConsumerKey = process.env['TWITTER_CONSUMER_KEY']; | |
var _twitterConsumerSecret = process.env['TWITTER_CONSUMER_SECRET']; | |
console.log("_twitterConsumerKey: %s and _twitterConsumerSecret %s", process.env['TWITTER_CONSUMER_KEY'], process.env['TWITTER_CONSUMER_SECRET']); |
This file contains hidden or 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
store = new Lawnchair( | |
name: "video-tool" | |
, (store) -> | |
# Create an object | |
workout = key: "curls" | |
# Save it | |
store.save workout | |
This file contains hidden or 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
autocmd BufRead,BufWrite * if ! &bin | silent! %s/\s\+$//ge | endif | |
" Restore cursor position to where it was before | |
augroup JumpCursorOnEdit | |
au! | |
autocmd BufReadPost * | |
\ if expand("<afile>:p:h") !=? $TEMP | | |
\ if line("'\"") > 1 && line("'\"") <= line("$") | | |
\ let JumpCursorOnEdit_foo = line("'\"") | | |
\ let b:doopenfold = 1 | |
This file contains hidden or 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
alias dev-monokai="curl -O https://raw.github.com/gist/4045346/8f0d02c2eccdeb5b89150de6e895e59f7a36b624/apply-monokai.sh && sh apply-monokai.sh && rm apply-monokai.sh" | |
alias dev-tommorrow="curl -O https://raw.github.com/gist/4045346/6770ce4eb208d57bf495a23bbd0d0226a2f371ac/apply-tomorrow.sh && sh apply-tomorrow.sh && rm apply-tomorrow.sh" | |
alias dev-solarized="curl -O https://raw.github.com/gist/4045346/35fe6535dc1f11a7cb073725edf614510e79c411/apply-solarized.sh && sh apply-solarized.sh && rm apply-solarized.sh" | |
alias dev-tom80="curl -o ~/Library/Application\ Support/Google/Chrome/Default/User\ StyleSheets/Custom.css https://raw.github.com/chriskempson/tomorrow-theme/master/Web%20Inspector/Tomorrow%20Night%20Eighties/Custom.css" | |
alias dev-darcy='curl -o ~/Library/Application\ Support/Google/Chrome/Default/User\ StyleSheets/Custom.css http://darcyclarke.me/dev/inspectorskin/Custom.css' | |
alias devcan-monokai="curl -O ~/Library/Application\ Support/Google/Chrome\ Canary/Default/User\ StyleSheets/Custom.css https |