Skip to content

Instantly share code, notes, and snippets.

View wfarr's full-sized avatar
:shipit:
shipping

Will Farrington wfarr

:shipit:
shipping
View GitHub Profile
puts "test"
@wfarr
wfarr / disk_inode_usage.rb
Created February 4, 2011 16:32
WIP scout plugin for monitoring disk inodes
class DiskInodeUsage < Scout::Plugin
# Heavily borrowed from Scout's DiskUsage plugin
DF_RE = /\A\s*(\S.*?)\s+(\S+)\s+(\S+)\s+(\S+)\s+(\S+)\s+(\S+)\s*\z/
def parse_file_systems(io, &line_handler)
line_handler ||= lambda { |row| pp row }
headers = nil
row = ""
io.each_line do |line|
#!/bin/env ruby
# Matches on pattern for all bins in all paths
if !ARGV[0]
puts "Requires a pattern"
exit
end
pattern = ARGV[0]
paths = ENV['PATH'].split(':').uniq
(eval-after-load 'rcirc
'(progn
(require 'rcirc-notify)
(setq rcirc-notify-timeout 90)
(setq rcirc-notify-sticky t)))
(require 'color-theme)
(color-theme-initialize)
(color-theme-tango-2)
curl -G http://github.com/wfarr/color-theme-tango-2/tarball/master | tar zxf
mv wfarr-color-theme-tango-2-* color-theme-tango-2
git submodule add git://github.com/wfarr/color-theme-tango-2.git vendor/color-theme-tango-2
@wfarr
wfarr / foo.rb
Created February 25, 2010 23:37
#!/bin/env ruby
puts "This is ruby ftw"
[1,2,3].each do |foo|
puts foo
end
set stal=0
set guioptions-=T
set guioptions-=r
set guioptions-=L
class PostsController < ApplicationController
before_filter :authenticate_admin!, :only => [:create, :new, :update, :edit, :destroy]
# ...
end