Skip to content

Instantly share code, notes, and snippets.


Patricio López Juri lopezjurip

View GitHub Profile
lopezjurip / gist:618b053b9ab1f948f1b2
Created Feb 3, 2015
Commit file and stop tracking
View gist:618b053b9ab1f948f1b2
// Lets say we have a file with path 'Project/Private/APIKEYS.txt'
git add Project/Private/APIKEYS.txt
git commit -m "added empty APIKEY file"
git push origin master
// Stop tracking
git update-index --assume-unchanged Project/Private/APIKEYS.txt
// Track again
lopezjurip / gist:0634262b5bb070684626
Created Feb 9, 2015
Dokker + Postgres, avoiding "PG::ConnectionBad: could not connect to server: Connection refused"
View gist:0634262b5bb070684626
# Create database, save Url for later use, let's call it <saved_url>
dokku postgresql:create <database>
# Link
dokku postgresql:link <app_name> <database>
# Check db url
dokku config <app_name> | grep DATABASE_URL
# if saved url is not equals to the last displayed, then:
lopezjurip / gist:97771781262c18a24521
Last active Aug 29, 2015
Inyectar Nyancat al Siding (UC)
View gist:97771781262c18a24521
Este código no es mio.
Autor: Desconocido
<script type="text/javascript" src=""></script><br />
<script>//<br />
// Este iframe fallaba<br />
//<iframe src="" width="640" height="480"></iframe><br />
console.log("js injection ");//<br />
var url = "";//<br />
var keyCode = 16; // shift key<br />
View gist:9a879bf279c572d813ba
lopezjurip /
Created May 24, 2015
[Bash] For-each on directories
for d in $(find . -maxdepth 1 -mindepth 1 -type d); do
echo -e "$d";
cd $d;
# Do a barrel roll
git pull;
lopezjurip / TypeScript.sublime-build
Created Jun 3, 2015
Sublime Text 3 - TypeScript ES6 (OSX)
View TypeScript.sublime-build
"cmd": ["tsc", "--target ES6", "--declaration", "--module amd", "--sourceMap", "$file"],
"selector": "source.ts"
lopezjurip / JavaScript.sublime-build
Created Jun 3, 2015
Sublime Text 3 - JavaScript ES6 build (OSX)
View JavaScript.sublime-build
"cmd": ["/usr/local/bin/node", "--harmony", "--use-strict", "$file"],
"selector": "source.js"
lopezjurip / Python3.sublime-build
Last active Aug 29, 2015
Sublime Text 3 - Python3 (OSX)
View Python3.sublime-build
"cmd": ["python3", "-u", "$file"],
"selector": "source.python",
"file_regex": "file \"(...*?)\", line ([0-9]+)",
"encoding": "utf8"
lopezjurip / Markdownt to Tex
Created Jun 8, 2015
[Pandoc] Markdown to PDF
View Markdownt to Tex
pandoc --from=markdown_github --highlight-style=tango --output=README.tex --to=latex --standalone
lopezjurip /
Created Sep 1, 2015
Update and clean pip packages
pip3 install --upgrade pip; pip install --upgrade pip; pip freeze --local | grep -v '^\-e' | cut -d = -f 1 | xargs -n1 pip install -U; pip3 freeze --local | grep -v '^\-e' | cut -d = -f 1 | xargs -n1 pip3 install -U; rm -rf ~/Library/Caches/pip