Skip to content

Instantly share code, notes, and snippets.

View out.json
{
"all_heroes": {
"assists_healing_done": 109494,
"assists_recon_assists": 10,
"assists_teleporter_pads_destroyed": 1,
"average_damage_done_average": 5640,
"average_deaths_average": 6.04,
"average_eliminations_average": 13.03,
"average_final_blows_average": 7.28,
"average_healing_done_average": 905,
View glide-install.sh
#!/usr/bin/env bash
set -e
# You can override GLIDE_VERSION to get a different version
GLIDE_VERSION=${GLIDE_VERSION:-0.9.3}
# Try to auto-detect kernel and arch
KERNEL=`uname -s | awk '{print tolower($0)}'`
ARCH=`uname -m`
View benchcmpvsnil_test.go
package benchcmpvsnil
import (
"testing"
)
func BenchmarkNilPtrNil(b *testing.B) {
for i := 0; i < b.N; i++ {
isNilPtr(nil)
}
@jcoene
jcoene / riakpbc-close-test.go
Created Feb 23, 2014
riakpbc panic test case
View riakpbc-close-test.go
package main
import (
"fmt"
"log"
"github.com/mrb/riakpbc"
)
func main() {
View gist:5034155
#!/usr/bin/ruby
# This program adds up the numbers 1 through 10,000 using 100 threads.
# Challenge A: Does this solution have any problems? If so, explain.
# Challenge B: Propose an alternate implementation that does not use threads.
require "thread"
mt_result = 0
@jcoene
jcoene / strangle_itunes_match.sh
Created Sep 9, 2011
Why would Steve do this to me?
View strangle_itunes_match.sh
sudo ipfw pipe 1 config bw 80KByte/s
sudo ipfw add 1 pipe 1 dst-ip 72.21.0.0/16 dst-port 443
sudo ipfw add 2 pipe 1 dst-ip 17.152.0.0/16 dst-port 443
View after_initizlialize_test.rb
require 'rubygems'
puts ENV["GEM_HOME"]
require 'mongoid'
require 'mongoid/version'
class RapSupahStah
include Mongoid::Document
cache
attr_accessor :mode