Skip to content

Instantly share code, notes, and snippets.

View yzaguirre's full-sized avatar

David yzaguirre

  • Guatemala
View GitHub Profile
@yzaguirre
yzaguirre / spool.sql
Created May 11, 2013 21:50
spooling en oracle
spool resultado.txt
select 'hola mundo' from dual;
spool off
@yzaguirre
yzaguirre / btupdater.sh
Last active December 19, 2015 18:09
Bash Script that updates Bittorrent Sync.
#/bin/bash
# based on http://forum.bittorrent.com/topic/21590-shell-script-i-wrote-to-update-btsync-on-linuxunix/
#
# Location must reside next to the "btsync" binary
#
# give execution permission
# $ chmod u+x btupdater.sh
# run like:
# ./btupdater.sh http://syncapp.bittorrent.com/1.1.33/btsync_x64-1.1.33.tar.gz
killall -2 btsync
@yzaguirre
yzaguirre / essay_1.tex
Created July 28, 2013 03:55
Un documento estructurado
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Simple Sectioned Essay Template
% LaTeX Template
%
% This template has been downloaded from:
% http://www.latextemplates.com
%
% Note:
% The \lipsum[#] commands throughout this template generate dummy text
% to fill the template out. These commands should all be removed when
@yzaguirre
yzaguirre / title_page_1.tex
Created July 28, 2013 03:56
Carátula en LaTex
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% University Assignment Title Page
% LaTeX Template
%
% This template has been downloaded from:
% http://www.latextemplates.com
%
% Original author:
% WikiBooks (http://en.wikibooks.org/wiki/LaTeX/Title_Creation)
%
@yzaguirre
yzaguirre / ejemplo.tex
Last active December 20, 2015 09:40
Ejemplo LaTex
\documentclass[10pt]{article}
\title{Primer ejemplo usando LaTex}
\author{David Y. Gonzalez}
\begin{document}
\maketitle
\date
\abstract{Esto es un ejemplo de abstract.}
\section{Introduction}
Aqui un parrafo de introduccion.
http://materias.utags.edu.mx/CCNA/ver3/sem3es/CHAPID=knet-AYhFIomYAAVnSZYg/RLOID=null/RIOID=null/knet/31AYhFIol4BQhZCAUA/chapterframeset.html
@yzaguirre
yzaguirre / script.sh
Created August 24, 2013 03:13
configurar IP Estática en Linux Microcore sin utilizar el excelente editor vi. Ejectuar los 2 comandos en calidad de root user
echo $'\nifconfig eth0 LA_IP_MICROCORE netmask LA_MASCARARED up\nroute add default gw LA_IP_GATEWAY eth0' >> /opt/bootloader.sh
filetool.sh -b
@yzaguirre
yzaguirre / backupP3
Last active December 24, 2015 10:29
Crea un .tar.gz de una carpeta como respaldo
#!/bin/bash
# idea http://jstr.se/archives/bash-backup-script-using-tar/
# instalacion:
# $ mkdir ~/bin ~/backup
# $ vim ~/bin/backupP3
# $ chmod u+x ~/bin/backupP3
# uso:
# $ backupP3 "dhcp funcionando"
cd ~/gns3/Projects # donde se ubican proyectos gns3
filename=P3Redes2_`date +'%d-%m-%Y_%H.%M.%S'`\ $1.tar.gz
@yzaguirre
yzaguirre / unwrap3.sh
Last active August 29, 2015 13:58
inserta cada lista de campeones a su respectivo fact
#!/bin/bash
filename=champs.txt
x=0
while read -r nombre
do
name_nosuff=/home/david/tmp/campeones/$nombre
x=$(($x + 13))
while read ba && read -u 3 ga && read -u 4 gw; do
# sed 's/^ )$/ \t(good_against ${ga})\n \t(good_against ${ga})\n \t(good_against ${ga})\n )/' ../src/hechos.clp
@yzaguirre
yzaguirre / unwrap2.5.sh
Created April 5, 2014 14:37
Transforma las tres categorías de cada campeón en una lista, separado por coma, cada nombre encerrado entre comillas
#!/bin/bash
filename=champs.txt
while read -r nombre
do
name_nosuff=/home/david/tmp/campeones/$nombre
# ${name_nosuff}.html > ${name_nosuff}.1.html
# sed -e 's/[ \t]*$//' aatrox.bad_against.txt | sed ':a;N;$!ba;s/\n/" "/g' | sed '1s/^/"/' | sed '$s/$/"/'
# sed -e 's/[ \t]*$//' aatrox.good_against.txt | sed ':a;N;$!ba;s/\n/" "/g' | sed '1s/^/"/' | sed '$s/$/"/'
# sed -e 's/[ \t]*$//' aatrox.good_with.txt | sed ':a;N;$!ba;s/\n/" "/g' | sed '1s/^/"/' | sed '$s/$/"/'