Skip to content

Instantly share code, notes, and snippets.

View yocontra's full-sized avatar

contra yocontra

View GitHub Profile
var gulp = require('gulp');
var browserify = require('gulp-browserify');
var concat = require('gulp-concat');
var styl = require('gulp-styl');
var refresh = require('gulp-livereload');
var lr = require('tiny-lr');
var server = lr();
var paths = {
js: 'src/**/*.js',
@tinabeans
tinabeans / template.html
Last active February 13, 2024 09:18
A super-barebones single-column responsive email template, assuming a max-width of 540px. Read about it on the Fog Creek blog.
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Single-Column Responsive Email Template</title>
<style>
@media only screen and (min-device-width: 541px) {
.content {
@yocontra
yocontra / redis-loader.js
Created May 28, 2013 18:09
Loads a JSON object into redis - good for testing. Supports flat keys as well as nested values
var redis = require('redis');
var async = require('async');
module.exports = loadRedis;
function loadRedis(opts, cb) {
var errored = false;
var client = redis.createClient(opts.redis.port, opts.redis.host);
client.once('error', function (e) {
@maxkandler
maxkandler / gist:5233150
Created March 24, 2013 19:25
Hide the iTerm2 Dock icon.
/usr/libexec/PlistBuddy -c 'Add :LSUIElement bool true' /Applications/iTerm.app/Contents/Info.plist
@zziuni
zziuni / stuns
Created September 18, 2012 08:05
STUN server list
# source : http://code.google.com/p/natvpn/source/browse/trunk/stun_server_list
# A list of available STUN server.
stun.l.google.com:19302
stun1.l.google.com:19302
stun2.l.google.com:19302
stun3.l.google.com:19302
stun4.l.google.com:19302
stun01.sipphone.com
stun.ekiga.net
@jpoehls
jpoehls / main.js
Created February 17, 2012 16:33
Benchmark.js deferred
var Benchmark = require('benchmark');
var request = require('request');
var suite = new Benchmark.Suite;
// add tests
suite.add('Calling cow api', {
defer: true,
fn: function(deferred) {
request({