Skip to content

Instantly share code, notes, and snippets.

View nabucosound's full-sized avatar

Hector N. Garcia nabucosound

View GitHub Profile
@nabucosound
nabucosound / cmd_cheatsheet.rst
Created July 20, 2013 00:44
Lazy mind, always forgetting shell commands to perform basic stuff.

Command Line Cheatsheet

Filesystem

Delete recursively:

find . -name "*.pyc" | xargs rm -f
@nabucosound
nabucosound / pypi_github_rtd_packaging.rst
Last active December 19, 2015 08:09
I always forgot to get packaging done right on the first try. It is a task that we don't do every day, so I created this how-to gist. It helps out creating packages hosted on GitHUb, listed on PyPi and its documentation hosted on ReadTheDocs.

Python packages on PyPi, Github and ReadTheDocs

I always forgot to get packaging done right on the first try. It is a task that we don't do every day, so I created this how-to gist. It helps out creating packages hosted on GitHUb, listed on PyPi and its documentation hosted on ReadTheDocs.

Package scaffolding

Writing to a Nomadblog post

Steps

  1. Copy the template.rst into a new source reStructuredText file:

    cp template.rst src.rst
@nabucosound
nabucosound / amazon_aws_cheatsheet.rst
Last active December 16, 2015 07:18
Cheatsheets!

Amazon AWS Cheatsheet

Made by Nabuco (http://nomadblue.com/).

Note: Substitute [params] with the proper values.

Put dump file into S3 bucket using cmd from Boto (pip install boto):

PostgreSQL 9.1 Cheatsheet

sudo su postgres

Create cluster:

pg_createcluster 9.1 main --start
@nabucosound
nabucosound / vim_cheatsheet.rst
Last active March 4, 2021 08:42
Vim basic commands cheatsheet. Nothing advanced here, just basic stuff to help my lazy mind remember.

Nabuco's Vim cheatsheet

Normal mode (a.k.a command mode)

i -> insert left of cursor
@nabucosound
nabucosound / gist:4581674
Last active December 11, 2015 09:39 — forked from djq/gist:2846196
#!/bin/bash
#
# Install Postgres 9.1, PostGIS 2.0 and pgRouting on a clean Ubuntu 12.04 install (64 bit)
# updated to PostGIS 2.0.1
# add the ubuntu gis ppa
sudo apt-get -y install python-software-properties
sudo add-apt-repository ppa:ubuntugis/ubuntugis-unstable
sudo apt-get update
" Pathogen load
filetype off
call pathogen#infect()
call pathogen#helptags()
filetype plugin on
" No Vi Compatibility
set nocompatible
@nabucosound
nabucosound / bash_profile
Last active September 30, 2015 16:37
Bash profile configuration for Homebrew and Python stuff
# Custom propmt
export PS1="\u:\w$ "
# ls with colors
export CLICOLOR=1
export LSCOLORS=gxgxcxdxbxegedabagacad
# Homebrew binaries and scripts before system ones
export PATH=/usr/local/bin:/usr/local/sbin:/usr/local/opt/ruby/bin:$PATH
@nabucosound
nabucosound / nabucolaptop_conf.rst
Last active February 4, 2017 22:49
This is a personal HOW-TO I have been using lately to install and setup my Macbook Pro laptop with OS X, to be used as a developer machine for Python, Django, MySQL and other tools I use daily for my projects.

Mac OS X for a Python developer

This is a personal HOW-TO I have been using lately to install and setup my Macbook Pro laptop with OS X, to be used as a developer machine for Python, Django, MySQL and other tools I use daily for my projects. To get most of the software Homebrew is been used.

Terminal