Skip to content

Instantly share code, notes, and snippets.

View bryanwb's full-sized avatar

Bryan Berry bryanwb

View GitHub Profile
@bryanwb
bryanwb / vpc.yml
Created July 9, 2015 10:05
how to DRY this up?
- command: "aws ec2 describe-subnets --filters Name=tag:Tier,Values=pub Name=vpc-id,Values={{aws_vpc_id}}"
register: awscli
- set_fact:
pub_subnets: "{{awscli.stdout | from_json}}"
- set_fact:
pub_subnet: "{{pub_subnets['Subnets']|first}}"
- set_fact:
pub_subnet_id: "{{pub_subnet['SubnetId']}}"
@bryanwb
bryanwb / sbt
Created February 21, 2015 14:55
sbt shell script
#!/bin/sh
if [ -f "$HOME/.sbtconfig" ]; then
echo "Use of ~/.sbtconfig is deprecated, please migrate global settings to /usr/local/etc/sbtopts" >&2 . "$HOME/.sbtconfig"
fi
exec "/usr/local/Cellar/sbt/0.13.7/libexec/sbt" "$
var fs = require('fs');
var rmrf = require('rimraf');
var path = require('path');
var Q = require('q');
require('colors');
var chai = require("chai");
var chaiAsPromised = require("chai-as-promised");
chai.use(chaiAsPromised);
chai.should();
require('colors');
var chai = require("chai");
var chaiAsPromised = require("chai-as-promised");
chai.use(chaiAsPromised);
chai.should();
var wd = require('wd');
// enables chai assertion chaining
chaiAsPromised.transferPromiseness = wd.transferPromiseness;
---
platforms:
- name: vagrant-ubuntu-12.04
driver_config:
box: opscode-ubuntu-12.04
box_url: https://opscode-vm.s3.amazonaws.com/vagrant/opscode_ubuntu-12.04_provisionerless.box
require_chef_omnibus: true
customize:
memory: 1024
network:
@bryanwb
bryanwb / default.rb
Created July 31, 2013 08:43
prototype for build lwrp
# this is an example of the build LWRP
# based on the configuration DSL from https://github.com/opscode/omnibus-ruby
# and to be used together w/ thunderball
# thunderball downloads from a pre-configured s3 bucket, node[:thunderball][:bucket]
thunderball "nginx" do
url 'nginx-1.2.3.tgz'
end
# simplest example
@bryanwb
bryanwb / default.rb
Created July 31, 2013 08:43
prototype for build lwrp
# this is an example of the build LWRP
# based on the configuration DSL from https://github.com/opscode/omnibus-ruby
# and to be used together w/ thunderball
# thunderball downloads from a pre-configured s3 bucket, node[:thunderball][:bucket]
thunderball "nginx" do
url 'nginx-1.2.3.tgz'
end
# simplest example
@bryanwb
bryanwb / gist:5788068
Created June 15, 2013 13:07
elixir question
# how does the handle_cast :push change the stack variable?
defmodule Stacker.Server do
use GenServer.Behaviour
def init(stack) do
{ :ok, stack }
end
def handle_call(:pop, _from, [h|stack]) do
{ :reply, h, stack }
@bryanwb
bryanwb / gist:5776304
Last active December 18, 2015 11:29
gemspec
$:.unshift(File.dirname(__FILE__) + '/lib')Gem::Specification.new do |gem|
gem.authors = ["Greg Symons"]
gem.email = ["mkent@magoazul.com"]
gem.description = %q{lvm attrs}
gem.summary = %q{lvm attrs}
gem.homepage = ""
gem.executables = [ 'bin/generate_field_data' ]
gem.files = `git ls-files`.split($\)
gem.test_files = gem.files.grep(%r{^(test|spec|features)/})
According to wikipedia,
The term DevOps refers to the emerging understanding of the interdependence of development and operations in meeting a business' goal to producing timely software products and services.
For many people DevOps == "Infrastructure as Code"
For the industry, it may end up meaning "Sysadmins who write Ruby and run infrastructures on top of AWS"