This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
db.serverStatus(); // On a mongod that is unresponsive to queries | |
{ | |
"uptime" : 13956, | |
"localTime" : "Fri May 28 2010 09:42:57 GMT-0400 (EDT)", | |
"globalLock" : { | |
"totalTime" : 13955605883, | |
"lockTime" : 1910430, | |
"ratio" : 0.00013689337575283544 | |
}, | |
"mem" : { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
db.serverStatus(); // On a mongod that is unresponsive to queries | |
{ | |
"uptime" : 13956, | |
"localTime" : "Fri May 28 2010 09:42:57 GMT-0400 (EDT)", | |
"globalLock" : { | |
"totalTime" : 13955605883, | |
"lockTime" : 1910430, | |
"ratio" : 0.00013689337575283544 | |
}, | |
"mem" : { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
avg-cpu: %user %nice %system %iowait %steal %idle | |
0.03 0.00 0.03 12.43 0.00 87.51 | |
Device: rrqm/s wrqm/s r/s w/s rsec/s wsec/s avgrq-sz avgqu-sz await svctm %util | |
sda 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 | |
sda1 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 | |
sda2 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 | |
sdb 500.00 0.00 419.00 0.50 12928.00 4.00 30.83 2.12 5.04 2.38 100.05 | |
sdb1 500.00 0.00 419.00 0.50 12928.00 4.00 30.83 2.12 5.04 2.38 100.05 | |
dm-0 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
total used free shared buffers cached | |
Mem: 128992 128681 311 0 89 127541 | |
-/+ buffers/cache: 1050 127941 | |
Swap: 2047 265 1782 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
db.people.getIndexes() | |
[ | |
{ | |
"name" : "_id_", | |
"ns" : "dnc_voters.people", | |
"key" : { | |
"_id" : 1 | |
} | |
}, | |
{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env ruby | |
require "rubygems" | |
require "faker" | |
require "csv" | |
line_count = ARGV.empty? ? 55 : ARGV.first.to_i | |
def maybe( value, percent_chance ) | |
return "" unless rand * 100 < percent_chance |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sampling process 67060 for 3 seconds with 1 millisecond of run time between samples | |
Sampling completed, processing symbols... | |
Analysis of sampling PeepOpen (pid 67060) every 1 millisecond | |
Call graph: | |
2652 Thread_1397568 DispatchQueue_1: com.apple.main-thread (serial) | |
2652 start | |
2652 macruby_main | |
2652 ruby_run_node | |
2652 rb_vm_run | |
2652 0x1014009f4 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env ruby | |
require 'rubygame' | |
include Rubygame | |
# Stuff that I had to do to get this running: | |
# | |
# brew install sdl sdl_mixer | |
# gem install rubygame rsdl | |
# Let's start by trying to play a random mp3 passed as an argument |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env ruby | |
ENV['NLS_LANG'] = 'AMERICAN_AMERICA.UTF8' | |
require 'oci8' | |
def exec( connection, sql ) | |
puts "exec: #{sql}" | |
connection.exec( sql ) { |r| puts r.join(', ') } | |
end | |
def main |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ruby-1.9.3-p125@gset: | |
system: | |
uname: "Darwin Tobys-Air.local 11.3.0 Darwin Kernel Version 11.3.0: Thu Jan 12 18:47:41 PST 2012; root:xnu-1699.24.23~1/RELEASE_X86_64 x86_64" | |
bash: "/bin/bash => GNU bash, version 3.2.48(1)-release (x86_64-apple-darwin11)" | |
zsh: "/bin/zsh => zsh 4.3.11 (i386-apple-darwin11.0)" | |
rvm: | |
version: "rvm 1.10.3 by Wayne E. Seguin <[email protected]>, Michal Papis <[email protected]> [https://rvm.beginrescueend.com/]" | |
updated: "20 minutes 46 seconds ago" |
OlderNewer