Skip to content

Instantly share code, notes, and snippets.

Drinking mate

Hernán Rodríguez Colmeiro peregrinogris

Drinking mate
View GitHub Profile
peregrinogris /
Created May 21, 2015
Find occurrences in files
grepc $1 | awk -F':' '{print $1}' | sort | uniq -c
peregrinogris / clarin.css
Created Mar 18, 2015
Ocultar paywall en Clarín
View clarin.css
@namespace url(;
@-moz-document regexp("http://www.clarin\\.com/.*") {
#cboxOverlay, #cboxContent {
display: none !important;
peregrinogris / jsconfar.js
Created Nov 3, 2014
JSConfAR ticket sold notification
View jsconfar.js
function sendNotification(data){
new Notification("Entrada Vendida!", {icon: "", body: data.availableRegularTickets + "\n"+data.lastBuyerName.substring(0, 30).ucwords()});
function ticketSold(data) {
// Let's check if the user is okay to get some notification
if (Notification.permission === "granted") {
// If it's okay let's create a notification
peregrinogris / .gvimrc
Last active May 4, 2018
Vim Config Files
View .gvimrc
set guioptions-=r
set guioptions-=L
set guicursor=a:blinkon0
set guioptions=egmrt
hi ColorColumn guibg=#3E3D32
peregrinogris / .pylintrc
Last active Aug 29, 2015
Pylint config file. Goes under ~/.pylintrc
View .pylintrc
disable=line-too-long, too-many-locals, too-few-public-methods, no-member, invalid-name, no-init, fixme, duplicate-code, import-error, missing-docstring, old-style-class, bad-format-string, no-self-use, too-many-branches, broad-except, star-args, too-many-arguments, too-many-return-statements, bad-continuation, maybe-no-member, too-many-statements, too-many-instance-attributes, super-on-old-class
peregrinogris / pep8
Last active Aug 29, 2015
pep8 config file. Goes under ~/.config/pep8
View pep8
peregrinogris / git-lint
Last active Aug 29, 2015
Run pylint and pep8 linters on all changed and added python files, or in the current branch (by passing 'fbranch')
View git-lint
#!/usr/bin/env bash
branch=`git branch | grep '*' | awk '{print $2}'`
get_files() {
if test "$1" = "fbranch"; then
echo `git diff develop..$branch --name-status | egrep '[AM]\t' | awk '{print $2}' | grep '.py'`
echo `git status --porcelain | egrep '[AM] ' | awk '{print $2}' | grep '.py'`
peregrinogris / git-deploy
Created Aug 11, 2014
Push the current branch to remote origin and make it track the newly created remote branch.
View git-deploy
#!/usr/bin/env bash
branch=`git branch | grep '*' | awk '{print $2}'`
git push -u origin $branch
peregrinogris / git-usebranch
Last active Feb 1, 2017
Use this to checkout a branch ending with a certain string
View git-usebranch
#!/usr/bin/env bash
branch=`git branch -a | egrep -io "([^/]+/)?[^/]+$1$" | sed 's/* //' | head -1`
git checkout $branch