brew install git bash-completion
Configure things:
git config --global user.name "Your Name"
git config --global user.email "[email protected]"
/* | |
Load Sinon.JS in the SpecRunner: | |
<script type="text/javascript" src="lib/jasmine-1.0.1/jasmine.js"></script> | |
<script type="text/javascript" src="lib/jasmine-1.0.1/jasmine-html.js"></script> | |
<script type="text/javascript" src="sinon-1.0.0.js"></script> | |
<script type="text/javascript" src="sinon-ie-1.0.0.js"></script> | |
http://cjohansen.no/sinon/ | |
*/ |
$.ajaxPrefilter('json', function(options, orig, jqXHR) { | |
if (options.crossDomain && !$.support.cors) return 'jsonp' | |
}); | |
$.ajax({ | |
url: 'http://nodeserver:3000', | |
dataType: 'json', | |
success: callback, | |
xhrFields: { | |
withCredentials: true |
#!/bin/sh | |
# Just copy and paste the lines below (all at once, it won't work line by line!) | |
# MAKE SURE YOU ARE HAPPY WITH WHAT IT DOES FIRST! THERE IS NO WARRANTY! | |
function abort { | |
echo "$1" | |
exit 1 | |
} | |
set -e |
<?php | |
class Simplate { | |
/* | |
* Sets include file name, and sanitizes vars. | |
*/ | |
function __contruct($template_name = '404', $vars = array()) { | |
// Escapt all values by default. | |
$this->template_vars = $this->sanitize_vars($vars); |
app.get('/javascript/:buildable_js_file', function(req, res) | |
{ | |
var jsFilename = req.params.buildable_js_file | |
, staticPath = 'public/javascript/' + jsFilename | |
, buildPath = 'app/client/' + jsFilename | |
, buildDir = buildPath.replace('.js', '') | |
, serveJS = function(jsString) | |
{ | |
res.header('Content-Type', 'application/javascript') | |
res.send(jsString) |
@include keyframes(appear-and-roundify) { | |
0% { opacity: 0; @include border-radius(2px); } | |
100% { opacity: 1; @include border-radius(10px); } | |
} |
root = if window? then window else global | |
root.$ = require("jquery") | |
root.jQuery = $ |
brew install git bash-completion
Configure things:
git config --global user.name "Your Name"
git config --global user.email "[email protected]"
/* | |
* JavaScript Keyboard Map (Mac layout) | |
* | |
* | |
* escββ F1βββ F2βββ F3βββ F4βββ F5βββ F6βββ F7βββ F8βββ F9βββ F10ββ F11ββ F12ββ F13βββββ+ | |
* | 27 | 112 | 113 | 114 | 115 | 116 | 117 | 118 | 119 | 120 | 121 | 122 | 123 | ??? | | |
* ` βββ 1ββββ 2ββββ 3ββββ 4ββββ 5ββββ 6ββββ 7ββββ 8ββββ 9ββββ 0ββββ - βββ = βββ deleteββ+ | |
* | 192 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | | |
* tabββββ Qββββ Wββββ Eββββ Rββββ Tββββ Yββββ Uββββ Iββββ Oββββ Pββββ [ βββ ] βββ \ ββββ+ | |
* | 9 | 81 | 87 | 69 | 82 | 84 | 89 | 85 | 73 | 79 | 80 | 219 | 221 | 220 | |
(by @andrestaltz)
If you prefer to watch video tutorials with live-coding, then check out this series I recorded with the same contents as in this article: Egghead.io - Introduction to Reactive Programming.