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
welder(things, 'things.html', 'thing', function(err, html) { | |
if (err) throw new Error(err); | |
res.send(html, {'Content-Type': 'text/html'}); | |
}); |
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
"use strict"; | |
var Resource = require('../lib/resource'); | |
var ResourceError = require('../lib/resourceerror'); | |
var Goal = require('../models/Goal'); | |
var GoalResource = new Resource(); | |
GoalResource.get = function(req, res) { | |
var self = this; |
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 groovy | |
@GrabResolver(name="restlet", root="http://maven.restlet.org/") | |
@Grab(group="org.restlet.jse", module="org.restlet", version="2.0.9") | |
// request timeouts reliably only with Apache HttpClient | |
@Grab(group="org.restlet.jse", module="org.restlet.ext.httpclient", version="2.0.9") | |
import org.restlet.* | |
import org.restlet.data.* |
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
$ brew doctor | |
Your system is raring to brew. | |
$ brew install -v node 2>&1 | pbcopy | |
==> Downloading http://nodejs.org/dist/node-v0.4.11.tar.gz | |
File already downloaded in /Users/avi/Library/Caches/Homebrew | |
/usr/bin/tar xf /Users/avi/Library/Caches/Homebrew/node-0.4.11.tar.gz | |
==> ./configure --prefix=/usr/local/Cellar/node/0.4.11 | |
./configure --prefix=/usr/local/Cellar/node/0.4.11 | |
Checking for program g++ or c++ : /usr/bin/llvm-g++ | |
Checking for program cpp : /usr/bin/cpp |
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
curl -i -# -o /dev/null http://localhost:3000/ |
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
public void log(Level level, String message, Throwable throwable, Object... params) { | |
log(level, MessageFormat.format(message, params), throwable); | |
} | |
public void severe(String message, Throwable throwable) { | |
log(Level.SEVERE, message, throwable); | |
} | |
public void severe(String message, Object... params) { | |
log(Level.SEVERE, message, 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
;;; Compile your CoffeeScript along with your Clojure | |
;; NOTE: For Clojure projects using Leiningen 1.7.x. | |
;; Instructions for Leiningen 2.0.x coming soon. | |
;; Step 1: add [robert/hooke "1.1.2"] to the :dev-dependencies option of your defproject call | |
;; Step 2: add the following code to the bottom of your project.clj: | |
(require ['robert.hooke :as 'hooke] |
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
Running 10.8.0 and latest brew. | |
$ brew upgrade -v node 2>&1 | pbcopy | |
==> Upgrading node | |
==> Downloading http://nodejs.org/dist/v0.8.7/node-v0.8.7.tar.gz | |
Already downloaded: /Library/Caches/Homebrew/node-0.8.7.tar.gz | |
/usr/bin/tar xf /Library/Caches/Homebrew/node-0.8.7.tar.gz | |
==> ./configure --prefix=/usr/local/Cellar/node/0.8.7 --without-npm | |
./configure --prefix=/usr/local/Cellar/node/0.8.7 --without-npm |
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 python | |
""" | |
HTTP Link Header Parsing | |
Simple routines to parse and manipulate Link headers. | |
""" | |
__license__ = """ | |
Copyright (c) 2009 Mark Nottingham |
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
tell application "Safari" | |
set docText to "" | |
set tabcount to number of tabs in front window | |
repeat with y from 1 to tabcount | |
set tabName to name of tab y of front window | |
set tabURL to URL of tab y of front window | |
set tabText to tabName & linefeed & tabURL | |
set docText to docText & tabText & linefeed & linefeed as string | |
end repeat |