Skip to content

Instantly share code, notes, and snippets.

View cicloid's full-sized avatar
🏠
Working from home

Gustavo Barron cicloid

🏠
Working from home
View GitHub Profile
@cicloid
cicloid / .tmux.conf
Created August 6, 2012 19:05
My TMUX Conf
# Setting the prefix from C-b to C-a
set -g prefix C-a
# Free the original Ctrl-b prefix keybinding
unbind C-b
#setting the delay between prefix and command
set -sg escape-time 1
# Ensure that we can send Ctrl-A to other apps
bind C-a send-prefix
# Set the base index for windows to 1 instead of 0
set -g base-index 1
@cicloid
cicloid / gist:3173324
Created July 24, 2012 23:22
Check is Mountain Lion is available
#!/bin/csh
while (1)
curl -silent -A "iMacAppStore/1.0.1 (Macintosh; U; Intel Mac OS X 10.7.4; en) AppleWebKit/533.20.25" 'http://itunes.apple.com/WebObjects/MZStore.woa/wa/viewGrouping?id=29526&mt=12' | grep -i "mountain lion" > /dev/null
if ($? == 0) then
echo "Available"
say -v Vicki "MOUNTAIN LION MAY BE AVAILABLE. Go... go now and download it"
else
echo "Nada"
endif
sleep 600
find . -name '*ipa' -exec metaipa.sh {} \;
@cicloid
cicloid / AlwaysMountRootFSWithNoatime_MacOSX.sh
Created June 19, 2012 19:56 — forked from pklaus/AlwaysMountRootFSWithNoatime_MacOSX.sh
SSD Optimizations of Mac OS X 10.6 Operating System
#!/bin/bash
# +----------------------------------------------------------------------+
# | |
# | Mount the root file system / with the option noatime |
# | |
# | By Philipp Klaus <http://blog.philippklaus.de> |
# | Tip found on <http://blogs.nullvision.com/?p=275> |
# | |
# +----------------------------------------------------------------------+
@cicloid
cicloid / ubuntu-11.10-gems.erb
Created October 28, 2011 22:49
Ubuntu 11.10 Chef Bootstrap with RBEnv
bash -c '
<% if knife_config[:bootstrap_proxy] -%>
(
cat <<'EOP'
<%= "proxy = #{knife_config[:bootstrap_proxy]}" %>
EOP
) > ~/.curlrc
<% end -%>
if [ ! -f /usr/bin/chef-client ]; then
@cicloid
cicloid / README.md
Created May 19, 2011 16:29 — forked from bergie/README.md
Falsy Values tutorials
# Make gems available
require 'rubygems' rescue nil
require 'irb' rescue nil
require 'yaml'
Bundler.require(:default, :console) if defined?(Bundler)
alias q exit
class Object
def local_methods
# This works with steak 0.3.x and rspec 1.x
# For steak --pre and rspec 2 see this fork: http://gist.github.com/448487
# Put this code in acceptance_helper.rb or better in a new file spec/acceptance/support/javascript.rb
Spec::Runner.configure do |config|
config.before(:each) do
Capybara.current_driver = :selenium if options[:js]
end
require 'digest/sha1'
module EasyAuth
# http://techspeak.plainlystated.com/2010/03/drop-dead-simple-authentication-for.html
# To generate a hashed password (in irb):
# require 'easy_auth'
# EasyAuth.hash('my_password') # Put this in AUTHORIZED_USERS
AUTHORIZED_USERS = {
set :application, "example.com"
set :deploy_to, "/var/www/#{application}"
role :app, "example.com"
role :web, "example.com"
role :db, "example.com", :primary => true
set :scm, :git
set :repository, "ssh://shay@example.com/git/example.com"
set :branch, "origin/master"