Skip to content

Instantly share code, notes, and snippets.

@jimmyjacobson
jimmyjacobson / README.md
Last active December 14, 2015 03:38
Written for Code Across America

Drag Mayor Everywhere to your bookmarklet bar and enjoy

<a href="javascript:(function(){if(window.myBookmarklet!==undefined){myBookmarklet();}else{document.body.appendChild(document.createElement('div')).setAttribute('id','netcomBox');document.body.appendChild(document.createElement('script')).src='https://gist.github.com/jimmyjacobson/5021937/raw/67d61f1345b5ffe22469103064e091c2b71439a3/cityofhenderson.js?';}})();">Mayor Everywhere</a>
var UFO = {
req: ["movie", "width", "height", "majorversion", "build"],
opt: ["play", "loop", "menu", "quality", "scale", "salign", "wmode", "bgcolor", "base", "flashvars", "devicefont", "allowscriptaccess", "seamlesstabbing", "allowfullscreen", "allownetworking"],
optAtt: ["id", "name", "align"],
optExc: ["swliveconnect"],
//ximovie: "http://netcominteractive.com/player/swf/ufo.swf",
ximovie: "http://cityofhenderson.com/netcom/swf/ufo.swf",
xiwidth: "215",
xiheight: "138",
ua: navigator.userAgent.toLowerCase(),
@jimmyjacobson
jimmyjacobson / nodevegas-funcitons.js
Created February 13, 2013 19:34
Ray Morgan's Examples from Javascript as a Language: Functions
// This is a comment.
/*
This is a multiline comment
*/
// ---------------------------------- //
// Variables //
// ---------------------------------- //
// -- Numbers:
@jimmyjacobson
jimmyjacobson / gist:2064177
Created March 17, 2012 19:00
node js configs
var mode = process.env.NODE_ENV ? process.env.NODE_ENV : 'development';
var config = {
development: {
redis: {
host: 'localhost',
port: 6379,
auth: null
},
},
@jimmyjacobson
jimmyjacobson / gist:1922339
Created February 27, 2012 07:52
Sampel Code
if (false); {
console.log('WHY AM I SEEING THIS!?!?!?!');
}
//Prefix
var prefix = exports.prefix = 'cinchtool';
//link Keys
exports.link = 'link';
exports.links = 'links';
exports.linksId = prefix + ':ids:link';
exports.linkKey = function(id) {
return prefix + ':link:' + id;
}
var http = require('http');
var redis = require("redis")
, db = redis.createClient();
function main(callback) {
var options = {
host: "search.twitter.com",
port: 80,
path: "/search.json?q=momolv"
@jimmyjacobson
jimmyjacobson / gist:1681767
Created January 26, 2012 08:33
Error on Event Creation
curl -d "startDate=1234" "http://localhost:3000/event"
{
"type": "ValidationError",
"msg": "Event creation failed",
"errors": [
{
"msg": "missing parameter",
"parameter": "endDate"
},
@jimmyjacobson
jimmyjacobson / gist:1651125
Created January 21, 2012 03:33
Doing weird stuff with Redis
Let's start with some people
vegastech:people:person:raycmorgan {
name: Ray Morgan
}
vegastech:people:person:jimmyjacobson {
name: Jimmy
}