Skip to content

Instantly share code, notes, and snippets.

View juanisierra's full-sized avatar

Juan Ignacio Sierra juanisierra

  • Barcelona, Spain
View GitHub Profile
@juanisierra
juanisierra / proxies.json
Created July 19, 2018 17:41
Azure static sites deployment proxies
{
"$schema": "http://json.schemastore.org/proxies",
"proxies": {
"root": {
"matchCondition": {
"route": "/"
},
"backendUri": "https://<blob url>/<container name>/site/index.html"
},
"static": {
@juanisierra
juanisierra / journal.sh
Last active October 22, 2016 21:03
Adds short notes into github repositories and auto-commits them
#!/bin/bash
#Absolute path to the file containing the notes (inside an SSH-cloned repository)
fileDIR=/home/juani/Documentos/journal/misc/
FILENAME=notes.md
ping -q -w 1 -c 1 `ip r | grep default | cut -d ' ' -f 3` > /dev/null && (cd $fileDIR && git pull) || echo 'Error, no hay conexion a internet, no se pudo pullear'
cd $FILEDIR
echo "* "$1" " >> $fileDIR$FILENAME
ping -q -w 1 -c 1 `ip r | grep default | cut -d ' ' -f 3` > /dev/null && (cd $fileDIR && git add . && git commit -m "autoCommit" && git push) || echo 'Error, no hay conexion a internet, no se pudo pushear'