Skip to content

Instantly share code, notes, and snippets.

@stephenlauck
stephenlauck / README.md
Last active August 29, 2015 14:04
chef_local_dev_setup_hp

Local Development Setup for Chef

Download and install

chef-dk

Neckbeard Way

Download and install

virtual box

@stephenlauck
stephenlauck / setup.md
Last active August 29, 2015 14:02
Wndows local development setup for Chef

download virtual box

download vagrant

downlaod chef

download git

download sublime text

@stephenlauck
stephenlauck / python_27_centos_65.md
Last active August 29, 2015 14:00
Steps to locally test Python cookbook and install 2.7 on CentOS 6.5
@stephenlauck
stephenlauck / friends_invite.js
Created March 7, 2014 19:37
Facebook Event Invite All Friends List
javascript:elms=document.getElementsByName("checkableitems[]");for (i=0;i<elms.length;i++){if (elms[i].type="checkbox" )elms[i].click()}
@stephenlauck
stephenlauck / ini_to_hash.rb
Created February 28, 2014 17:35
Convert INI file to Hash in Ruby
#!/usr/bin/env ruby
require 'pp'
ini = Hash.new
cur_section = nil
File.open("Test.ini").each do |line|
#!/usr/bin/env ruby
require 'rubygems'
require 'chef/knife'
Chef::Config.from_file(File.join(Chef::Knife.chef_config_dir, 'knife.rb'))
rest = Chef::REST.new(Chef::Config[:chef_server_url])
Chef::Node.list.each do |node|
%w{read update delete grant}.each do |perm|
@stephenlauck
stephenlauck / cookbook_migrate.rb
Created December 19, 2013 01:00
Migrates cookbooks out of chef repo to own git repo org
#!/usr/bin/env ruby
require 'rubygems'
require 'chef'
require 'chef/knife/cookbook_metadata_from_file'
require 'chef/knife/cookbook_metadata'
require 'mixlib/shellout'
require 'json'
require 'pp'
require 'highline/import'
@stephenlauck
stephenlauck / gist:7740869
Created December 1, 2013 21:12
Juicer Bloody Mary
Juicer Bloody Marys (8-10 servings)
8-10 large roma or medium slicer tomatoes
1 stalk of celery (use small ribs and leaves as garnish)
1 large cucumber
1 green bell pepper
1 jalapeno (pull out the seeds and ribs if you like it mild)
2 carrots
1 clove of garlic
2 limes
@stephenlauck
stephenlauck / workstation_history
Created August 21, 2013 06:14
Configure remote workstation for development
1 sudo passwd
2 ls
3 uname -a
4 apt-get install build-essenatial git
5 apt-get install build-essential git
6 curl -L https://www.opscode.com/chef/install.sh | sudo bash
7 echo 'export PATH="/opt/chef/embedded/bin:$PATH"' >> ~/.bash_profile && source ~/.bash_profile
8 mkdir -p /var/chef/cache /var/chef/cookbooks/emacs
9 : wget -qO- https://github.com/opscode-cookbooks/chef-server/archive/master.tar.gz | tar xvzC /var/chef/cookbooks/chef-server --strip-components=1
10 wget -qO- https://github.com/opscode-cookbooks/emacs/archive/master.tar.gz | tar xvzC /var/chef/cookbooks/emacs --strip-components=1
@stephenlauck
stephenlauck / 3_floyds_zombie_dust.beerspec
Created August 13, 2013 04:18
Beer recipe for 3 Floyd's Zombie Dust for collaboration.
3 Floyd’s - Zombie Dust
Batch Size: 6 gallons
Estimated Original Gravity: 1.065
Estimated Final Gravity: 1.018
Estimated Color: 8.5 SRM
Bitterness: 65.9 IBU
Mash Temp: 154 F
60 min boil