Skip to content

Instantly share code, notes, and snippets.

@gabriellima
gabriellima / nginx.conf
Created October 20, 2016 13:25 — forked from timmyomahony/nginx.conf
Python, UWSGI, Supervisor & Nginx
upstream uwsgi {
ip_hash;
server 127.0.0.1:40000;
}
server {
listen 80;
server_name www.domain.com;
root /sites/mysite/;
access_log /sites/mysite/log/nginx/access.log;
@gabriellima
gabriellima / bootstrap_config.json
Created August 3, 2016 11:10 — forked from anonymous/config.json
Bootstrap Customizer Config
{
"vars": {
"@gray-base": "#000",
"@gray-darker": "lighten(@gray-base, 13.5%)",
"@gray-dark": "lighten(@gray-base, 20%)",
"@gray": "lighten(@gray-base, 33.5%)",
"@gray-light": "lighten(@gray-base, 46.7%)",
"@gray-lighter": "lighten(@gray-base, 93.5%)",
"@brand-primary": "darken(#428bca, 6.5%)",
"@brand-success": "#5cb85c",
@gabriellima
gabriellima / gist:1854127
Created February 17, 2012 15:55
ciberglo.zsh-theme
# Based on gnzh theme
# load some modules
autoload -U colors zsh/terminfo # Used in the colour alias below
colors
setopt prompt_subst
# make some aliases for the colours: (coud use normal escap.seq's too)
for color in RED GREEN YELLOW BLUE MAGENTA CYAN WHITE; do
eval PR_$color='%{$fg[${(L)color}]%}'
@gabriellima
gabriellima / gist:1838258
Created February 15, 2012 19:15
Preview every oh-my-zsh theme
# by Gabriel Lima (http://github.com/gabriellima) (@glima5)
# dependency: xterm
# ALERT: this will probably use a lot of processing, depending on how many themes (*.zsh-theme) are present
cd $HOME/.oh-my-zsh/themes
for theme in $(ls | sed s'/.zsh-theme$//'); do
ZSH_THEME=$theme xterm -hold -bc -geometry 120x30 -bg #333 -fg #999 -e "echo $theme; cd ~/.oh-my-zsh; zsh" &;
done
@gabriellima
gabriellima / gist:1828218
Created February 14, 2012 17:14
custom apt-fast (based on 0.02 by Matt Parnell)
# !/bin/sh
# CUSTOM version by Gabriel Lima (http://www.github.com/gabriellima) (@glima5)
# * Check portuguese (pt_BR) apt-get output
# * support '--force-yes' param to pass through user response
# * pass '-n10' to axel, to use 10 connections instead of default number
# * show packages installed or upgraded in the end of command execution
# apt-fast v0.02 by Matt Parnell http://www.mattparnell.com, this thing is fully open-source
# if you do anything cool with it, let me know so I can publish or host it for you
@gabriellima
gabriellima / remove_unwanted_email.py
Created October 28, 2011 18:20
Remove all unwanted email from open mail (based on NeoMail)
from splinter.browser import Browser
from selenium.common.exceptions import StaleElementReferenceException
class SpamRemover(object):
"""This script will attempt to delete until no more mail from
given sender is found in view."""
def __init__(self, mail_url):
"""After browser is open, you need to login by yourself."""