Skip to content

Instantly share code, notes, and snippets.

Jason Campbell jxson

Block or report user

Report or block jxson

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@jxson
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
jxson / README.md
Created Aug 24, 2012 — forked from adammw/README.md
Node.js for Raspberry Pi
View README.md

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
jxson / hack.sh
Created Apr 6, 2012 — forked from erikh/hack.sh
OSX For Hackers
View hack.sh
#!/usr/bin/env sh
##
# This is script with usefull tips taken from:
# https://github.com/mathiasbynens/dotfiles/blob/master/.osx
#
# install it:
# curl -sL https://raw.github.com/gist/2108403/hack.sh | sh
#
@jxson
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 () {
cb(port)
@jxson
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)
(<(?i:head|body|table|thead|tbody|tfoot|tr|div|select|fieldset|style|script|ul|ol|li|form|dl)\b.*?>
|<!--(?!.*--\s*>)
|^<!--\ \#tminclude\ (?>.*?-->)$
|<\?(?:php)?.*\b(if|for(each)?|while)\b.+:
|\{\{?(if|foreach|capture|literal|foreach|php|section|strip)
|\{\s*($|\?>\s*$|//|/\*(.*\*/\s*$|(?!.*?\*/)))
@jxson
jxson / .gitignore
Created Oct 1, 2011 — forked from weaver/.gitignore
Express + Formidable, works with bodyParser and sets req.body correctly.
View .gitignore
node_modules
View gist:1224553
# we should be running psql in dev since heroku does.
default: &DEFAULT
adapter: postgresql
encoding: utf8
min_messages: warning
development:
<<: *DEFAULT
database: tedx_dev
test:
<<: *DEFAULT
@jxson
jxson / forceScrollbars.coffee
Created Sep 13, 2011 — forked from madrobby/forceScrollbars.coffee
Get Safari (Lion) to hopefully always indicate & show scrollbars correctly
View forceScrollbars.coffee
# CoffeeScript source
$.fn.forceScrollbars = ->
@css position: 'static'
@[0].offsetHeight if @length > 0
@css position: 'relative'
@jxson
jxson / bitly-node.md
Created May 9, 2011 — forked from joemccann/bitly-node.md
Bitly shortening from the command line with node, motherfuckers.
View bitly-node.md
View gist:880667
# Add this to more_web_steps.rb
# Selenium docs: http://code.google.com/p/selenium/wiki/RubyBindings#Javascript_Alert/Confirm today!
When /^I (accept|dismiss) the "([^"]*)" alert$/ do |action, text|
alert = page.driver.browser.switch_to.alert
alert.text.should eq(text)
alert.send(action)
end
You can’t perform that action at this time.