Skip to content

Instantly share code, notes, and snippets.

@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 / 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:
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(),
<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>
@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

var _draw = function() {
var angle = 90,
total = 0,
start = 0,
stroke = Raphael.rgb(52,125,168),
process = function (j) {
if(j == voted){
color = Raphael.rgb(235,194,0);
} else {
color = Raphael.rgb(200,200,200);
var url = 'https://api.themoviedb.org/3/movie/';
imdb_id = 'tt0102685';
key = '?api_key=9a2c8fe3fd95dcd12c59204ad2899b9e';
append = '&append_to_response=credits';
$.ajax({
type: 'GET',
url: url + imdb_id + key + append,
dataType: 'jsonp',
success: function(data) {
@jimmyjacobson
jimmyjacobson / wedgies-embed.md
Last active August 29, 2015 14:05
Embedding a Wedgie Poll on your Website

Embedding a Wedgie Poll on your Website

Wedgies is a platform for real time polls across social channels. You can create a question on Wedgies.com and share it to Facebook or Twitter immediately. You can also use our widget to embed the question on your website or blog and gather responses while creating engagement. We have provided javascript, iframe and WordPress plugin solutions to help you get started.

Javascript

Example on CodePen

<script src='https://www.wedgies.com/js/widgets.js'></script>
@jimmyjacobson
jimmyjacobson / vegasjs_31_reboot.md
Created August 20, 2014 05:15
VegasJS 31: Reboot

VegasJS 31: Reboot

Roundtable discussion about the future of VegasJS

Board

We decided to form a board of 3-5 people that will be in charge of scheduling meet ups, point of contacts for sponsors, and general welfare of the meet up.

The first board members are:

  • Jen Wilhelm
  • Ethan Duggan