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
| #!/usr/bin/env sh | |
| ## | |
| # This is script with usefull tips taken from: | |
| # https://github.com/mathiasbynens/dotfiles/blob/master/.osx | |
| # | |
| # install it: | |
| # curl -sL https://raw.github.com/gist/2108403/hack.sh | sh | |
| # |
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
| # index.html | |
| <script src="/javascripts/lib/require.js" data-main="/javascripts/app/config.js"> | |
| # public/coffeescripts/app/config.coffee | |
| require.config | |
| deps: ["initialize"] | |
| paths: | |
| "jquery":"lib/jquery" | |
| "initialize": "app/initialize" |
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
| cp = require 'child_process' | |
| processes = ['make dev-server PORT=8081', 'casperjs test --includes=test/casper-helpers.coffee --cookies-file=/dev/null? test/integration'] | |
| processes.forEach (proc) -> | |
| p = cp.spawn 'sh', ['-c', proc] | |
| p.stdout.setEncoding 'utf8' | |
| p.stderr.pipe process.stderr | |
| p.stdout.pipe process.stdout | |
| p.on 'exit', -> | |
| process.kill 'SIGINT' |
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
| # Get version strings from URL | |
| jQueryVersion = /jquery=([\w\.]+)/.exec location.search | |
| backboneVersion = /backbone=([\w\.]+)/.exec location.search | |
| underscoreVersion = /underscore=([\w\.]+)/.exec location.search | |
| mustacheVersion = /mustache=([\w\.]+)/.exec location.search | |
| supportedVersions = | |
| jquery: ['1.6.4', '1.8.1'] | |
| backbone: ['0.5.3', '0.9.2'] |
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
| cp = require 'child_process' | |
| processes = ['make dev-server PORT=8081', 'casperjs test --includes=test/casper-helpers.coffee --cookies-file=/dev/null? test/integration'] | |
| processes.forEach (proc) -> | |
| p = cp.spawn 'sh', ['-c', proc] | |
| p.stdout.setEncoding 'utf8' | |
| p.stderr.pipe process.stderr | |
| p.stdout.pipe process.stdout | |
| p.on 'exit', -> | |
| process.kill 'SIGINT' |
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
| kue = require 'kue' | |
| jobs = kue.createQueue() | |
| kue.app.enable 'jsonp callback' | |
| assembleJob = (data) -> | |
| type = 'tweet' | |
| jobData = | |
| title:data.text | |
| handle:data.user.screen_name | |
| avatar:data.user.profile_image_url |
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
| # | |
| # Use a fixture stub of JSON to mock a headline API to respond to GET /headline | |
| # | |
| fs = require 'fs' | |
| express = require 'express' | |
| root = require('path').normalize "#{__dirname}/.." | |
| pub = "#{root}/app/public" | |
| headline = JSON.parse fs.readFileSync "#{root}/app/fixtures/headline-api.json", 'utf8' | |
| module.exports = routes = express() |
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
| query = 'portland' | |
| types = 'foo,bar,baz' | |
| params = /// chicago/all/#{types} /// | |
| casper.start 'http://localhost:8081', -> | |
| @setupCookie 'chicago' | |
| @reload() | |
| .then -> |
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
| {SearchError} = require '../views/search-error.coffee' | |
| @onEnterError = (event, from, to, model) -> | |
| new SearchError({model}).render() |
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
| open -a Google\ Chrome --args --disable-web-security |