Skip to content

Instantly share code, notes, and snippets.

Avatar

Bryan Berry bryanwb

View GitHub Profile
@bryanwb
bryanwb / vpc.yml
Created Jul 9, 2015
how to DRY this up?
View vpc.yml
- 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 Feb 21, 2015
sbt shell script
View sbt
#!/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" "$
View wdfun.js
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();
View login.js
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;
View aws_vagrant_kitchen.yml
---
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 Jul 31, 2013
prototype for build lwrp
View default.rb
# 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 Jul 31, 2013
prototype for build lwrp
View default.rb
# 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 Jun 15, 2013
elixir question
View gist:5788068
# 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 }
View gist:5776304
$:.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)/})
View gist:5581916
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"