Skip to content

Instantly share code, notes, and snippets.

View rodrigobaron's full-sized avatar
👾

Rodrigo Baron rodrigobaron

👾
View GitHub Profile
@mashihua
mashihua / Capfile
Created October 12, 2011 10:40
Capistrano deploy script for node.js
load 'deploy' if respond_to?(:namespace) # cap2 differentiator
Dir['vendor/gems/*/recipes/*.rb','vendor/plugins/*/recipes/*.rb'].each { |plugin| load(plugin) }
load 'config/deploy' # remove this line to skip loading any of the default tasks
load 'config/node'
@lelandbatey
lelandbatey / whiteboardCleaner.md
Last active November 11, 2024 22:46
Whiteboard Picture Cleaner - Shell one-liner/script to clean up and beautify photos of whiteboards!

Description

This simple script will take a picture of a whiteboard and use parts of the ImageMagick library with sane defaults to clean it up tremendously.

The script is here:

#!/bin/bash
convert "$1" -morphology Convolve DoG:15,100,0 -negate -normalize -blur 0x1 -channel RBG -level 60%,91%,0.1 "$2"

Results

@skroah
skroah / gist:9c22697521626c7b388b
Last active May 10, 2021 03:50
Reactive Systems Design

##Reactive System Design Links

#Articles and Papers

@staltz
staltz / introrx.md
Last active November 17, 2024 01:08
The introduction to Reactive Programming you've been missing
@addyosmani
addyosmani / README.md
Last active October 17, 2024 13:41 — forked from 140bytes/LICENSE.txt
108 byte CSS Layout Debugger

CSS Layout Debugger

A tweet-sized debugger for visualizing your CSS layouts. Outlines every DOM element on your page a random (valid) CSS hex color.

One-line version to paste in your DevTools

Use $$ if your browser aliases it:

~ 108 byte version

@rodrigobaron
rodrigobaron / docker-compose-run
Last active August 2, 2016 07:04
Windows alternative to 'Interactive mode is not yet supported on Windows.' on docker-compose run issue
#!/bin/bash
function docker-compose-run() {
if [ "$1" = "-f" ] || [ "$1" = "--file" ] ; then
docker exec -i $(docker-compose -f $2 ps $3 |grep -m 1 $3 | cut -d ' ' -f1) "${@:4}"
else
docker exec -i $(docker-compose ps $1 | grep -m 1 $1 | cut -d ' ' -f1) "${@:2}"
fi
}
@rodrigobaron
rodrigobaron / oo_python.md
Last active September 8, 2017 16:25
Exemplo em pt-BR de separação de responsabilidade com python

Importa as dependencias

from sqlalchemy import create_engine, Column, Integer, String, ForeignKey, UniqueConstraint
from sqlalchemy.ext.declarative import declarative_base
from sqlalchemy.orm import sessionmaker, relationship, backref
@rodrigobaron
rodrigobaron / textblob_sentan_pt.py
Last active February 12, 2018 13:59
A simple POC of sentiment analisys using a small portuguese corpus
"""
A simple POC of sentiment analisys using a small portuguese corpus
- The corpus can be downloaded from here http://www.linguateca.pt/Repositorio/ReLi/ReLi-Lex.rar
please visit the page before download http://www.linguateca.pt/Repositorio/ReLi/
"""
from textblob import TextBlob
from textblob.classifiers import NaiveBayesClassifier
import os
import re
@rodrigobaron
rodrigobaron / cuda_install.sh
Created April 21, 2018 00:56
CUDA install ubuntu*
#!/bin/sh
sudo dpkg -i cuda-repo-ubuntu1604_9.0.176-1_amd64.deb
sudo apt-key adv --fetch-keys \
http://developer.download.nvidia.com/compute/cuda/repos/ubuntu1604/x86_64/7fa2af80.pub
sudo apt-get update
sudo apt-get install cuda-9-0
@rodrigobaron
rodrigobaron / google_colab_tricks.txt
Created April 25, 2018 16:32
Google Colab Tricks
#
# access gdrive
#
!apt-get install -y -qq software-properties-common python-software-properties module-init-tools
!add-apt-repository -y ppa:alessandro-strada/ppa 2>&1 > /dev/null
!apt-get update -qq 2>&1 > /dev/null
!apt-get -y install -qq google-drive-ocamlfuse fuse
from google.colab import auth
auth.authenticate_user()
from oauth2client.client import GoogleCredentials