- Get to know the environment, and VCS lingo
- Basic functionality: add, commit, diff, log
- Basic cooperative actions: fetch, push, pull
- Getting out of trouble: reset, checkout
- Branching: branch, merge, checkout
- Best practices: Branching models, infrastructure/GitHub, tools
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
// Ovveride Underscore.js' template format | |
_.templateSettings = { | |
evaluate: /\{%([\s\S]+?)%\}/g, | |
interpolate: /\{\{(.+?)\}\}/g | |
}; |
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
<!DOCTYPE html> | |
<html> | |
<head> | |
<title>Cross-Origin Resource Sharing (CORS) With jQuery And Node.js</title> | |
</head> | |
<body> | |
<h1> | |
Cross-Origin Resource Sharing (CORS) With jQuery And Node.js | |
</h1> |
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
#!/bin/bash | |
# | |
# Depends on buster.js and phantom.js being installed | |
# | |
BUSTERPATH_OSX="/usr/local/lib/node_modules/buster" | |
BUSTERPATH_GNU="/usr/lib/node_modules/buster" | |
BUSTER_PHANTOMSCRIPT="script/phantom.js" | |
BUSTER_CMD="buster-server" |
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
var assert = buster.assertions.assert; | |
var refute = buster.assertions.refute; | |
var testCase = buster.testCase('my views', { | |
'spy reg': function () { | |
var View = Backbone.View.extend({ | |
events: { 'click': 'myclick' }, | |
myclick: function () { | |
console.log('orig handler click'); | |
} |
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
package editio; | |
import java.io.IOException; | |
import javax.servlet.ServletException; | |
import javax.servlet.annotation.WebServlet; | |
import javax.servlet.http.HttpServlet; | |
import javax.servlet.http.HttpServletRequest; | |
import javax.servlet.http.HttpServletResponse; |
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
#!/bin/bash | |
TXTBLD=$(tput bold) | |
TXTRST=$(tput sgr0) | |
JVMS="/System/Library/Java/JavaVirtualMachines" | |
JAVA7="jdk1.7.0_17.jdk" | |
JDKS="~/.jdks" | |
usage () { |
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
#!/usr/bin/env bash | |
set -e | |
# Find unicode chars outside ASCII range recursively from this directory | |
chars=$(grep -r -P -n "[\x80-\xFF]" . | awk -F':' '{print $1 ";" $2}') | |
for fileandline in $chars; do | |
arrIN=(${fileandline//;/ }) | |
filename=${arrIN[0]} |
This is some notes jotted down while trying to get an old USB sound card, connected to an Asus RT-AC66U router, to output music -- both from local MP3 files and Spotify.
Initially the idea was to run Mopidy on the router, but one of its core dependencies, libspotify, is not (yet) compiled for the MIPS architecture the Asus router runs under.
Maybe that will change some time: http://community.spotify.com/t5/Spotify-Ideas/libspotify-for-the-Mipsel-processor-Architecture/idi-p/36599
For now, Mopidy will have to run on another device on the network, and stream audio to the router.
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
var QueuedModel = Backbone.Model.extend({ | |
url: function () { | |
var delay = Math.floor(Math.random() * 7); | |
return "/echo/json/?delay=" + delay; | |
}, | |
initialize : function () { | |
this.saveQueue = jQuery.Deferred(); | |
this.saveQueue.resolve(); | |
OlderNewer