Skip to content

Instantly share code, notes, and snippets.

View lab-docker-instructions.md

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 https://beta.docker.com, 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
charlesjohnson / gemrc.erb
Last active Aug 29, 2015
Use a .gemrc file with Omnibus chef-client
View gemrc.erb
:sources:
- 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] ||= Faraday::RackBuilder.new do |b|
b.response :parse_json
b.response :gzip
+ b.response :follow_redirects
b.request :retry,
@fnichol
fnichol / README.md
Last active Nov 19, 2019
Auto-enable Local HTTP Caching in Test Kitchen
View README.md

Auto-enable Local HTTP Caching in Test Kitchen

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

Setup

  • 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
radekg / install_chef_server_11_ubuntu12.04.sh
Last active Dec 18, 2015
Install Chef Server 11 on Ubuntu 12.04 - complete
View install_chef_server_11_ubuntu12.04.sh
# run as root:
sudo bash
CHEF_HOSTNAME='...'
CHEF_VERSION='11.0.8'
UBUNTU_VERSION='12.04'
# update, upgrade, install packages
apt-get --force-yes -y update
apt-get --force-yes -y dist-upgrade
@aheritier
aheritier / setMaven.sh
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
View setMaven.sh
#!/bin/bash
MVN_VERSIONS_DIRECTORY="/Users/arnaud/Applications/"
MVN_DIRECTORY_TEMPLATE="apache-maven-"
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
exit
fi
View app.js
var config = {
"database": {
"connection": "mongodb://localhost/scrapService"
},
"cookieSecret": "EhAIj3NmtJ1sem5StHXV0Mk"
};
require("./user")
var express = require('express')
, mongoose = require('mongoose')
, User = mongoose.models["User"]
@arthurtsang
arthurtsang / DynamicServiceActivator.java
Created Mar 29, 2013
Create a Spring Integration Channel programatically and register that as a Spring bean
View DynamicServiceActivator.java
private SubscribableChannel createInputChannel(String inputChannelName) {
PublishSubscribeChannel channel = new PublishSubscribeChannel();
channel.setBeanName(inputChannelName);
channel.setBeanFactory(applicationContext);
//channel.setApplySequence(true);
((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 ?