Skip to content

Instantly share code, notes, and snippets.

@jcataluna
jcataluna / gist:1dc2f31694a1c301ab34dac9ccb385ea
Created July 8, 2016 17:23
Script to save all images from a docker-compose.yml file
#!/bin/bash
mkdir -p out
for img in `grep image $1| sed -e 's/^.*image\: //g'`;
do
cleanname=${img/\//-}
tag=`docker images | grep $img | awk '{print $2}'`
echo "Exporting image: $img, tag:$tag ($cleanname)..."
docker save $img -o out/$cleanname.tar
require 'goliath'
module Goliath
class Request
old_post_process = instance_method(:post_process)
define_method(:post_process) do |results|
status, headers, body = *results
# Include any data here
# All requests will pass here
@tobym
tobym / redis_pubsub_demo.rb
Created April 1, 2010 16:50 — forked from pietern/redis_pubsub_demo.rb
Redis PubSub demo with EventMachine (chat service)
# Author: Pieter Noordhuis
# Description: Simple demo to showcase Redis PubSub with EventMachine
#
# Requirements:
# - rubygems: eventmachine, thin, cramp, sinatra, yajl-ruby
# - a browser with WebSocket support
#
# Usage:
# ruby redis_pubsub_demo.rb
#