I hereby claim:
- I am alexanderadam on github.
- I am alexanderadam (https://keybase.io/alexanderadam) on keybase.
- I have a public key whose fingerprint is B9B4 7015 798D 923C B71D 9A27 E996 062F A880 FCC0
To claim this, I am signing this object:
| #!/bin/bash | |
| # get latest docker compose released tag | |
| COMPOSE_VERSION=$(curl -s https://api.github.com/repos/docker/compose/releases/latest | grep 'tag_name' | cut -d\" -f4) | |
| # Install docker-compose | |
| sh -c "curl -L https://github.com/docker/compose/releases/download/${COMPOSE_VERSION}/docker-compose-`uname -s`-`uname -m` > /usr/local/bin/docker-compose" | |
| chmod +x /usr/local/bin/docker-compose | |
| sh -c "curl -L https://raw.githubusercontent.com/docker/compose/${COMPOSE_VERSION}/contrib/completion/bash/docker-compose > /etc/bash_completion.d/docker-compose" |
| #!/usr/bin/env sh | |
| # Download lists, unpack and filter, write to stdout | |
| curl -s https://www.iblocklist.com/lists.php \ | |
| | sed -n "s/.*value='\(http:.*=bt_.*\)'.*/\1/p" \ | |
| | xargs wget -O - \ | |
| | gunzip \ | |
| | egrep -v '^#' |
I hereby claim:
To claim this, I am signing this object:
| require "json" | |
| require "yaml" | |
| require "secure_random" | |
| class SerializableKlass | |
| YAML.mapping({ | |
| bool: { type: Bool, nilable: true}, | |
| float: { type: Float64, nilable: true}, | |
| int: { type: Int32, nilable: true}, | |
| str: { type: String, nilable: true} |
| !!! Strict | |
| %html{:xmlns => 'http://www.w3.org/1999/xhtml'} | |
| %head | |
| %meta{'http-equip' => 'Content-Type', :content => 'text/html; charset=utf-8'} | |
| %meta{:name => 'viewport', :content => 'widt=device-width, initial-scale=1.0'} | |
| %title= subject | |
| :css | |
| /* Based on The MailChimp Reset INLINE: Yes. */ | |
| /* Client-specific Styles */ | |
| #outlook a {padding:0;} /* Force Outlook to provide a "view in browser" menu link. */ |
| # lib/tasks/db.rake | |
| namespace :db do | |
| desc 'Dumps the database to db/APP_NAME.dump' | |
| task dump: :environment do | |
| cmd = nil | |
| with_config do |app, host, db, user| | |
| cmd = "pg_dump #{pg_options(host, user)} --verbose --clean --no-owner --no-acl --format=c #{db} > #{Rails.root}/db/#{app}.dump" | |
| end | |
| puts cmd | |
| exec cmd |
| require 'bundler/setup' | |
| require 'active_record' | |
| include ActiveRecord::Tasks | |
| class Seeder | |
| def initialize(seed_file) | |
| @seed_file = seed_file | |
| end |
| require 'spotify' | |
| track_link = 'https://play.spotify.com/track/7c0NJuLBfMRPpVuna4Offb' | |
| album_link = 'https://play.spotify.com/album/7impFt5ybQPaautK43RyJa' | |
| module SpotifyTest | |
| module_function | |
| def session | |
| application_key = File.binread(File.join File.dirname(__FILE__), 'spotify_appkey.key') |
There are many different provisioning tools out there, the most popular of which are Chef and Puppet. Chef uses Ruby, Puppet uses a DSL (Domain Specific Language), there are others that use simple bash too, but today we're going to focus on Chef Solo.
To get Chef working properly on your local machine you need a few things.
Make sure you use Ruby 1.9.x and not Ruby 2.x as you will get errors with the json 1.6.1 gem on 2.x. Use rbenv or RVM to manage several different Rubies on the one machine.