Skip to content

Instantly share code, notes, and snippets.

@lum
lum / rspec-syntax-cheat-sheet.rb
Created March 26, 2012 04:02 — forked from dnagir/rspec-syntax-cheat-sheet.rb
RSpec 2 syntax cheat sheet by example
# RSpec 2.0 syntax Cheet Sheet by http://ApproachE.com
# defining spec within a module will automatically pick Player::MovieList as a 'subject' (see below)
module Player
describe MovieList, "with optional description" do
it "is pending example, so that you can write ones quickly"
it "is already working example that we want to suspend from failing temporarily" do
pending("working on another feature that temporarily breaks this one")
@lum
lum / graphite-centos6-install.txt
Created April 2, 2012 05:26 — forked from dillera/graphite-centos6-install.txt
Install Graphite 0.9.9 and Statsd on Centos 6
# FOR CENTOS 6
# Andrew Diller Jan 2012
# Get EPEL Repo installed
rpm --httpproxy proxy --httpport 3128 --import https://fedoraproject.org/static/0608B895.txt
rpm -Uvh http://download.fedora.redhat.com/pub/epel/6/i386/epel-release-6-5.noarch.rpm
vi /etc/yum.repos.d/epel.repo
@lum
lum / cookbook_check.rb
Created May 12, 2012 00:29
Check the cookbooks are frozen and specified in non development environments
if node.chef_environment != 'development'
cookbooks = {}
node.cookbook_collection.values.each {|c| cookbooks[c.name.to_s] = c.version.to_s }
# See https://github.com/danryan/spice
r = gem_package "spice" do
version "0.8.0"
end
r.run_action(:install)
@lum
lum / backup.sh
Created August 5, 2013 17:31 — forked from nherment/backup.sh
#!/bin/bash
# herein we backup our indexes! this script should run at like 6pm or something, after logstash
# rotates to a new ES index and theres no new data coming in to the old one. we grab metadatas,
# compress the data files, create a restore script, and push it all up to S3.
TODAY=`date +"%Y.%m.%d"`
INDEXNAME="logstash-$TODAY" # this had better match the index name in ES
INDEXDIR="/usr/local/elasticsearch/data/logstash/nodes/0/indices/"
BACKUPCMD="/usr/local/backupTools/s3cmd --config=/usr/local/backupTools/s3cfg put"
BACKUPDIR="/mnt/es-backups/"
YEARMONTH=`date +"%Y-%m"`
@lum
lum / gist:50e91042ee3b3955450a1156a32cc78b
Last active June 22, 2016 17:15
DockerCon 2016 Notes
Good
1. All the new announcements around Docker Engine 1.12 and Orchestration
2. Demo of new features coming to Docker DataCenter( UCP and DTR ).
3. Seeing how a variety of companies use Docker to solve issues
4. Talking to different vendors on their service/solution offerings to deal with issues I face using Docker
5. Hearing about the different persistant storage solutions.
6. Docker for AWS/Azure looks very interesting.
7. The Azure Demo that showed them running a hybrid cloud / local on-prem environment was very cool.
8. I love the Atlassian socks :). I have enough shirts, but socks are always useful.