Skip to content

Instantly share code, notes, and snippets.

View bentruyman's full-sized avatar
🕺

Ben Truyman bentruyman

🕺
View GitHub Profile

Keybase proof

I hereby claim:

  • I am bentruyman on github.
  • I am bentruyman (https://keybase.io/bentruyman) on keybase.
  • I have a public key ASDO_5icOptXvOSHb8y3ALN6KYO3w2d2s7Ep0Zzx4ckHKgo

To claim this, I am signing this object:

@bentruyman
bentruyman / iterm-colors.itermcolors
Created September 9, 2013 20:53
My iTerm color palette.
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>Ansi 0 Color</key>
<dict>
<key>Blue Component</key>
<real>0.10051459074020386</real>
<key>Green Component</key>
<real>0.10051288455724716</real>
server {
listen 80;
server_name my-server.com;
access_log /var/log/nginx/my-server.com-access.log;
error_log /var/log/nginx/my-server.com-error.log;
root /var/www/my-server.com/public;
index index.php index.html;
@bentruyman
bentruyman / .jshintrc
Created February 26, 2013 20:21
My default .jshintrc
{
"es5": true,
"browser": true,
"curly": true,
"devel": true,
"eqeqeq": true,
"expr": true,
"forin": true,
"immed": true,
"latedef": false,
@bentruyman
bentruyman / digital-ocean-more-swap.txt
Last active December 13, 2015 20:19
A run of Unix Bench 4.1 (http://acelnmp.googlecode.com/files/unixbench-4.1.0-wht.tar.gz) on Digital Ocean, Joyent Cloud, and Linode. All of these options cost around $20/month.
CPU model : QEMU Virtual CPU version 1.0
Number of cores : 2
CPU frequency : 1999.995 MHz
Total amount of ram : 2016 MB
Total amount of swap : 3813 MB
TEST BASELINE RESULT INDEX
Dhrystone 2 using register variables 376783.7 15705333.2 416.8
Double-Precision Whetstone 83.1 1177.2 141.7
@bentruyman
bentruyman / znc-config.txt
Created November 27, 2012 17:44
My ZNC Config
AnonIPLimit = 10
Listen = +8080
ConnectDelay = 30
<User bentruyman>
Pass = ****
Nick = bentruyman
AltNick = bentruyman_
Ident = bentruyman
RealName = Ben Truyman
@bentruyman
bentruyman / vim73.sh
Created November 27, 2012 04:53
A hack to install Vim 7.3 on SmartOS
# remove any existing vim installation
pkgin rm vim-share vim
# download vim 7.3 packages
wget http://pkgsrc.smartos.org/packages/SmartOS/trunk/All/vim-share-7.3.653.tgz
wget http://pkgsrc.smartos.org/packages/SmartOS/trunk/All/vim-7.3.653.tgz
# install vim 7.3
pkg_add vim-share-7.3.653.tgz vim-7.3.653.tgz
@bentruyman
bentruyman / Custom.less
Created July 3, 2012 15:55
Tomorrow Theme for Chrome Developer Tools
/**********************************************/
/*
/* Tomorrow Skin by Ben Truyman - 2012
/*
/* Based on Chris Kempson's Tomorrow Theme:
/* https://github.com/ChrisKempson/Tomorrow-Theme
/*
/* Inspired by Darcy Clarke's blog post:
/* http://darcyclarke.me/design/skin-your-chrome-inspector/
/*
@bentruyman
bentruyman / slug.js
Created September 12, 2011 14:31
JavaScript Slug Generator
// Generates a URL-friendly "slug" from a provided string.
// For example: "This Is Great!!!" transforms into "this-is-great"
function generateSlug (value) {
// 1) convert to lowercase
// 2) remove dashes and pluses
// 3) replace spaces with dashes
// 4) remove everything but alphanumeric characters and dashes
return value.toLowerCase().replace(/-+/g, '').replace(/\s+/g, '-').replace(/[^a-z0-9-]/g, '');
};
@bentruyman
bentruyman / mongoose.GH.341.js
Created September 11, 2011 15:45 — forked from bnoguchi/mongoose.GH.341.js
mongoose GH-341.js - Response to sebm
var mongoose = require('mongoose');
mongoose.connect('mongodb://localhost/sebtest');
var Schema = mongoose.Schema;
var StackItemSchema = new Schema({
blob: Number
});
var StackSchema = new Schema({