Skip to content

Instantly share code, notes, and snippets.

View cgkio's full-sized avatar

Christian Kessler IV cgkio

View GitHub Profile
@cgkio
cgkio / subnav.css
Created January 20, 2013 15:04 — forked from thomaspark/subnav.css
Sub-NavBars in Twitter Bootstrap
section {
padding-top: 60px;
}
.subnav {
margin-bottom: 60px;
width: 100%;
height: 36px;
background-color: #eeeeee; /* Old browsers */
background-repeat: repeat-x; /* Repeat the gradient */
// Required modules.
var cradle = require('cradle');
var util = require('util');
var http = require('http');
// Config.
var config = require('./config');
// Variable to hold chunked data from Postmark.
var mailRaw = '';
var http = require("http"),
url = require("url"),
path = require("path"),
fs = require("fs")
port = process.argv[2] || 8888;
http.createServer(function(request, response) {
var uri = url.parse(request.url).pathname
, filename = path.join(process.cwd(), uri);
#!/bin/bash
#
# This script installs and configures couchdb on a fresh Amazon Linux AMI instance.
#
# Must be run with root privileges
# Tested with Amazon Linux AMI release 2011.02.1.1 (ami-8c1fece5)
#
export BUILD_DIR="$PWD"
@cgkio
cgkio / app.js
Created April 10, 2013 19:53
Parse inbound emails with Node.js, Cradle, and CouchDB
// Required modules.
var cradle = require('cradle');
var util = require('util');
var http = require('http');
// Config.
var config = require('./config');
// Variable to hold chunked data from Postmark.
var mailRaw = '';
@cgkio
cgkio / fastbutton.js
Created October 30, 2013 15:09 — forked from fwebdev/fastbutton.js
Remove 300ms jQuery Mobile click delay
//What is this all about: http://code.google.com/intl/de-DE/mobile/articles/fast_buttons.html
//This Version "forked" from: http://forum.jquery.com/topic/how-to-remove-the-300ms-delay-when-clicking-on-a-link-in-jquery-mobile
//======================================================== FASTCLICK
function FastButton(element, handler) {
this.element = element;
this.handler = handler;
element.addEventListener('touchstart', this, false);
};
FastButton.prototype.handleEvent = function(event) {
@cgkio
cgkio / POST_to_google_spreadsheet.js
Created November 18, 2013 01:22 — forked from mhawksey/gist:1276293
POST rows into Google Spreadsheet using Google Apps Script and REST
/* Usage
1. Run the setup function (you'll need to do this twice - 1st time to grant acces to Script Properties)
2. Share > Publish as service ... set security level and enable service
3. Copy the service URL and post this in your form/script action
4. Insert column names on the DATA sheet matching the parameter names of the data you are passing
*/
function doGet(e) { // change to doPost(e) if you are recieving POST data
var ss = SpreadsheetApp.openById(ScriptProperties.getProperty('active'));
var sheet = ss.getSheetByName("DATA");
/*! Firebase-util - v0.1.2 - 2014-01-11
* https://github.com/firebase/firebase-util
* Copyright (c) 2014 Firebase
* MIT LICENSE */
(function(exports) {
/**
* @var {Object} a namespace to store internal utils for use by Firebase.Util methods
*/