Simple and easy, just:
mkdir apt-cacher-ng && cd apt-cacher-ng
curl -LO https://raw.github.com/gist/1747868/Vagrantfile
vagrant up
Tail the logs perhaps?
#!/usr/bin/env ruby | |
require 'benchmark' | |
require 'optparse' | |
require 'pp' | |
require 'rubygems' | |
require 'yajl' | |
require 'chef/rest' | |
module CGrep | |
class Config |
template "/tmp/foo.rb" | |
source "foo.rb.erb" | |
cookbook "banana" | |
end |
require 'json' | |
require 'uri' | |
require 'httpclient' | |
require 'redis' | |
require 'mw-irc' | |
# First, get an access token for your account on the command line | |
# curl -d '{"scopes":["repo"],"note":"Post-Receive Hooks"}' -u 'username:******' https://api.github.com/authorizations | |
# Paste your access token here |
Example of mocking out a library in Chef so you can test the provider in isolation.
If you want to test the library itself you can do more normal Ruby things.
13:15 <xQuasar> | HASKELL IS FOR FUCKIN FAGGOTS. YOU'RE ALL A BUNCH OF | |
| FUCKIN PUSSIES | |
13:15 <xQuasar> | JAVASCRIPT FOR LIFE FAGS | |
13:16 <luite> | hello | |
13:16 <ChongLi> | somebody has a mental illness! | |
13:16 <merijn> | Wow...I suddenly see the error of my ways and feel | |
| compelled to write Node.js! | |
13:16 <genisage> | hi | |
13:16 <luite> | you might be pleased to learn that you can compile | |
| haskell to javascript now |
Unionize lets you connect together docker containers in arbitrarily complex scenarios.
Note: I recommend to use https://github.com/jpetazzo/pipework instead.
Now if you want Unionize, it's still here. Just check those examples.
package main | |
import ( | |
"encoding/base64" | |
"github.com/gorilla/mux" | |
"net/http" | |
"strings" | |
) | |
func main() { |
# add this code to your .bashrc file | |
# gitpending() transverses from the current directory to | |
# inspect 1 directory level deep for any git repos that have | |
# pending changes to commit. | |
function gitpending() | |
{ | |
for d in */ ; do | |
pushd $d > /dev/null | |
DIRNAME=$(basename "$d") |