Skip to content

Instantly share code, notes, and snippets.


If you plan to attend this workshop in a conference, as network availibility is often flaky, please check you have the following :

  • A laptop + cord
  • Install docker 1.11
    • Install with Toolbox for windows or for Mac
    • If you haven't done it already, register for the Docker for desktop beta at, and give us your hub account name during the session we can probably do something for you.
  • Test your docker installation works fine
    • docker run hello-world and check you see the welcome message
    • docker run -p 8080:80 nginx and open your browser to your machine on port 8080 and check you see nginx default page.
  • Warm up your local docker machine with the following images :
    • docker pull dockerdemos/lab-web
View knife cheat
# knife cheat
## Search Examples
knife search "name:ip*"
knife search "platform:ubuntu*"
knife search "platform:*" -a macaddress
knife search "platform:ubuntu*" -a uptime
knife search "platform:ubuntu*" -a virtualization.system
knife search "platform:ubuntu*" -a network.default_gateway
charlesjohnson / gemrc.erb
Last active Aug 29, 2015
Use a .gemrc file with Omnibus chef-client
View gemrc.erb
- http://<%= node['gem_file']['host'] %>:<%= node['gem_file']['port'] %>/
View support_redirect.patch
diff --git a/lib/berkshelf/community_rest.rb b/lib/berkshelf/community_rest.rb
index 42c51d2..b791f23 100644
--- a/lib/berkshelf/community_rest.rb
+++ b/lib/berkshelf/community_rest.rb
@@ -75,6 +75,7 @@ def initialize(uri = V1_API, options = {})
options[:builder] ||= do |b|
b.response :parse_json
b.response :gzip
+ b.response :follow_redirects
b.request :retry,
fnichol /
Last active Nov 19, 2019
Auto-enable Local HTTP Caching in Test Kitchen

Auto-enable Local HTTP Caching in Test Kitchen

Note: total experiment and hack, looks nasty, could be awesome:


  • Drop the kitchen.local.yml into $HOME/.kitchen/config.yml
  • Install polipo (with Mac: brew install polipo, with Ubuntu: apt-get install polipo)
  • Drop polipo-start and polipo-console somewhere useful (perhaps $HOME/bin?)
radekg /
Last active Dec 18, 2015
Install Chef Server 11 on Ubuntu 12.04 - complete
# run as root:
sudo bash
# update, upgrade, install packages
apt-get --force-yes -y update
apt-get --force-yes -y dist-upgrade
aheritier /
Created May 29, 2013
Script to switch between various Maven versions (One day perhaps we may have a renv, jenv, like ...) Works on MacOs Put your Maven installations under $MVN_VERSIONS_DIRECTORY
versions=`ls -1 ${MVN_VERSIONS_DIRECTORY} | grep ${MVN_DIRECTORY_TEMPLATE}'[2-9].[0-9]' | sed 's/^.*maven-//g'`
echo -e "\033[1;32mAvailable Versions:\033[0m " $versions
if [ "$1" == "" ]; then
View app.js
var config = {
"database": {
"connection": "mongodb://localhost/scrapService"
"cookieSecret": "EhAIj3NmtJ1sem5StHXV0Mk"
var express = require('express')
, mongoose = require('mongoose')
, User = mongoose.models["User"]
arthurtsang /
Created Mar 29, 2013
Create a Spring Integration Channel programatically and register that as a Spring bean
private SubscribableChannel createInputChannel(String inputChannelName) {
PublishSubscribeChannel channel = new PublishSubscribeChannel();
((ConfigurableApplicationContext)applicationContext).getBeanFactory().registerSingleton(inputChannelName, channel);
return channel;
View gist:5081375
What kind of new features would you be happy to see in Apache Maven new major release ?