Skip to content

Instantly share code, notes, and snippets.

View patcon's full-sized avatar

Patrick Connolly patcon

View GitHub Profile
@uhlenbrock
uhlenbrock / deploy.rb
Created January 25, 2010 21:47
Simple Capistrano recipe for Jekyll
set :application, 'foo'
set :repository, '_site'
set :scm, :none
set :deploy_via, :copy
set :copy_compression, :gzip
set :use_sudo, false
set :host, '127.0.0.1'
role :web, host
role :app, host
@cookbooks
cookbooks / gist:731502
Created December 7, 2010 05:24
Grit clone example
# Since Git is well structured, Grit uses a method missing (Grit::Git#method_missing) to 'systematically' execute Git commands:
require 'grit'
include Grit
gritty = Grit::Git.new('/tmp/filling-in')
gritty.clone({:quiet => false, :verbose => true, :progress => true, :branch => '37s'}, "git://github.com/cookbooks/cc-aws.git", "/tmp/cc-aws2")
# => "Initialized empty Git repository in /tmp/cc-aws2/.git/\n"
Dir.entries('/tmp/cc-aws2').size
# => 10
@easel
easel / Vagrantfile
Created January 19, 2011 20:36
puppet multi-vm vagrantfile for v0.7.0
Vagrant::Config.run do |config|
# All Vagrant configuration is done here. The most common configuration
# options are documented and commented below. For a complete reference,
# please see the online documentation at vagrantup.com.
# Every Vagrant virtual environment requires a box to build off of.
config.vm.define :fw do |fw_config|
fw_config.vm.box = "lucid64-puppet"
fw_config.vm.box_url = "https://someplace/lucid64-puppet.box"
fw_config.vm.forward_port "http", 80, 9080
@bcardarella
bcardarella / google-hangout.coffee
Created January 17, 2012 08:43
Hubot script for Google hangouts
# hangout <room name> provides a link to the proper GoogleHangout
module.exports = (robot) ->
robot.respond /(hangout|standup)\s?(.*)?/i, (msg) ->
roomname = msg.match[2] || msg.match[1]
link = "https://talkgadget.google.com/hangouts/extras/dockyard.com/"+roomname+"?authuser=0&hl=en&eid"
msg.send("Join " + roomname)
msg.send(link)
@jedi4ever
jedi4ever / gist:4177532
Created November 30, 2012 18:20
Trello for devopsdays setup
require 'trello'
include Trello
include Trello::Authorization
public_key= "your public_key"
secret = "your secret"
# https://trello.com/1/authorize?key=your_public_key&name=yourappname&response_type=token&scope=read,write,account&expiration=never
key='your key'
@tmatilai
tmatilai / README.md
Last active October 13, 2015 12:18
POC for integrating knife-ec2 and knife-solo plugins

knife-ec2-solo

Description

Proof of concept implementation to integrate knife-ec2 and knife-solo Chef Knife plugins. Adds --solo option to knife ec2 server create that uses knife solo bootstrap for bootstrapping the instance. Also other solo bootstrap options are available.

if ENV['ES_CACHE']
config.vm.provision :shell do |shell|
shell.inline = "apt-get update; apt-get install -y apt-cacher-ng bindfs; service apt-cacher-ng stop; bindfs --mirror=apt-cacher-ng:@apt-cacher-ng /vagrant/cache /var/cache/apt-cacher-ng; echo 'Acquire::http { Proxy \"http://127.0.0.1:3142\"; };' > /etc/apt/apt.conf.d/01proxy; echo 'Acquire::https::Proxy::apt.repo.enstratus.com \"DIRECT\";' >> /etc/apt/apt.conf.d/01proxy; service apt-cacher-ng start"
end
end
@santiycr
santiycr / sauce_connect_setup.sh
Last active December 14, 2015 19:49
A small bash script to download and start Sauce Connect as part of a Travis Build.
#!/bin/bash
# Setup and start Sauce Connect for your TravisCI build
# This script requires your .travis.yml to include the following two private env variables:
# SAUCE_USERNAME
# SAUCE_ACCESS_KEY
# Follow the steps at https://saucelabs.com/opensource/travis to set that up.
#
# Curl and run this script as part of your .travis.yml before_script section:
# before_script:
@whiteley
whiteley / ec2-import-keypair-all-regions.sh
Created June 19, 2013 22:16
This script copies your keypair to any regions missing it based solely on the keypair name and not the fingerprint.
#!/bin/sh
set -o errexit
set -o nounset
usage() {
echo "Usage: ${0} keypair_name public_key_file"
exit 1
}
@clone1018
clone1018 / gittip.js
Created October 9, 2013 01:34
Tip a user on irc!
var needle = require('needle');
var Plugin = (function () {
function Plugin(bot) {
this.commands = {};
this.users = {};
this.bot = bot;
this.commands = {
'gittip': 'onCommandGittip'