Skip to content

Instantly share code, notes, and snippets.

View therobot's full-sized avatar

Jacobo García López de Araujo therobot

View GitHub Profile
upstream my_app {
server unix:///var/run/my_app.sock;
}
server {
listen 80;
server_name my_app_url.com; # change to match your URL
root /var/www/my_app/public; # I assume your app is located at this location
location / {
@therobot
therobot / elastic-ip
Created March 29, 2013 12:50
Elastic IP corosync resource agent
#!/bin/bash
###############################################################################
# CONFIG
# AWS config
export AWS_SECRET_KEY="XXXX"
export AWS_ACCESS_KEY="XXXX"
export PATH=$PATH:/usr/local/aws/ec2/bin
export EC2_HOME=/usr/local/aws/ec2/
# Taller de Chef: Administra sistemas como Ferran Adriá cocina
## Qué es Chef
- ¿Que es?
Framework de integración de sistemas. Nos proporciona recursos y asbtracciones de alto nivel para
manejar nuestra máquina.
- ¿Para que Sirve?
- Consistencia de nuestra plataforma.
- Mayor control de la plataforma.
@therobot
therobot / gist:102770
Created April 27, 2009 22:06
Rolls back database to migration level of the previously deployed release
before "deploy:rollback:revision", "deploy:rollback_database"
desc "Rolls back database to migration level of the previously deployed release"
task :rollback_database, :roles => :db, :only => { :primary => true } do
if releases.length < 2
abort "could not rollback the code because there is no prior release"
else
rake = fetch(:rake, "rake")
rails_env = fetch(:rails_env, "production")
migrate_env = fetch(:migrate_env, "")
@therobot
therobot / gist:7059925
Last active December 25, 2015 23:49 — forked from anonymous/gist:7059898
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Frameset//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-frameset.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"></meta>
<meta content="0" http-equiv="Expires"></meta>
<meta content="no-cache" http-equiv="Cache-Control"></meta>
<meta content="no-cache/cache" http-equiv="Pragma"></meta>
<title> … </title>
<meta name="description" content="Love & Hate"></meta>
<link media="screen" type="text/css" href="css/estilo.css" rel="StyleSheet"></link>
@therobot
therobot / gist:3608014
Created September 3, 2012 09:06
Setup a virtual machine with Windows 7 and IE 9, the nice way.
First of all you have to download and install Virtual Box from its website: https://www.virtualbox.org/wiki/Downloads
After that just type in your shell:
curl -s https://raw.github.com/xdissent/ievms/master/ievms.sh | IEVMS_VERSIONS="9" bash
It will take a lot, because is a 4Gb image. The good thing is that you can stop the download with Cmd + C and run the command again to continue.
When finished, launch Virtual Box and you will find an new image that you can use. The password for the admin user is "Password1".
@therobot
therobot / gist:3314395
Created August 10, 2012 13:59 — forked from ferblape/gist:3314376
La mejor hamburguesa de Madrid™
1. Alfredos
2. New York Burger
3. Homeburger
4. Tate's
5. La vaca picada
@therobot
therobot / itunes_cleaner.rb
Created January 16, 2012 10:39
Delete songs present in the itunes music folder but not in itunes library
#!/usr/bin/env ruby
#
# Dependencies:
#
# This script requires to build and install the branch 'location' of this https://github.com/jaymcgavren/itunes-library fork of 'itunes-library'
# It also requires to install 'colorize' gem
#
# License: GPLv2
# http://www.gnu.org/licenses/gpl-2.0.html
#
@therobot
therobot / unban-ip.sh
Created July 28, 2011 17:20
Small script that stops denyhosts, delete an ip from all the blacklist files and starts denyhosts
#!/usr/bin/env ruby
base_path="/var/lib/denyhosts"
hosts_deny="/etc/hosts.deny"
denyhosts_files=%w(hosts hosts-restricted hosts-root hosts-valid users-hosts)
files=denyhosts_files.map{|file| "#{base_path}/#{file}"}.push hosts_deny
denyhosts_stop="/etc/init.d/denyhosts stop"
denyhosts_start="/etc/init.d/denyhosts start"
@therobot
therobot / gist:1093028
Created July 19, 2011 16:48
Problem with trinidad_daemon_extension
We couldn’t find that file to show.