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> | |
<head> | |
<title>QUnit Test Page</title> | |
<link rel="stylesheet" href="libs/qunit-1.12.0.css"> | |
</head> | |
<body> | |
<div id="qunit"></div> | |
<div id="qunit-fixture"></div> | |
<script src="libs/qunit-1.12.0.js"></script> | |
</body> |
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 config = { | |
name: "rupert-basic-example", | |
stassets: { | |
root: './src/client' | |
} | |
}; | |
require('rupert')(config).start(); |
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 config = { | |
name: "rupert-api-example", | |
stassets: { | |
root: './src/client' | |
}, | |
server: { | |
root: './src/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 config = { | |
name: 'rupert-basic-example', | |
stassets: { | |
root: './src/client' | |
}, | |
server: { | |
root: './src/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 config = { | |
name: 'rupert-auth-example', | |
hostname: 'localhost', | |
stassets: { | |
root: './src/client' | |
}, | |
server: { | |
root: './src/server' | |
}, | |
mongo: { |
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 log = debug('draggable'); | |
function Draggable(element, scope){ | |
var apply; | |
if(scope.$apply){ | |
apply = function(fn){ | |
return function(){ | |
var context = this; | |
var args = arguments; |
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 log = debug('draggable'); | |
function Draggable(element, scope){ | |
var apply; | |
if(scope.$apply){ | |
apply = function(fn){ | |
return function(){ | |
var context = this; | |
var args = arguments; |
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
/** | |
* Calculate the specificity of a selectorList (the sum of the count of | |
* matching attributes). | |
*/ | |
var specificity = function(selectorList) { | |
var spec = 0; | |
goog.array.forEach(selectorList, function(selector){ | |
spec += selector.hierarchy?1:0; | |
spec += selector.type?1:0; | |
spec += selector.id?1:0; |
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
mkdir --parents /home/$USER/devel/firefox | |
mkdir --parents /home/$USER/bin | |
pushd /home/$USER/devel/firefox | |
for ff in $(seq 4 13) ; do | |
wget ftp://ftp.mozilla.org/pub/mozilla.org/firefox/releases/$ff.0/linux-$(uname -p)/en-US/firefox-$ff.0.tar.bz2 | |
tar xvf firefox-$ff.0.tar.bz2 | |
mv firefox firefox-$ff | |
/home/$USER/devel/firefox/firefox-$ff/firefox -no-remote -CreateProfile firefox-$ff.0 |
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
polynomial = (coefficients) -> | |
n = 0 | |
coefficients = reverse coefficients | |
(x = n++) -> | |
sum = 0 | |
for c, i in coefficients | |
sum += c * Math.pow(x, i) | |
sum | |
linear = (a = 1, b = 0) -> |