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
(pyrenv)Niall-OHigginss-MacBook-Pro:pyrenv nialljohiggins$ paster create -t akhet | |
Selected and implied templates: | |
Akhet#akhet A Pylons-like Pyramid project | |
Enter project name: foobar | |
Variables: | |
egg: foobar | |
package: foobar | |
project: foobar | |
Enter sqlalchemy (Include SQLAlchemy configuration? (y/n)) [True]: n |
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
class nodejs { | |
Package { ensure => "installed" } | |
$pkglist = [ "python-software-properties" ] | |
package { $pkglist: } | |
$apt-base = "/etc/sources.list.d/chris-lea" | |
Exec { require => package["python-software-properties"] } |
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
class mongodb { | |
$add-key = "/usr/bin/apt-key adv --keyserver keyserver.ubuntu.com --recv 7F0CEB10" | |
$mongodb-repo = "deb http://downloads-distro.mongodb.org/repo/ubuntu-upstart dist 10gen" | |
Exec { require => Package["python-software-properties"] } | |
exec { "add-10gen-key": | |
command => $add-key, | |
onlyif => "/usr/bin/apt-key list | /usr/bin/awk '$0 ~ /10gen/ { exit 1 }' /etc/apt/sources.list" |
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
class python27 { | |
Package { ensure => "installed" } | |
$apt-base = "/etc/apt/sources.list.d/fkrull-" | |
Exec { require => Package["python-software-properties"] } | |
exec { "python-repo" : | |
command => "/usr/bin/add-apt-repository ppa:fkrull/deadsnakes", | |
creates => "${apt-base}deadsnakes-lucid.list", |
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
class s3-backups { | |
package { "duplicity": | |
ensure => "installed" | |
} | |
package { "python-boto": | |
ensure => "installed" | |
} |
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
apres.getDataParamsFromElem = function(elem, paramKeys, prefix) { | |
var paramPrefix = prefix || "data-widget-"; | |
var params = {}; | |
for (var paramName in paramKeys) { | |
params[paramName] = elem.attr(paramPrefix + paramName); | |
} | |
return params; | |
} | |
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
char dayw[] | |
{ | |
" S M Tu W Th F S" | |
}; | |
char *smon[] | |
{ | |
"Jan", "Feb", "Mar", "Apr", | |
"May", "Jun", "Jul", "Aug", | |
"Sep", "Oct", "Nov", "Dec", | |
}; |
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
// Detection predicate for Python language & known frameworks | |
{ | |
// "exists" property can be a glob as supported by node-glob | |
// https://github.com/isaacs/node-glob | |
// | |
// "grep" property is a JavaScript regular expression as described at | |
// https://developer.mozilla.org/en-US/docs/JavaScript/Reference/Global_Objects/RegExp | |
// grep looks for the regular expression inside of the | |
// Array predicates have an implicit OR |
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 = require('assert') | |
var spawn = require('child_process').spawn | |
function runTest(cb) { | |
var proc = spawn("/usr/bin/env", [], {env:{foo:"bar"}}) | |
proc.stdoutBuf = "" | |
proc.stderrBuf = "" | |
proc.stdmergedBuf = "" |
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
// | |
// Node Child Process Spawn() race bug | |
// | |
// Triggerable on: | |
// Node 0.8.11 / OS X 10.8.2 / MBP 13" 2011 (4 cores) | |
// Doesn't seem to happen on: | |
// Node 0.8.11 / Ubuntu 10.04 LTS / EC2 Medium (1 core) | |
var assert = require('assert') |