Skip to content

Instantly share code, notes, and snippets.

View wyanez's full-sized avatar

William Yanez wyanez

View GitHub Profile
@wyanez
wyanez / install_postgresql9.sh
Created February 4, 2011 02:47
[Postgres] Instalacion de Postgresql 9.0 en Ubuntu Maverick
add-apt-repository ppa:pitti/postgresql
aptitude update
aptitude install postgresql-9.0 pgadmin3 postgresql-doc-9.0 postgresql-contrib-9.0 postgresql-server-dev-9.0
@wyanez
wyanez / openvz_date.sh
Created May 8, 2011 05:10
[OpenVZ] Modificar la hora de un contenedor OpenVZ
ln -sf /usr/share/zoneinfo/America/Caracas /etc/localtime
date
ó
dpkg-reconfigure tzdata
(risturiz)
@wyanez
wyanez / crear_vz.sh
Created May 8, 2011 05:18
[OpenVZ] Crear una maquina virtual (contenedor)
#!/bin/bash
ID=$1
IP=$2
DNS=$3
NAME=$4
DISK=$5
PASS=$6
vzctl create $ID --ostemplate debian-6.0-i386-minimal
vzctl set $ID --ipadd $IP --save
vzctl set $ID --nameserver $DNS --save
@wyanez
wyanez / crear_certificado_ssl.ssh
Created May 12, 2011 17:15
[apache] Crear Certificado para Apache y SSL
mkdir /etc/apache2/ssl
export RANDFILE=/dev/random
openssl req $@ \
-new -x509 -days 365 -nodes -out /etc/apache2/ssl/apache.pem \
-keyout /etc/apache2/ssl/apache.pem
chmod 600 /etc/apache2/ssl/apache.pem
@wyanez
wyanez / nautilus_extensiones.sh
Created May 27, 2011 03:30
Instalar extensiones para nautilus
aptitude install nautilus-clamscan nautilus-image-converter nautilus-open-terminal nautilus-pastebin nautilus-wallpaper tortoisehg-nautilus
@wyanez
wyanez / ubuntu11_install.sh
Created July 4, 2011 16:01
[Ubuntu] Instalacion de paquetes para Ubuntu 11.04
#!/bin/bash
#
# Scripts de Instalacion de Paquetes para Ubuntu 11.04 (basado en el de Ubuntu 10)
# William Yanez - 26/06/11
#
####################### FUNCIONES DE INSTALACION ###############################
#USUARIO GENERAL
function user_common(){
@wyanez
wyanez / youtube_downloader.sh
Created July 8, 2011 15:42
YouTube Downloader
#!/bin/bash
## Two arguments
# $1 Youtube URL
# $2 You name for the video
wget -c --no-check-certificate --user-agent="" $1 -qO- | sed "s/\\u0026/\&/g" | \
awk '/fmt_url_map/{gsub(/[\|\"]/,"\n");print}' | \
sed -n "/^fmt_url_map/,/videoplayback/p" | sed -e :a -e '$q;N;2,$D;ba' | tr -d "\n" | sed -e "s/\(.*\),\(.\)\{1,3\}/\1/;s/\\\//g" | \
wget -c --no-check-certificate --user-agent="" -i - -O $2.flv
@wyanez
wyanez / debian_install.sh
Last active December 28, 2016 23:46
[Debian] Scripts de Instalacion de Paquetes para Debian Squezze/Wheezy
#!/bin/bash
#
# Scripts de Instalacion de Paquetes para Debian Squezze/Wheezy (basado en el de Ubuntu 11.04)
# William Yanez - 26/07/11 (Actualizado a Septiembre 2012)
#
####################### FUNCIONES DE INSTALACION ###############################
#USUARIO GENERAL
function user_common(){
@wyanez
wyanez / ssh_config
Created August 8, 2011 14:44
[ssh]Formato del archivo de Configuración para ssh ~/.ssh/config (Permite asignar nombres logicos a las conexiones)
Host nombre_logico
Hostname 192.168.10.1
User usuario
Port 22
# Nota: Este archivo vá en: ~/.ssh/config
@wyanez
wyanez / corregir_certificado_ssl_mercurial.txt
Created August 8, 2011 16:05
[mercurial] Corregir error con certificado del servidor
Si al hacer un hg
$ hg clone https://192.168.10.205/hg/sas_2011
abort: error: _ssl.c:497: error:14090086:SSL routines:SSL3_GET_SERVER_CERTIFICATE:certificate verify failed
1) Ejecutamos esta linea en la consola:
$echo quit |openssl s_client -connect 192.168.10.205:443 2>/dev/null|awk '/---BEG/,/--END/' |openssl x509 -fingerprint -noout
2) y obtenemos:
SHA1 Fingerprint=64:A4:7F:0C:39:A4:81:00:81:BC:44:75:18:31:32:22:3F:EB:E8:BE