This file contains hidden or 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
# Wake-On-LAN | |
# | |
# Copyright (C) 2002 by Micro Systems Marc Balmer | |
# Written by Marc Balmer, [email protected], http://www.msys.ch/ | |
# This code is free software under the GPL | |
import struct, socket | |
def WakeOnLan(ethernet_address): |
This file contains hidden or 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/bash | |
#requiere: aptitude install cowsay fortunes | |
vacas=(`ls /usr/share/cowsay/cows`) | |
TVacas=${#vacas[*]} | |
NVaca=$((RANDOM%$TVacas)) | |
vaca=${vacas[$NVaca]} | |
fortune | cowsay -f $vaca |
This file contains hidden or 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/bash | |
## BEGIN CONFIG ## | |
HOST=localhost | |
USER=root | |
PASS=12345 | |
BACKUP_DIR=$HOME/mysql_bak | |
## END CONFIG ## | |
if [ ! -d $BACKUP_DIR ]; then |
This file contains hidden or 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
=begin | |
Script para validar un archivo .yml | |
Ejemplo de uso: | |
ruby validar_yml.rb mi_archivo.yml | |
William Yanez - Nov 2010 | |
=end | |
require 'yaml' |
This file contains hidden or 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
#Backup | |
pg_dump bd | gzip -c > bd.sql.gz | |
#Restore | |
createdb dbname | |
gunzip -c filename.gz | psql dbname | |
ó | |
cat filename.gz | gunzip | psql dbname |
This file contains hidden or 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/bash | |
# | |
# Script de Instalación de VirtualBox | |
# William Yanez - actualizado al 09-01-2011 | |
# | |
# Uso: ./instalar_virtualbox.sh VERSION DISTRO | |
# | |
if [ -z "$1" ]; then | |
VERSION="4.0" | |
else |
This file contains hidden or 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
=begin | |
MigrationHelper | |
Funciones para la creacion de claves foraneas desde las migraciones | |
@author: William Yanez | |
Uso: class MyMigration < ActiveRecord::Migration | |
extend MigrationHelper | |
=end | |
module MigrationHelper |
This file contains hidden or 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/bash | |
#Instalacion de LibreOffice 3.3 | |
# author: William Yanez - 28/01/2011 | |
apt-get purge "openoffice*.*" | |
add-apt-repository ppa:libreoffice/ppa | |
aptitude update | |
aptitude install libreoffice libreoffice-l10n-es libreoffice-help-es libreoffice-gnome | |
aptitude install language-support-writing-es |
This file contains hidden or 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/bash | |
# Instalación de Turpial Rama de Desarrollo | |
git clone git://github.com/satanas/Turpial.git turpial | |
cd turpial | |
git branch --track development origin/development | |
git checkout development | |
sudo aptitude install -y python-setuptools python-pybabel python-pygame |
This file contains hidden or 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
#Instalacion de RVM en Ubuntu y Debian | |
sudo aptitude install -y curl git-core | |
curl -L https://get.rvm.io | bash -s stable | |
#type rvm | head -1 | |
#Necesario para instalar los rubies | |
sudo aptitude install -y build-essential openssl libreadline6 libreadline6-dev curl git-core zlib1g zlib1g-dev libssl-dev libyaml-dev libsqlite3-dev sqlite3 libxml2-dev libxslt-dev autoconf libc6-dev ncurses-dev automake libtool bison subversion pkg-config | |
rvm install 1.8.7,1.9.3 |
OlderNewer