Skip to content

Instantly share code, notes, and snippets.

View edwardhotchkiss's full-sized avatar

Edward Hotchkiss edwardhotchkiss

View GitHub Profile
@edwardhotchkiss
edwardhotchkiss / postage.js
Created May 25, 2012 02:53
postage app blog post
var postage = require('postage')('YOUR API KEY');
var options = {
recipients: '[email protected]',
subject: 'Subject Line',
from: '[email protected]',
content: {
'text/html': '<p>Some awesome content</p>',
'text/plain': 'Plain text goes here (if any)'
@edwardhotchkiss
edwardhotchkiss / normal.js
Created May 25, 2012 02:52
jekyll and mixpanel blog post
mpq.track('EventName', { some : 'data' });
@edwardhotchkiss
edwardhotchkiss / action.js
Created May 25, 2012 02:48
node.js list all mongodb databases
/**
* Uses MongooseJS to Connect to MongoDB
* .Maps out all collections within
*/
var mongoose = require('mongoose')
, MONGO_DB = 'mongodb://localhost/test';
mongoose.connect(MONGO_DB);
$.Preloader({
barColor : '#f57b50',
overlayColor : '#8e4d6b',
barHeight : '10px',
siteHolder : '#container'
});
<script type="text/javascript" src="preloader.js"></script>
@edwardhotchkiss
edwardhotchkiss / iptables.rules
Created April 24, 2012 22:10 — forked from logicalparadox/iptables.rules
Getting Node.js process to run on port 80 without sudo
# NAT interface routing
*nat
# Setup
:PREROUTING ACCEPT [0:0]
:INPUT ACCEPT [2:128]
:OUTPUT ACCEPT [2:120]
:POSTROUTING ACCEPT [2:120]
# Redirect port 80 to port 8080
@edwardhotchkiss
edwardhotchkiss / Jekyll-and-MixPanel.js
Created March 10, 2012 17:16
Jekyll and MixPanel
/**
* Create Jekyll Object, with mpq wrapper
*/
var jekyll = Object.create({
mpq : {
track : function(eventName, properties, callback) {
properties = properties || {};
callback = callback || function(){};
@edwardhotchkiss
edwardhotchkiss / syntax.css
Created March 9, 2012 04:34 — forked from scotu/solarized.css
Solarized Light Pygments CSS / Jekyll
.highlight {
background-color: #efefef;
padding: 7px 7px 7px 10px;
border: 1px solid #ddd;
-moz-box-shadow: 3px 3px rgba(0,0,0,0.1);
-webkit-box-shadow: 3px 3px rgba(0,0,0,0.1);
box-shadow: 3px 3px rgba(0,0,0,0.1);
margin: 20px 0 20px 0;
overflow: hidden;
@edwardhotchkiss
edwardhotchkiss / rackspace.md
Created January 14, 2012 17:32
Node.JS on RackSpace (Nginx, Jenkins, Git post-receive hooks)

Node.JS on RackSpace (Nginx, Jenkins, Git post-receive hooks)


Node.JS

# install node
apt-get update
apt-get install git-core build-essential libssl-dev
@edwardhotchkiss
edwardhotchkiss / vows-coffeescript-async.coffee
Created January 7, 2012 08:00
Vows Async Node.JS Process Testing w/ Request
child = undefined
stdout = ''
stderr = ''
exitCode = 0
vows = require('vows')
path = require('path')
assert = require('assert')