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 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
@ipedrazas
ipedrazas / knife cheat
Last active December 13, 2021 11:50
Hello!
# 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 August 29, 2015 14:05
Use a .gemrc file with Omnibus chef-client
:sources:
- http://<%= node['gem_file']['host'] %>:<%= node['gem_file']['port'] %>/
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 April 27, 2023 15:24
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:

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?)
@aheritier
aheritier / setMaven.sh
Created May 29, 2013 08:03
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
#!/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
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 March 29, 2013 01:21
Create a Spring Integration Channel programatically and register that as a Spring bean
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;
}
What kind of new features would you be happy to see in Apache Maven new major release ?
@dgageot
dgageot / PhantomJsDownloader.java
Last active May 28, 2019 17:40
PhantomJs / GhostDriver / FluentLenium with automatic install of PhantomJs
package com.fractales.synchro.helpers.phantomjs;
import com.google.common.io.ByteStreams;
import com.google.common.io.Files;
import com.google.common.io.InputSupplier;
import com.google.common.io.OutputSupplier;
import com.google.common.io.Resources;
import java.io.File;
import java.io.FileOutputStream;