Skip to content

Instantly share code, notes, and snippets.

View dgacitua's full-sized avatar

Daniel Gacitúa dgacitua

View GitHub Profile
@dgacitua
dgacitua / nginx-html.conf
Created March 20, 2021 19:11
Nginx configuration file for a static HTML server on port 80
server {
listen 80;
server_name mydomain.org;
root /home/myuser/html;
index index.html;
try_files $uri /index.html;
}
@dgacitua
dgacitua / sources.list
Created June 10, 2018 00:49
/etc/apt/sources.list para Ubuntu 14.04
#------------------------------------------------------------------------------#
# OFFICIAL UBUNTU REPOS #
#------------------------------------------------------------------------------#
###### Ubuntu Main Repos
deb http://cl.archive.ubuntu.com/ubuntu/ trusty main restricted universe multiverse
deb-src http://cl.archive.ubuntu.com/ubuntu/ trusty main restricted universe multiverse
###### Ubuntu Update Repos
deb http://cl.archive.ubuntu.com/ubuntu/ trusty-security main restricted universe multiverse
@dgacitua
dgacitua / docker-compose.yml
Created June 1, 2018 01:47
RocketChat + Wekan Docker Compose configuration
version: '2'
services:
mongo:
container_name: project-db
restart: unless-stopped
image: mongo
volumes:
- ~/docker-data/project-db:/data/db
- ~/docker-data/project-backups:/backups
@dgacitua
dgacitua / jupyter-nginx-letsencrypt.conf
Created May 2, 2018 13:34
Nginx configuration file for Jupyter Notebooks and Let's Encrypt HTTPS connection (example assumes local port 8888 for Jupyter and jupyter.mydomain.info as domain)
#HTTP Server
server {
listen 80;
server_name jupyter.mydomain.info;
return 301 https://jupyter.mydomain.info$request_uri;
}
# HTTPS Server
server {
listen 443 ssl;
@dgacitua
dgacitua / mysecureapp.conf
Created May 2, 2018 00:56
Nginx configuration file that redirects a local app from an specified port (using 3000 as example) through HTTPS with Let's Encrypt
#HTTP Server
server {
listen 80;
server_name myapp.com www.myapp.com;
return 301 https://myapp.com$request_uri;
}
# HTTPS Server
server {
listen 443 ssl default_server;
@dgacitua
dgacitua / runDevDependencies.sh
Created January 29, 2018 20:41
Install and run Development Dependencies as Docker Containers (MongoDB + Solr)
#!/bin/bash
set -e
set -u
# Set local persistence directories"
MONGO_DIR="/media/linuxdata/volumes/mongo"
SOLR_DIR="/media/linuxdata/volumes/solr"
# Set Solr core name
@dgacitua
dgacitua / sources.list
Created October 28, 2017 20:06
Repositorios Debian 9 Stable ("stretch") [/etc/apt/sources.list]
# Repositorios para Debian 9 Stable ("stretch")
# Creado por Daniel Gacitúa <daniel.gacitua@usach.cl> para CGL USACH
# Debes guardar este archivo en /etc/apt/sources.list
# Actualizado el 28/10/2017
# Repos Oficiales Debian (mirrors chilenos) #
deb http://ftp.cl.debian.org/debian/ stretch main contrib non-free
deb http://ftp.cl.debian.org/debian/ stretch-updates main contrib non-free
deb http://security.debian.org/ stretch/updates main contrib non-free
@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
@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 / 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