Skip to content

Instantly share code, notes, and snippets.

@uasi
uasi / gist:214109
Last active September 11, 2015 03:06
Show branch name in Zsh's right prompt
#
# Show branch name in Zsh's right prompt
#
autoload -Uz VCS_INFO_get_data_git; VCS_INFO_get_data_git 2> /dev/null
setopt prompt_subst
function rprompt-git-current-branch {
local name st color gitdir action
@whiteinge
whiteinge / fabfile.py
Created November 13, 2009 17:16
Example fabric script with VirtualBox automation
# -*- coding: utf-8 -*-
"""MyCompany Fabric script.
* Deploy code
* Set up a local development environment
There are two ways to deploy the myrepo code:
1. :func:`deploy` will do a full virtualenv installation/update and expand a
tarball of the specified git revision (defaults to HEAD) to a timestamped
@jakemcgraw
jakemcgraw / pear.rb
Created February 16, 2010 18:40
Puppet PHP Pear provider
We couldn’t find that file to show.
#!/usr/bin/env ruby
require 'fileutils'
class SpecFinder
attr_reader :prefix
def initialize(prefix)
@prefix = prefix
end
@kamipo
kamipo / bench1.pl
Created August 31, 2010 18:20
JPEG画像の変換(libjpeg-turboで速くなる)
#!/usr/bin/env perl
use strict;
use warnings;
use Benchmark qw(:all);
use Image::Magick;
use Imager;
my $has_imlib = eval q{ use Image::Imlib2; 1 };
class default_node {
package { 'apache2':
ensure => installed
}
service { 'apache2':
ensure => true,
enable => true,
require => Package['apache2'],
}
}
@poutyface
poutyface / git
Created December 29, 2010 17:37
gitの使い方
githubへ登録
===========
git remote add origin git@github.com:<username>/<application_name>.git
git push origin master
初期設定
=======
git config --global user.name "Foo Bar"
git config --global user.email "foo@bar.com"
@bryanveloso
bryanveloso / aws.txt
Created January 10, 2011 00:01
Links I've find while studying the world of Amazon Web Services.
http://alestic.com/
http://distractable.net/tech/amazon-aws-ec2-vs-rackspace-high-level-comparison/
http://www.mlsite.net/blog/?p=43
http://stackoverflow.com/questions/4488793/getting-started-with-django-on-amazon-web-services
http://thomas.broxrost.com/2008/08/21/persistent-django-on-amazon-ec2-and-ebs-the-easy-way/
http://www.google.com/search?client=safari&rls=en&q=puppet+ec2&ie=UTF-8&oe=UTF-8
http://agiletesting.blogspot.com/2009/09/bootstrapping-ec2-images-as-puppet.html
http://blog.taggesell.de/index.php?/archives/66-Managing-Amazon-EC2-virtual-machines-101-part-1-creating-AMI-images.html
http://www.google.com/search?client=safari&rls=en&q=ec2+101&ie=UTF-8&oe=UTF-8
http://paulstamatiou.com/how-to-getting-started-with-amazon-ec2
@bobpp
bobpp / com.github.mxcl.homebrew.daemontools.plist
Created February 13, 2011 06:47
daemontools at Mac OS X homebrew
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>Label</key>
<string>com.github.mxcl.homebrew.daemontools</string>
<key>ProgramArguments</key>
<array>
<string>/usr/local/bin/svscanboot</string>
</array>
@justinvoss
justinvoss / fabfile.py
Created June 20, 2011 16:05
Example Fabric and Cuisine Scrips
from deployment.cuisine import *
from fabric.api import *
from fabric.context_managers import *
from fabric.utils import puts
from fabric.colors import red, green
import simplejson
import os