Skip to content

Instantly share code, notes, and snippets.

@susatadahiro
susatadahiro / aws.cfg
Created January 16, 2012 04:19
check_ec2
#/etc/nagios-plugins/config/check_aws
#
#
# 'check_aws' command definition
define command{
command_name check_ec2
command_line /usr/lib/nagios/plugins/check_aws
}
@andykent
andykent / gist:925458
Created April 18, 2011 14:31
Nginx Upstart
description "nginx http daemon"
start on runlevel [2]
stop on runlevel [016]
console owner
exec /opt/nginx/sbin/nginx -g "daemon off;"
respawn
@geemus
geemus / fog_virtualbox.rb
Created March 14, 2011 21:08
simple example of using virtualbox
require 'fog'
compute = Fog::Compute.new(:provider => 'VirtualBox')
server = compute.servers.create(:name => 'lucid', :os => 'Ubuntu')
medium = compute.mediums.create(:device_type => :hard_disk, :location => '/Users/geemus/geemus/virtualbox_poc/lucid.vmdk', :read_only => false)
storage_controller = server.storage_controllers.create(:bus => :sata, :name => 'sata')
storage_controller.attach(medium, 0)
IMPORTANT: this is outdated, go to https://github.com/netroy/Lockets
"npm install socket-io" & you are ready to go
(defn iota [t nxt stop y]
(take-while stop (iterate #(t (nxt %)) y)))
(iota identity inc #(< % 10) 1)
(def upto (fn [end start]
(iota identity inc #(< % end) start)))
(def downto (fn [end start]
(iota identity dec #(> % end) start)))