This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- | |
-- La ciencia está en: | |
-- | |
-- * Agregar un campo en la tabla de tipo tsvector (1), en este caso se llama tsv, | |
-- podría ponérsele cualquier nombre. | |
-- * Agregar un índice GIN (2) | |
-- * Crear un trigger que cuando se inserte o actualice una tupla se actualice la | |
-- columna tsv (nuestro tsvector) | |
-- | |
-- 1. http://www.postgresql.org/docs/9.1/static/datatype-textsearch.html |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Agregue lo siguiente al final del /etc/inputrc | |
"\e[A": history-search-backward | |
"\e[B": history-search-forward | |
"\eOA": history-search-backward | |
"\eOB": history-search-forward |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Remove all lines starting with the "#" character | |
:g/^#/d | |
# Show line numbers | |
:set number | |
or | |
:set nu |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# Nagios Startup script for the Nagios monitoring daemon | |
# | |
# chkconfig: - 85 15 | |
# description: Nagios is a service monitoring system | |
# processname: nagios | |
# config: /etc/nagios/nagios.cfg | |
# pidfile: /var/nagios/nagios.pid | |
# |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# inspired by: http://wellsie.net/p/248/ | |
sudo apt-get update | |
sudo apt-get dist-upgrade | |
sudo apt-get install libgd2-xpm-dev apache2 apache2-mpm-prefork \ | |
apache2-threaded-dev apache2-utils apache2.2-bin \ | |
apache2.2-common libapache2-mod-php5 php5 gcc g++ \ | |
make daemon libnet-snmp-perl libperl5.14 libpq5 \ | |
libradius1 libsensors4 libsnmp libcgi-pm-perl \ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env tcsh | |
foreach i (`cat access.log | cut -d \] -f1 | cut -d \[ -f2 | cut -d \: -f1 | perl -ne 'print unless $seen{$_}++' `) | |
printf "$i -> " | |
printf `grep $i access.log | awk '{print $1}' | sort | uniq | wc -l` | |
echo " different IPs" | |
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
if v:progname =~? "evim" | |
finish | |
endif | |
set sw=4 "Identation is now 4 white spaces | |
set nocompatible | |
set nomodeline | |
set backspace=indent,eol,start | |
if has("vms") | |
set nobackup " do not keep a backup file, use versions instead | |
else |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
if (req.url ~ "^/robots.txt$") { | |
if (req.http.User-Agent ~ "CloudFront") | |
{ | |
set obj.http.Content-Type = "text/plain; charset=utf-8"; | |
synthetic {"User-agent: *\nDisallow: /"}; | |
} | |
return (deliver) | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
export CLICOLOR=1 | |
export LSCOLORS=gxBxhxDxfxhxhxhxhxcxcx | |
# green, bold[reset, now, green, bold]reset, bold, pwd:> | |
export PS1="\[\e[01;32m\]\[\e[1m\][\[\e[0m\]\t\[\e[01;32m\]\[\e[1m\]]\[\e[0m\]\[\e[1m\] \w:>\[\e[0m\] " | |
# Ctrl w, al estilo tcsh | |
stty werase undef | |
bind '"\C-w":backward-kill-word' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Use Gists to store code you would like to remember later on | |
console.log(window); // log the "window" object to the console |
OlderNewer