Skip to content

Instantly share code, notes, and snippets.

🤡
Computerin'

Ben Bleything bleything

🤡
Computerin'
Block or report user

Report or block bleything

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View interleaving_enabled_run_001
=== CPU cache information ===
CPU /sys/devices/system/cpu/cpu0 Level 1 Cache: 32K (Data)
CPU /sys/devices/system/cpu/cpu0 Level 1 Cache: 32K (Instruction)
CPU /sys/devices/system/cpu/cpu0 Level 2 Cache: 256K (Unified)
CPU /sys/devices/system/cpu/cpu0 Level 3 Cache: 12288K (Unified)
CPU /sys/devices/system/cpu/cpu1 Level 1 Cache: 32K (Data)
CPU /sys/devices/system/cpu/cpu1 Level 1 Cache: 32K (Instruction)
CPU /sys/devices/system/cpu/cpu1 Level 2 Cache: 256K (Unified)
CPU /sys/devices/system/cpu/cpu1 Level 3 Cache: 12288K (Unified)
CPU /sys/devices/system/cpu/cpu10 Level 1 Cache: 32K (Data)
View interleaving_disabled_run_001
=== CPU cache information ===
CPU /sys/devices/system/cpu/cpu0 Level 1 Cache: 32K (Data)
CPU /sys/devices/system/cpu/cpu0 Level 1 Cache: 32K (Instruction)
CPU /sys/devices/system/cpu/cpu0 Level 2 Cache: 256K (Unified)
CPU /sys/devices/system/cpu/cpu0 Level 3 Cache: 12288K (Unified)
CPU /sys/devices/system/cpu/cpu1 Level 1 Cache: 32K (Data)
CPU /sys/devices/system/cpu/cpu1 Level 1 Cache: 32K (Instruction)
CPU /sys/devices/system/cpu/cpu1 Level 2 Cache: 256K (Unified)
CPU /sys/devices/system/cpu/cpu1 Level 3 Cache: 12288K (Unified)
CPU /sys/devices/system/cpu/cpu10 Level 1 Cache: 32K (Data)
View interleaving_disabled.memtest
Memtest86+ v4.20
Core i7 (32nm) 2394 MHz
L1 Cache: 32K 79801 MB/s
L2 Cache: 256K 31500 MB/s
L3 Cache: 12288 21963 MB/s
Memory : 96G 6879 MB/s
View gist:850430
$ rake
(in /Users/ben/projects/oss/ben_string)
/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/bin/ruby -w -Ilib:bin:test:. -e 'require "rubygems"; require "test/unit"; require "test/test_ben_string.rb"' --
./lib/ben_string.rb:26:in `append_features': cyclic include detected (ArgumentError)
from ./lib/ben_string.rb:26:in `include'
from ./lib/ben_string.rb:26
from /Library/Ruby/Site/1.8/rubygems/custom_require.rb:29:in `gem_original_require'
from /Library/Ruby/Site/1.8/rubygems/custom_require.rb:29:in `require'
from ./test/test_ben_string.rb:2
from /Library/Ruby/Site/1.8/rubygems/custom_require.rb:29:in `gem_original_require'
@bleything
bleything / ubuntu-lucid-ree.erb
Created Feb 17, 2011
A chef bootstrapper that provisions the machine with REE
View ubuntu-lucid-ree.erb
<%# chef bootstrap script %>
<%# made by Estately, Inc. placed in the public domain. %>
bash -c '
<%# let's get this party started %>
apt-get update
apt-get -y install build-essential wget
<%# install REE if necessary %>
@bleything
bleything / passwords.rake
Created Feb 9, 2011
A Rakefile for managing an encrypted password file
View passwords.rake
########################################################################
### Rakefile for encrypted passwords
########################################################################
#
# Here's a little Rakefile to manage your encrypted password file! It's
# really easy to use:
#
# 1) put the email addresses of the keys you want in AUTHORIZED_USERS
# 2) create a passwords.txt (and ignore it in your SCM)
# 3) run `rake passwords:encrypt`
View gist:588427

Trick The First: filtering ps

So you know how ps piped to grep shows you the grep command?

$ ps auxww | grep bash
ben      64291   0.0  0.0  2435036    372 s001  R+   11:48AM   0:00.00 grep bash
ben      61887   0.0  0.0  2435468   1896 s001  S    11:38AM   0:00.13 -bash
ben      61376   0.0  0.0  2435468   1888 s000  S+   10:46AM   0:00.06 -bash
View gist:588404
# A faster version of which, that also prints ALL versions in your PATH,
# and accepts wildcards, e.g.: which '*uu*'. Silent if nothing found.
# Only works if test -x works...
# Modifyed by davida to only return the first match
function which() {
case $# in
0) echo Usage: which cmd ...; return 1;;
esac
dirs=`echo $PATH|sed 's/^:/. /
We couldn’t find that file to show.
View gist:579911
#!/usr/bin/env ruby
require 'time'
begin
require 'rubygems'
require 'gruff'
rescue LoadError
$stderr.puts "git-statgraph requires RubyGems and the rmagick and gruff gems"
exit 1
You can’t perform that action at this time.