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
=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 | |
# | |
# 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
#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
=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
#!/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
#!/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
# 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): |
NewerOlder