Skip to content

Instantly share code, notes, and snippets.

bundler
awesome_print
net-http-spy
hirb
wirble
boson
bond
github
jekyll
archive-tar-minitar
@logankoester
logankoester / sandboxed_ads.html
Created June 14, 2012 03:33
Sandboxing 3rd-party ad code
<html>
<head>
<script type="text/javascript" src="//caja.appspot.com/caja.js"></script>
<script type="text/javascript">
caja.initialize({ cajaServer: 'https://caja.appspot.com/', debug: true });
// Force all network requests to use HTTPS.
// Prevents Insecure Content errors when the host page was loaded securely.
var uriPolicy = {
rewrite: function(uri) { return( uri.replace(/^http:/, 'https:') ); }

Wizard Island 2012

We will be camping Friday and Saturday night at sites 87 & 88 on Lake George's Long Island, one of the southernmost islands 4.41 miles by kayak from the Village.

Date Friday September 21st - Sunday September 22nd

Cost $98/person

Limit 8 wizards

@logankoester
logankoester / hydra spinner 23x16
Created November 30, 2012 15:01
hydra spinners
<style>
#facebookG{
width:23px}
.facebook_blockG{
background-color:#F27521;
border:1px solid #D8D8D9;
float:left;
height:16px;
margin-left:1px;
# This configuration should feel familiar to screen & vi users.
# split windows like vim
# vim's definition of a horizontal/vertical split is reversed from tmux's
bind s split-window -v
bind v split-window -h
# move around panes with hjkl, as one would in vim after pressing ctrl-w
bind h select-pane -L
bind j select-pane -D
# This configuration should feel familiar to screen & vi users.
# split windows like vim
# vim's definition of a horizontal/vertical split is reversed from tmux's
bind s split-window -v
bind v split-window -h
# move around panes with hjkl, as one would in vim after pressing ctrl-w
bind h select-pane -L
bind j select-pane -D
@logankoester
logankoester / Gruntfile.coffee
Created July 31, 2013 07:17
Splitting an overgrown Gruntfile into multiple files
#global module:false
module.exports = (grunt) ->
# Inject project configuration from files
gruntConfigDir = __dirname + '/grunt/'
require('fs-walk').walkSync gruntConfigDir, (baseDir, filename, stat) ->
if match = filename.match(/^(.*)\.coffee$/)
grunt.config.set(match[1], require(baseDir + filename)(grunt))
, (err) -> if err then console.log(err)
@logankoester
logankoester / precompute.underscore.coffee
Created September 29, 2013 03:28
Recursively map any functions to their returned value. This function will modify the passed object.
# Recursively map any functions to their returned value.
# This function will modify the passed object.
_.mixin
precompute: (object) ->
functions = @functions object
try
keys = @keys object
objects = @filter keys, (key) =>
@isObject(object[key])
catch
@logankoester
logankoester / Gemfile
Last active December 25, 2015 04:19
Serving static nanoc output with Unicorn instead of WEBrick for faster development.
source 'https://rubygems.org'
gem 'unicorn'
gem 'rack'
gem 'rack-rewrite'
var redis = require('then-redis');
var db = redis.createClient('tcp://localhost:6379');
var express = require('express');
var app = express();
app.get('/heartbeat.php', function(req, res){ // lol not php!
db.sadd('heartbeats', req.query);
res.send('KTHXBAI');
});