This gist is part of a blog post. Check it out at:
http://jasonrudolph.com/blog/2011/08/09/programming-achievements-how-to-level-up-as-a-developer
| import java.net.InetSocketAddress | |
| import java.util.concurrent.Executors | |
| import org.jboss.netty.bootstrap.ServerBootstrap | |
| import org.jboss.netty.channel.ChannelPipelineFactory | |
| import org.jboss.netty.channel.ChannelHandler | |
| import org.jboss.netty.channel.Channels | |
| import org.jboss.netty.channel.SimpleChannelUpstreamHandler | |
| import org.jboss.netty.channel.socket.nio.NioServerSocketChannelFactory | |
| import org.jboss.netty.channel.MessageEvent |
| require 'rubygems' | |
| begin | |
| require 'jmx' | |
| rescue LoadError | |
| puts "This must be run under JRuby. Sorry" | |
| exit(1) | |
| end | |
| client = JMX.connect :host => 'localhost', :port => '9998' |
| """ | |
| Fabric tunneling utilities | |
| by shn@glucose.jp | |
| class ForwardServer and relates things are refere Robey Pointer's paramiko example. | |
| (http://bazaar.launchpad.net/~robey/paramiko/trunk/annotate/head%3A/demos/forward.py) | |
| usage:: | |
| with make_tunnel('user@192.168.0.2:10022') as t: |
This gist is part of a blog post. Check it out at:
http://jasonrudolph.com/blog/2011/08/09/programming-achievements-how-to-level-up-as-a-developer
| # Source accepts the protocol region:// with the host as the bucket | |
| # access_key_id and secret_access_key are just that | |
| # for the eu-west-1 region: | |
| s3_file "/var/bulk/the_file.tar.gz" do | |
| source "s3-eu-west-1://your.bucket/the_file.tar.gz" | |
| access_key_id your_key | |
| secret_access_key your_secret | |
| owner "root" | |
| group "root" |
| apply plugin:'groovy' | |
| apply plugin:'idea' | |
| repositories { mavenCentral() } | |
| dependencies { | |
| groovy 'org.codehaus.groovy:groovy-all:1.8.2' | |
| } | |
| task makeDirs(description:'make all dirs for project setup') << { |
| apply plugin:'groovy' | |
| apply plugin:'idea' | |
| repositories { mavenCentral() } | |
| dependencies { | |
| groovy 'org.codehaus.groovy:groovy-all:1.8.4' | |
| } | |
| task makeDirs(description:'make all dirs for project setup') << { |
| web: gunicorn -w4 -b0.0.0.0:$PORT app:app |
| eventsource | |
| go-eventsource | |
| client/client |
| #!/usr/bin/env python | |
| """ | |
| This module will bootstrap a machine using chef. The purpose of this | |
| script is actually to work with AWS Auto Scaling Groups. The user data | |
| for the Launch Configuration is set to download this script and then | |
| run it. This is also stores the results in a private gist and sends | |
| a message to logstash with the results. | |
| """ |