Skip to content

Instantly share code, notes, and snippets.

View dgacitua's full-sized avatar

Daniel Gacitúa dgacitua

View GitHub Profile
@dgacitua
dgacitua / sources.list
Last active January 17, 2016 02:38
Repositorios para Debian Testing (Mirrors Chilenos)
# Repositorios para Debian Testing con Mirrors Chilenos
# Creado por Daniel Gacitúa <daniel.gacitua@usach.cl> para CGL USACH
# Debes guardar este archivo en /etc/apt/sources.list
# Actualizado el 16/01/2016
# Repos por Default (mirrors chilenos) #
deb http://mirrors.tecnoera.com/debian/ testing main contrib non-free
deb http://mirrors.tecnoera.com/debian/ testing-updates main contrib non-free
deb http://security.debian.org/ testing/updates main contrib non-free
@dgacitua
dgacitua / bibliografia.bib
Last active October 7, 2016 22:40
Ejemplo de Bibliografía con BibLaTeX
@book{ejemploLibro,
title = "Comunicaciones y redes de computadores",
author = "William Stallings",
publisher = "Pearson Prentice Hall",
location = "Madrid",
isbn = {8420541109 9788420541105},
date = {2004}
}
@online{ejemploSitioWeb,
@dgacitua
dgacitua / multiProcess.cpp
Last active October 9, 2015 18:37
Crear "n" procesos con fork() en C++
/*
Crear "n" procesos con fork() en C++
por Daniel Gacitúa
<danielgacituav@gmail.com>
*/
#include <iostream>
#include <cstring>
#include <cstdlib>
#include <cerrno>
@dgacitua
dgacitua / .profile
Last active April 4, 2016 15:05
Agregar variables permanentemente al PATH de Debian
# Poner al final del archivo ~/.profile
export ANDROID_HOME="$HOME/Software/android-sdk"
export PATH="$PATH:$ANDROID_HOME/tools:$ANDROID_HOME/platform-tools"
@dgacitua
dgacitua / main.cpp
Created October 14, 2015 23:13
Ejemplo básico Hola Mundo C++
#include <iostream>
int main() {
std::cout << "hi!" << std::endl;
return 0;
}
@dgacitua
dgacitua / template-dl.sh
Created October 28, 2015 18:48
Descargar Templates Wordpress o similar
#!/bin/bash
echo -n "Ingrese URL del Template a descargar: "
read url
wget -r -p -U Mozilla -e robots=off --wait 1 $url
@dgacitua
dgacitua / .openshift\action_hooks\deploy
Last active March 19, 2016 19:50
Grails + Travis CI + OpenShift support config files (see README.md)
#!/bin/bash
# OpenShift deploy action hook for Grails projects
# Based on https://github.com/ronicthomas/openshift-grails-buildpack-jbossews
set -x
USER_ENV_PATH="$OPENSHIFT_REPO_DIR/.openshift/config/.env"
[[ -f $USER_ENV_PATH ]] && source "$USER_ENV_PATH"
VERSION=`awk -F'=' '/app.grails.version/ { print $2 }' $OPENSHIFT_REPO_DIR/application.properties | tr -d '\r\n'`
@dgacitua
dgacitua / trim
Created October 2, 2016 01:19
SSD Trim Cronjob for Debian GNU/Linux
#! /bin/sh
# Save in /etc/cron.daily/trim
# Then make it executable with: sudo chmod +x /etc/cron.daily/trim
LOG=/var/log/trim.log
echo "*** $(date -R) ***" >> $LOG
fstrim -a -v >> $LOG
@dgacitua
dgacitua / runMeteor.sh
Created October 12, 2016 14:15
Script for setting MongoDB locale and avoid errors while launching Meteor
#!/bin/sh
# Run this script from the root directory of your Meteor project
export LC_ALL=es_CL.utf8
meteor
@dgacitua
dgacitua / deleteRomThumbnails.bat
Created April 29, 2017 20:34
Script removedor de thumbnails para Lakka
REM Script removedor de thumbnails para Lakka by Presi
REM Ejecutar este script en la carpeta de imágenes
REM En este directorio debe haber también una lista con los nombres de archivo a incluir, llamada "romlist.txt"
REM Para generar "romlist.txt", usar el siguiente comando en el directorio de ROMs:
REM (for %a in (".\*") do @echo %~na) > romlist.txt
@echo off