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 / 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 / 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/
@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.
@therobot
therobot / trinidad.log
Created July 18, 2011 16:37
Trinidad requires a default context in order to run
trinidad@t2:~/seguimiento/app/current$ jruby -S trinidad -f /etc/trinidad/trinidad.yml
Jul 18, 2011 6:37:13 PM org.apache.coyote.AbstractProtocolHandler init
INFO: Initializing ProtocolHandler ["ajp-bio-3031"]
Jul 18, 2011 6:37:13 PM org.apache.coyote.AbstractProtocolHandler init
INFO: Initializing ProtocolHandler ["http-bio-3000"]
Jul 18, 2011 6:37:13 PM org.apache.catalina.core.StandardService startInternal
INFO: Starting service Tomcat
Jul 18, 2011 6:37:13 PM org.apache.catalina.core.StandardEngine startInternal
INFO: Starting Servlet Engine: Apache Tomcat/7.0.11
2011-07-18 18:37:13 INFO: No global web.xml found
@therobot
therobot / gist:965402
Created May 10, 2011 21:20
Best emacs themes

Best emacs-themes

Execute with:

M-x color-theme-select

  • billw
  • dark-blue2
  • dark-laptop