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
#!/sbin/runscript
# Copyright 1999-2004 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/www-servers/nginx/files/nginx-r1,v 1.1 2006/07/04 16:58:38 voxus Exp $
opts="${opts} upgrade reload configtest"
depend() {
need net
use dns logger
# config.gem "rspec", :lib => false, :version => ">=1.2.6" unless File.directory?(File.join(Rails.root, 'vendor/plugins/rspec'))
# config.gem "rspec-rails", :lib => 'spec/rails', :version => ">=1.2.6" unless File.directory?(File.join(Rails.root, 'vendor/plugins/rspec-rails'))
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"
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 = {
# 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
# 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
@cicloid
cicloid / README.md
Created May 19, 2011 16:29 — forked from bergie/README.md
Falsy Values tutorials
@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 / 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> |
# | |
# +----------------------------------------------------------------------+
find . -name '*ipa' -exec metaipa.sh {} \;