The idea of this gist is to document all the needed steps to setup a working machine with all the stuff that I need during development.
Command Line Tools for Xcode: Download them from XCode or directly from https://developer.apple.com/downloads
load 'deploy' if respond_to?(:namespace) # cap2 differentiator | |
load 'app/config/deploy' | |
namespace :deploy do | |
task :restart do | |
# How to restart Your Server | |
end | |
task :finalize_update do | |
['secret','database'].each do |config| |
#! /bin/sh | |
# start / stop script for mongodb | |
### BEGIN INIT INFO | |
# Provides: mongod | |
# Required-Start: \$remote_fs \$syslog | |
# Required-Stop: \$remote_fs \$syslog | |
# Default-Start: 2 3 4 5 | |
# Default-Stop: 0 1 6 |
<VirtualHost *:80> | |
ServerName osiris.firenxis.com | |
DocumentRoot /var/www/datatube/current/public | |
<Directory /var/www/datatube/current/public> | |
AllowOverride all | |
Options -MultiViews | |
</Directory> | |
</VirtualHost> |
# Ruby 1.9 Fast require: | |
# https://gist.github.com/1008945 | |
curl https://raw.github.com/gist/1008945/7532898172cd9f03b4c0d0db145bc2440dcbb2f6/load.patch > load.patch | |
# Ruby 1.9.2 GC Patch: | |
# https://gist.github.com/856296 | |
curl https://raw.github.com/gist/856296/a19ac26fe7412ef398bd9f57e61f06fef1f186fe/patch-1.9.2-gc.patch > gc.patch | |
rvm install 1.9.2-p180 --patch load.patch,gc.patch | |
rm gc.patch load.patch |
# Descargar el código | |
git clone git@github.com:ChileAgil/shapado.git | |
cd shapado | |
# Agregar repositorio oficial | |
git remote add upstream git://github.com/ricodigo/shapado.git | |
# Descargar última versión de Shapado | |
git pull upstream master | |
git push origin master |
# This goes to Rails.root/lib | |
# Requires the hashie gem | |
::AppConfig = begin | |
config_file = File.expand_path('../../config/config.yml', __FILE__) | |
config = Hashie::Mash.new YAML.load_file( config_file )[ Rails.env ] | |
local_config_file = File.expand_path('../../config/config.local.yml', __FILE__) | |
if File.exists? local_config_file | |
config.merge! YAML.load_file( local_config_file )[ Rails.env ] || {} |
// ==UserScript== | |
// @name Console Hacks | |
// @description Some minor hacks for console.fm | |
// @include http://*console.fm/* | |
var lastFm = { | |
enabled: false, | |
key: "APIKEY", | |
secret: "SECRETKEY", | |
session: "SESSIONKEY" |
// This one gets locked | |
+ (void)print1WithAddress:(NSString *)printerAddress andPort:(NSInteger)printerPort | |
{ | |
NSError *error = nil; | |
TcpPrinterConnection *connection = [[TcpPrinterConnection alloc] initWithAddress:printerAddress andWithPort:printerPort]; | |
[connection open]; | |
NSString *file = |
The idea of this gist is to document all the needed steps to setup a working machine with all the stuff that I need during development.
Command Line Tools for Xcode: Download them from XCode or directly from https://developer.apple.com/downloads
#!/bin/bash | |
# function to generate random password, on input requires an argument - lenght of password | |
genpasswd() { | |
local l=$1 | |
[ "$l" == "" ] && l=20 | |
tr -dc A-Za-z0-9_ < /dev/urandom | head -c ${l} | xargs | |
} | |
# MySQL default root password |