Skip to content

Instantly share code, notes, and snippets.

View neilberget's full-sized avatar

Neil Berget neilberget

View GitHub Profile
This tool is used to compare microbenchmarks across two versions of code. It's
paranoid about nulling out timing error, so the numbers should be meaningful.
It runs the benchmarks many times, scaling the iterations up if the benchmark
is extremely short, and it nulls out its own timing overhead while doing so. It
reports results graphically with a text interface in the terminal.
You first run it with --record, which generates a JSON dotfile with runtimes
for each of your benchmarks. Then you change the code and run again with
--compare, which re-runs and generates comparison plots between your recorded
and current times. In the example output, I did a --record on the master
@wsargent
wsargent / docker_cheat.md
Last active August 31, 2023 12:10
Docker cheat sheet
@itsderek23
itsderek23 / Dockerfile
Created August 27, 2013 02:09
Example Docker File to start a Rails app located in a local ./docker-rails directory.
# docker build -t="rails" .
FROM ubuntu:12.04
RUN apt-get update
## MYSQL
RUN apt-get install -y -q mysql-client libmysqlclient-dev
## RUBY
@JohnMurray
JohnMurray / console.rb
Created May 31, 2012 15:41
An example console from my geofence-server-example project
#!/usr/bin/env ruby
# require all the necessary files
$: << ::File.expand_path('../src', __FILE__)
require 'app'
require 'geofence'
# at this point bundler should be setup and the :development group
# should have been included. However, just to be sure, I'm going to
# include bundler again and require the console group.
@bhenerey
bhenerey / ideal ops.md
Created May 23, 2012 19:40
ideal ops checklist

In a perfect world, where things are done well, not just quickly, I would expect to find the following when joining the company:

Documentation

  • Accurate / up-to-date systems architecture diagram

  • Accurate / up-to-date network diagram

  • Out-of-hours support plan

  • Incident management plan

@HenrikJoreteg
HenrikJoreteg / ajaxfileupload.js
Created April 26, 2012 19:47
AJAX file uploading using jQuery and XMLHttpRequest 2.0 and adding listener for progress updates
// grab your file object from a file input
$('#fileInput').change(function () {
sendFile(this.files[0]);
});
// can also be from a drag-from-desktop drop
$('dropZone')[0].ondrop = function (e) {
e.preventDefault();
sendFile(e.dataTransfer.files[0]);
};
@paulirish
paulirish / rAF.js
Last active March 22, 2024 00:00
requestAnimationFrame polyfill
// http://paulirish.com/2011/requestanimationframe-for-smart-animating/
// http://my.opera.com/emoller/blog/2011/12/20/requestanimationframe-for-smart-er-animating
// requestAnimationFrame polyfill by Erik Möller. fixes from Paul Irish and Tino Zijdel
// MIT license
(function() {
var lastTime = 0;
var vendors = ['ms', 'moz', 'webkit', 'o'];
@kossnocorp
kossnocorp / USAGE.md
Created May 13, 2011 12:26
MacVim with Drawer compile manual

Clone & Build

curl https://gist.github.com/raw/970438/caff9a09ed2d223b1123a69ede17cb19ad352af9/build.sh | sh