Skip to content

Instantly share code, notes, and snippets.

Augusto Elesbão aelesbao

  • Berlin, Germany
Block or report user

Report or block aelesbao

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@aelesbao
aelesbao / partitioning.sql
Last active Jan 4, 2017
Postgres Partitioning example
View partitioning.sql
DROP TABLE IF EXISTS measurement CASCADE;
-- our master table
CREATE TABLE measurement (
id bigserial PRIMARY KEY NOT NULL,
logdate date NOT NULL
);
-- create the partitions
CREATE TABLE measurement_2016_12 (
@aelesbao
aelesbao / install-octave.sh
Last active Nov 7, 2016
Octave installation on Mac OS X
View install-octave.sh
#!/bin/sh
brew tap homebrew/science
brew cask install aquaterm xquartz
brew install gnuplot --with-aquaterm --with-x11
brew install octave --with-sndfile --without-qt5
# Now you can use either Aquaterm or X11 as your graphics engine.
# Add the following to ~/.octaverc and choose one:
#
# graphics_toolkit('gnuplot');
View .vimrc
if !isdirectory($HOME . '/.vim')
call mkdir($HOME . '/.vim/tmp', "p")
endif
function! SetupVundle()
filetype off " required !
let install_path = expand('$HOME') . '/.vim/bundle/Vundle.vim'
if !filereadable(install_path.'/.git/config')
exec '!git clone https://github.com/VundleVim/Vundle.vim '.install_path
View keybase.md

Keybase proof

I hereby claim:

  • I am aelesbao on github.
  • I am aelesbao (https://keybase.io/aelesbao) on keybase.
  • I have a public key ASBtZdMx-YRdcXLMxZ7lN7vAXpkVMJYznmhjQcauonLULQo

To claim this, I am signing this object:

@aelesbao
aelesbao / gem-list-native.rb
Created May 27, 2014
List gems with native extensions
View gem-list-native.rb
require 'rubygems'
specs_with_extensions = Gem::Specification.each.select { |spec| spec.extensions.any? }
specs_with_extensions.each do |spec|
puts "#{spec.name} (extensions: #{spec.extensions.inspect})"
end
View tmux.conf
# sets the correct term
set -g default-terminal "screen-256color"
# allow xterm titles in terminal window and terminal scrolling with scrollbar
set -g terminal-overrides "screen*:XT:smcup@:rmcup@"
# automatically set window title
setw -g automatic-rename on
setw -g allow-rename off
@aelesbao
aelesbao / post-checkout.sh
Last active Dec 12, 2015
git post-checkout hook that executes a "bundle install" if Gemfile has changes (using RVM if available)
View post-checkout.sh
#!/bin/bash --login
orig_commit=$1
dest_commit=$2
root="$(git rev-parse --show-toplevel 2> /dev/null)"
is_not_rebasing() {
test -d ${root}/.git/rebase-merge
}
You can’t perform that action at this time.