Skip to content

Instantly share code, notes, and snippets.

View hersonls's full-sized avatar

Herson Leite hersonls

View GitHub Profile
@hersonls
hersonls / nginx_django_project.conf
Created May 17, 2013 14:28
Nginx: Nginx, Django and Gunicorn nginx settings
# Gunicorn
#
upstream my_app_name {
server 127.0.0.1:9001;
}
# WWW redirect to non-www
#
server {
@hersonls
hersonls / clone_bitbucket_repos.py
Created May 6, 2013 05:17
Git: Clone all bitbucket private repos
import os
import pprint
from subprocess import call
try:
from bitbucket.bitbucket import Bitbucket
except:
raise Exception('You need installl bitbucket api: $ pip install bitbucket-api')
@hersonls
hersonls / c_builder.sublime-build
Created April 30, 2013 23:58
Sublime Text: C build for osx - sublime-build
{
"cmd" : ["gcc $file -o ${file_base_name} && osascript -e 'tell application \"Terminal\" to activate' -e 'tell application \"Terminal\" to do script \"${file_path}/${file_base_name}\"'"],
"selector" : "source.c",
"shell":true,
"working_dir" : "$file_path"
}
@hersonls
hersonls / osx_workflow.md
Last active December 16, 2015 16:10
MacOSX: Max OSX Workflow

Max OSX Workflow

Ambiente OSX

  • Melhorias no ambiente
    • Volocidade Magic Mouse

defaults write -g com.apple.mouse.scaling 2

@hersonls
hersonls / hersonls.zsh-theme
Last active December 16, 2015 14:29
ZSH: Hersonls zsh theme
#
# My new theme :D
#
PROMPT='%~ %(!.#.$) '
@hersonls
hersonls / SublimeWorkflow.md
Created April 22, 2013 03:59
Markdown: Cool SublimeText Plugins

Cool sublime plugins

  • ZenCoding is now Emmet
  • Prefixr
  • AdvancedNewFile
  • SidebarEnhacements
  • SublimeLinter
  • Gist
  • DocBlockr - Only for Javascript, PHP, ActionScript, CoffeeScript, Java, Objective C, C and C++
from datetime import datetime
t1 = "09:30:00"
t2 = "13:45:00"
start_dt = datetime.strptime(t1, '%H:%M:%S')
end_dt = datetime.strptime(t2, '%H:%M:%S')
diff = (end_dt - start_dt)
@hersonls
hersonls / dj_prod_server.sh
Last active October 22, 2021 05:02
How to install Django+Supervisor+Gunicorn+Nginx in a Ubuntu Server.Needed to adjust append settings, like append virtualenvwrapper settings in user .profile file.
#!/bin/env bash
# Update packages
apt-get update
# Installing services
echo "=============================="
echo "Install web services"
echo "=============================="
apt-get -y install nginx supervisor
@hersonls
hersonls / devitz2013_palestras.json
Last active December 14, 2015 13:08
#Devitz 2013 - Propostas de palestras
[
{
"tema": "Desenvolvimento mobile por onde começar?",
"autor": "Nonilton",
"objetivo": ""
},
{
"tema" : "(RWD) Responsive Web Design: Por uma interface na medida",
"autor": "Emmanuel",
"objetivo": "O objetivo seria conscientizar os novos desenvolvedores da importância do desenvolvimento responsivo e tornar claro aos que pretendem iniciar na programação web que o RWD é um caminho sem volta."
@hersonls
hersonls / less_install.sh
Last active December 13, 2015 17:48
How to install less in DreamHost 1. Install node.js 2. Install npm 3. Install less
#!/bin/sh
git clone git://github.com/ry/node.git
cd node
./configure --prefix=~/.local/usr
make
make install
export npm_config_prefix=~/.local/usr && curl https://npmjs.org/install.sh | sh