Skip to content

Instantly share code, notes, and snippets.

View dstrelau's full-sized avatar

Dean Strelau dstrelau

View GitHub Profile
#!/usr/bin/env ruby
#
# mongrel_process_memory - A munin plugin to monitor memory size of
# each individual mongrel process
# Copyright (C) 2007 Ben VandenBos and Avvo, Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License version 2
# as published by the Free Software Foundation.
#
#!/usr/bin/env ruby
#
# mongrel_process_memory - A munin plugin to monitor memory size of
# each individual mongrel process
# Copyright (C) 2007 Ben VandenBos and Avvo, Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License version 2
# as published by the Free Software Foundation.
#
#!/usr/bin/env ruby
require 'rubygems'
require 'thor'
class Dscl < Thor
map "-l" => :list, "-a" => :create, "-d" => :delete
desc "list", "list known hosts"
def list
raw = `sudo dscl localhost -readall /Local/Default/Hosts`.split('-')
convert -crop 509x1+0+0 top-row.png txt:- | grep -v 'black$' | ruby -e 'STDIN.each {|line| print $1.to_i.chr if line =~ /0,\s?(\d{2,3})\)/}'
# module: source
class Source < Thor
class Clean < Thor
desc "whitespace", "Clean trailing whitespace."
method_options :extension => :optional
def whitespace
Dir.glob("./**/*#{options[:extension]}").each do |file|
next unless File.file?(file)
From 1cff7685f5a2013d3e3b13a7407ea64e21aae4de Mon Sep 17 00:00:00 2001
From: dean <dean@26634371-c258-0410-a0b0-f38a24f56ed3>
Date: Fri, 31 Oct 2008 21:50:16 +0000
Subject: [PATCH] Swizzle recipes organization
git-svn-id: svn+ssh://development.mintdigital.com/mint/svn/briarpatch/branches/caplets@73 26634371-c258-0410-a0b0-f38a24f56ed3
---
lib/caplets/plugins/apt.rb | 18 +++++++++++
lib/caplets/plugins/aptitude.rb | 18 -----------
lib/recipes/deploy.rb | 23 ++++++++++++++
alias ip-address="ifconfig eth0 | egrep 'inet[^6]' | awk '{print \$2}' | cut -c6-"
alias apt-install='sudo apt-get install'
alias apt-remove='sudo apt-get remove'
Tildeslash End User License Agreement
This end user license agreement ("Agreement") is made between
Tildeslash Ltd, a company registered in Norway with the
organization number 991506020 ("Tildeslash") and the end user
("You").
This license applies to the M/Monit Software ("the Software") and
any other machine-readable materials including, but not limited
#!/usr/bin/env ruby
# module: abc
require 'rubygems'
require 'thor'
class Abc < Thor
desc 'debug', ''
def debug
#!/usr/bin/env ruby
# module: abc
require 'rubygems'
require 'thor'
class Abc < Thor
desc 'debug', ''
def debug