Skip to content

Instantly share code, notes, and snippets.

View miah's full-sized avatar
🍕
Dreaming of pizza.

Miah Johnson miah

🍕
Dreaming of pizza.
View GitHub Profile
@peplin
peplin / recipe.rb
Created July 10, 2010 01:30
S3 File Resource for Chef
# Source accepts the protocol s3:// with the host as the bucket
# access_key_id and secret_access_key are just that
s3_file "/var/bulk/the_file.tar.gz" do
source "s3://your.bucket/the_file.tar.gz"
access_key_id your_key
secret_access_key your_secret
owner "root"
group "root"
mode 0644
end
@botchagalupe
botchagalupe / gist:796787
Created January 26, 2011 15:02
Rundeck with Chef

Make sure the EC2 instance for the Rundeck server has ports 4440 and 4443

Get the JAR files from github

wget https://github.com/downloads/dtolabs/rundeck/rundeck-launcher-1.1.0.jar --no-check-certificate

Install Java

sudo apt-get install openjdk-6-jre 
@botchagalupe
botchagalupe / gist:1052428
Created June 28, 2011 22:38
Chef-Server Install Chef Recipe
include_recipe "apt"

apt_repository "apt.opscode.com" do
  uri "http://apt.opscode.com"
  components ["natty-0.10 main"]
  key "http://apt.opscode.com/packages@opscode.com.gpg.key"
  action :add
end

execute "preseed chef-server" do

@jtimberman
jtimberman / gist:1302749
Created October 21, 2011 00:00
bootstrap template that uses an encrypted data bag secret key
bash -c '
<%= "export http_proxy=\"#{knife_config[:bootstrap_proxy]}\"" if knife_config[:bootstrap_proxy] -%>
if [ ! -f /usr/bin/chef-client ]; then
apt-get update
apt-get install -y ruby ruby1.8-dev build-essential wget libruby-extras libruby1.8-extras
cd /tmp
wget <%= "--proxy=on " if knife_config[:bootstrap_proxy] %>http://production.cf.rubygems.org/rubygems/rubygems-1.6.2.tgz
tar zxf rubygems-1.6.2.tgz
cd rubygems-1.6.2
@ticean
ticean / knife.rb
Created October 21, 2011 07:25 — forked from fnichol/knife.rb
My Generic knife.rb
### Chef Solo
#
#
### Opscode Hosted Chef Server
#
# export KNIFE_USER="jdoe"
# export KNIFE_ORGNAME="acmeco"
#
# * Your Opscode client key should be at `~/.chef.d/opscode-jdoe.pem`.
# * Your Opscode validation key should be at `~/.chef.d/opscode-acmeco-validator.pem`.
@cornet
cornet / producer.rb
Created December 11, 2011 13:16
Bunny + Graphite
#!/usr/bin/ruby
#
# Quick rewrite of producer.rb from @ripienaar's excellent article here:
# http://www.devco.net/archives/2011/12/11/common-messaging-patterns-using-stomp-%E2%80%93-part-2.php
#
# This assumes you have the following grapite's carbon.conf:
#
# AMQP_HOST = localhost
# AMQP_PORT = 5672
@smukkejohan
smukkejohan / nagios
Created February 6, 2012 19:07
Nagios with Nginx configuration
server {
listen 80;
server_name nagios.example.tld;
access_log /var/log/nginx/nagios.access.log;
error_log /var/log/nginx/nagios.error.log info;
expires 31d;
root /usr/share/nagios3/htdocs;
@chetan
chetan / yardoc_cheatsheet.md
Last active May 10, 2024 02:53
YARD cheatsheet
@ordinaryzelig
ordinaryzelig / minitest_spec_expectations.md
Last active December 10, 2022 13:34
How to write MiniTest::Spec expectations

I'm a fan of MiniTest::Spec. It strikes a nice balance between the simplicity of TestUnit and the readable syntax of RSpec. When I first switched from RSpec to MiniTest::Spec, one thing I was worried I would miss was the ability to add matchers. (A note in terminology: "matchers" in MiniTest::Spec refer to something completely different than "matchers" in RSpec. I won't get into it, but from now on, let's use the proper term: "expectations").

Understanding MiniTest::Expectations

Let's take a look in the code (I'm specifically referring to the gem, not the standard library that's built into Ruby 1.9):

# minitest/spec.rb

module MiniTest::Expectations

Adrian -

I appreciate that you spent time in writing this post. I know I've been up until 2am writing similarly long ones as well. I will take responsibility for having what is likely an irrational response (I blame Twitter for that) to the term "NoOps", but I invite you to investigate why that might be. I'm certainly not the only one who feels this way, apparently, and thus far have decided this issue is easily the largest distraction in my field I've encountered in recent years. I have had the option to simply ignore my opposition to the term, and just let the chips fall where they may with how popular the term "NoOps" may or may not get. I have obviously not taken that option in the past, but I plan to in the future.

You're not an analyst saying "NoOps". Analysts are easy (for me) to ignore, because they're not practitioners. We have expectations of engineering maturity from practitioners in this field of web engineering, especially those we consider leaders. I don't have any expectations from analysts,