Skip to content

Instantly share code, notes, and snippets.


Jason Campbell jxson

View GitHub Profile
jxson / 0_reuse_code.js
Created Jun 6, 2014
Here are some things you can do with Gists in GistBox.
View 0_reuse_code.js
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
jxson /
Created Aug 24, 2012 — forked from adammw/
Node.js for Raspberry Pi

Node.js for Raspberry Pi

This is a work in progress - it may not work!

Pre-built binaries

Raspbian (hard-float)

v0.8.6-pre (adammw/node@3a42578d477249cc8851cd76cfb4fa4cb88ab0a0)

jxson /
Created Apr 6, 2012 — forked from erikh/
OSX For Hackers
#!/usr/bin/env sh
# This is script with usefull tips taken from:
# install it:
# curl -sL | sh
jxson / gist:1840807
Created Feb 16, 2012 — forked from mikeal/gist:1840641
get a new/clean port with node.js
View gist:1840807
var portrange = 45032
function getPort (cb) {
var port = portrange
portrange += 1
var server = net.createServer()
server.listen(port, function (err) {
server.once('close', function () {
jxson / HTML language
Created Nov 22, 2011 — forked from kornelski/HTML language
TextMate HTML language tweaked to support unqoted attributes
View HTML language
{ scopeName = 'text.html.basic';
firstLineMatch = '<!DOCTYPE|<(?i:html)|<\?(?i:php)';
fileTypes = ( 'html', 'htm', 'shtml', 'xhtml', 'phtml', 'php', 'inc', 'tmpl', 'tpl', 'ctp' );
foldingStartMarker = '(?x)
|^<!--\ \#tminclude\ (?>.*?-->)$
jxson / .gitignore
Created Oct 1, 2011 — forked from weaver/.gitignore
Express + Formidable, works with bodyParser and sets req.body correctly.
View .gitignore
View gist:1224553
# we should be running psql in dev since heroku does.
default: &DEFAULT
adapter: postgresql
encoding: utf8
min_messages: warning
database: tedx_dev
jxson /
Created Sep 13, 2011 — forked from madrobby/
Get Safari (Lion) to hopefully always indicate & show scrollbars correctly
# CoffeeScript source
$.fn.forceScrollbars = ->
@css position: 'static'
@[0].offsetHeight if @length > 0
@css position: 'relative'
jxson /
Created May 9, 2011 — forked from joemccann/
Bitly shortening from the command line with node, motherfuckers.
View gist:880667
# Add this to more_web_steps.rb
# Selenium docs: today!
When /^I (accept|dismiss) the "([^"]*)" alert$/ do |action, text|
alert = page.driver.browser.switch_to.alert
alert.text.should eq(text)
You can’t perform that action at this time.