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
| 1) Open .bashrc | |
| 2) Replace... | |
| [ -z "$PS1" ] && return | |
| ..with... | |
| if [[ -n "$PS1" ]]; then | |
| 3) Add this to the end of your .bashrc |
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
| # This file contains brushed up version of all the examples I programmed live during the talk. | |
| # CoffeeScript compiles to JavaScript | |
| numbers = [1,2,3,4] # No need for semicolons! | |
| location = conference = "NDC 2011" # Multiple assigns. | |
| awake = false | |
| console.log location # No need for parens! | |
| # Run, Build |
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
| class LiquidTemplatedController < ApplicationController | |
| include Locomotive::Routing::SiteDispatcher | |
| include Locomotive::Render | |
| before_filter :require_site | |
| protected | |
| def render_with_template(*args) | |
| template_path = args.select {|arg| arg.is_a?(Hash) && arg.has_key?(:template_path)}.first[:template_path] rescue 'index' | |
| args.reject! {|arg| arg.is_a?(Hash) && arg.has_key?(:template_path)} | |
| page_partial = render_to_string(*args) |
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
| @Vis= | |
| Routers: {} | |
| Collections: {} | |
| Models: {} | |
| Views: {} | |
| init: (args) -> | |
| args = {} unless args? | |
| args['router'] = new Vis.Routers.Main() unless args['router']? | |
| args['route'] = '' unless args['route']? |
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
| Snehvit:web_app anders$ guard-jasmine | |
| Run Jasmine at http://127.0.0.1:3000/jasmine | |
| { | |
| "passed": true, | |
| "stats": { | |
| "specs": 1, | |
| "failures": 0, | |
| "time": 0.008 | |
| }, | |
| "suites": [ |
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
| Chuck Mangione, Esther Satterfield - The Land of Make Believe - Live Vocal (1973/Massey Hall, Toronto) | |
| Professor Penguin - Pilot | |
| Remember Remeber - Scottish Widows | |
| The Lovin' Spoonful - Darling Be Home Soon | |
| McDonald & Giles - Tomorrow's People - The Children of Today | |
| Eagles of Death Metal - I Only Want You | |
| DJ Format feat. Edan - Spaceship Earth | |
| Nitrogods - Whiskey Wonderland | |
| Sonic Youth - Kool Thing | |
| Ljodahått - Så stig da i meg, einsemd |
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
| # See, I need to have handlebars.js load partials from mongodb. | |
| # So I start by monkey patching handlebars `invoke partial` function... | |
| handlebars.VM.original_invokePartial = handlebars.VM.invokePartial | |
| handlebars.VM.invokePartial = (partial, name, context, helpers, partials, data) -> | |
| # Then I try to find the partial in the DB... | |
| Partial.findOne { fullpath: name.split '.' }, (err, p) => | |
| if p? | |
| # ..and I use the loaded partial if it exists | |
| handlebars.VM.original_invokePartial(p.partial, name, context, helpers, partials, data) | |
| else |
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
| <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> | |
| <html xmlns="http://www.w3.org/1999/xhtml"> | |
| <head> | |
| <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-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
| Snehvit:Sessions anders$ gradle runJetty8 | |
| Dynamic properties are deprecated: http://gradle.org/docs/current/dsl/org.gradle.api.plugins.ExtraPropertiesExtension.html | |
| Deprecated dynamic property: "jettyVersion" on "root project 'Sessions'", value: "8.0.2.v20111006". | |
| Deprecated dynamic property: "type" on "DefaultExternalModuleDependency{group='org.eclipse.jetty.orbit', name='javax.servlet', version='3.0.0.v201112011016', configuration='default'}", value: "orbit". | |
| :runJetty8 | |
| 2012-05-09 22:14:30.822:INFO:omjr.Runner:Runner | |
| 2012-05-09 22:14:30.823:WARN:omjr.Runner:No tx manager found | |
| 2012-05-09 22:14:30.871:INFO:omjr.Runner:Deploying file:/Users/anders/Projects/SB1/Sessions/build/libs/Sessions.war @ / | |
| [o.e.j.w.WebAppContext{/,null},file:/Users/anders/Projects/SB1/Sessions/build/libs/Sessions.war] | |
| 2012-05-09 22:14:30.893:INFO:oejs.Server:jetty-8.0.y.z-SNAPSHOT |
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
| Snehvit:rpv2 anders$ npm install jsdom | |
| npm http GET https://registry.npmjs.org/jsdom | |
| npm http 304 https://registry.npmjs.org/jsdom | |
| npm http GET https://registry.npmjs.org/htmlparser | |
| npm http GET https://registry.npmjs.org/request | |
| npm http GET https://registry.npmjs.org/cssom | |
| npm http GET https://registry.npmjs.org/contextify | |
| npm http 304 https://registry.npmjs.org/htmlparser | |
| npm http 304 https://registry.npmjs.org/contextify | |
| npm http 304 https://registry.npmjs.org/request |