Skip to content

Instantly share code, notes, and snippets.

View bentruyman's full-sized avatar
🕺

Ben Truyman bentruyman

🕺
View GitHub Profile
@bentruyman
bentruyman / Custom.css
Created August 17, 2011 00:30
IR_Black Theme for Chrome Developer Tools
/**********************************************/
/*
/* IR_Black Skin by Ben Truyman - 2011
/*
/* Based on Todd Werth's IR_Black:
/* http://blog.toddwerth.com/entries/2
/*
/* Inspired by Darcy Clarke's blog post:
/* http://darcyclarke.me/design/skin-your-chrome-inspector/
/*
@bentruyman
bentruyman / Custom.css
Created August 22, 2011 19:35
Tomorrow Theme for Chrome Developer Tools
/**********************************************/
/*
/* Tomorrow Skin by Ben Truyman - 2011
/*
/* 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 / jquery-pubsub.js
Created February 14, 2011 23:16
Simple Pub/Sub Implementation for jQuery
/*
* Simple Pub/Sub Implementation for jQuery
*
* Inspired by work from Peter Higgins (https://github.com/phiggins42/bloody-jquery-plugins/blob/master/pubsub.js)
*
* This is about the simplest way to write a pubsub JavaScript implementation for use with jQuery.
*/
(function( $ ) {
// Cache of all topics
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 / express-stylus.html
Created February 13, 2011 19:27
Using Stylus Middleware with Express
<!doctype html>
<html lang="en">
<head>
<title>My Web Page</title>
<meta charset="utf-8">
<link href="/stylesheets/main.css" rel="stylesheet">
</head>
<body>
</body>
</html>

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>
@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