Skip to content

Instantly share code, notes, and snippets.

View andredublin's full-sized avatar
🐝
buzz

Andre Dublin andredublin

🐝
buzz
View GitHub Profile
@andredublin
andredublin / gist:3752002
Created September 19, 2012 20:22
Skype-Style Firewall Busting with Ruby and UDP
# From
# http://www.rubyinside.com/skype-style-firewall-busting-with-ruby-and-udp-399.html
require 'socket'
remote_host = ARGV.first
# Punches hole in firewall
punch = UDPSocket.new
punch.bind('', 6311)
@andredublin
andredublin / prepare_duck.rb
Created September 28, 2012 15:16
How to make this duck quack for both its data and behavior messages?
module Preparable
def chat
puts "Hi"
end
def speak
puts "there"
end
@import "compass/utilities/sprites/base";
// General Sprite Defaults
// You can override them before you import this file.
$icon-sprite-base-class: ".icon-sprite" !default;
$icon-sprite-dimensions: false !default;
$icon-position: 0% !default;
$icon-spacing: 0 !default;
$icon-repeat: no-repeat !default;
data:text/html, <style type="text/css">#e{position:absolute;top:0;right:0;bottom:0;left:0;}</style><div id="e"></div><script src="http://d1n0x3qji82z53.cloudfront.net/src-min-noconflict/ace.js" type="text/javascript" charset="utf-8"></script><script>var e=ace.edit("e");e.setTheme("ace/theme/monokai");e.getSession().setMode("ace/mode/ruby");</script>

Vagrant Setup

This tutorial guides you through creating your first Vagrant project.

We start with a generic Ubuntu VM, and use the Chef provisioning tool to:

  • install packages for vim, git
  • create user accounts, as specified in included JSON config files
  • install specified user dotfiles (.bashrc, .vimrc, etc) from a git repository

Afterwards, we'll see how easy it is to package our newly provisioned VM

rsync -avz /path/to/local/sync/folder -e "ssh -i /path/to/ssh/key" ubuntu@ec2instance:/path/to/remote/sync/folder
@andredublin
andredublin / git-deploy
Created December 22, 2015 02:20 — forked from mgirouard/git-deploy
A minimal git deployment script
#!/bin/bash
git push $1 +HEAD:master
git fetch $1
git push origin --tags