Skip to content

Instantly share code, notes, and snippets.

View nabucosound's full-sized avatar

Hector N. Garcia nabucosound

View GitHub Profile

Upgrade PostgreSQL

After a "brew upgrade", I had to solve the incompatible data format between versions.

Command history

cd /usr/local/var/postgres/ cat PG_VERSION

@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
" Pathogen load
filetype off
call pathogen#infect()
call pathogen#helptags()
filetype plugin on
" No Vi Compatibility
set nocompatible
@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

PostgreSQL 9.1 Cheatsheet

sudo su postgres

Create cluster:

pg_createcluster 9.1 main --start
@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):

Writing to a Nomadblog post

Steps

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

    cp template.rst src.rst
@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

@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 / mysql_cheatsheet.rst
Created August 15, 2013 00:42
MySQL dirty notes

MySQL

Install MySQL in Mac OS X with Brew

# Install brew install mysql