Skip to content

Instantly share code, notes, and snippets.

View brecke's full-sized avatar
Working from home

Miguel Laginha brecke

Working from home
View GitHub Profile
brecke / ergodox-pt_pt.hex
Created March 8, 2019 15:36
Ergodox config for PT-pt
brecke / pyaudio on a rPi
Created January 27, 2015 22:04
How to install PyAudio on a Raspberry Pi
# taken from
sudo apt-get install git
sudo git clone
sudo apt-get install libportaudio0 libportaudio2 libportaudiocpp0 portaudio19-dev
sudo apt-get install python-dev
cd pyaudio
sudo python install
### Keybase proof
I hereby claim:
* I am brecke on github.
* I am miguellaginha ( on keybase.
* I have a public key whose fingerprint is 7CB9 6898 317A E2F5 DD18 AD7C C44F 8603 A137 6B11
To claim this, I am signing this object:
brecke / elegante.zsh-theme
Created September 21, 2014 09:47
Zsh theme with PYENV support
# theme based on norm but with pyenv support for python development
function _pyenv_prompt_info {
[[ -n $(whence pyenv_prompt_info) ]] && \
[[ "$(pyenv_prompt_info)" != "${PYENV_PROMPT_DEFAULT_VERSION}" ]] && \
brecke / find_routes.js
Created October 27, 2013 14:56
Javascript script for finding SMTUC routes that intersect certain points of interest in Coimbra
// find SMTUC routes by coordinates
allPoints = {
"Pólo I (UC)": "-8.424174785614014,40.20796711699945",
"Pólo II (UC)": "-8.415849208831787,40.2186240266062",
"Jardim Botânico": "-8.420548439025879,40.206134690235245",
"Praça da República": "-8.419668674468994,40.20949112422609",
"Arcos do Jardim": "-8.420119285583496,40.206459463231106",
"HUC": "-8.413639068603516,40.21848698479009",
"Cruz de Celas": "-8.413327932357788,40.21345004307392",
brecke / style.css
Created January 31, 2013 17:15
Slight style changes to the default P2 wordpress theme, for my own installation.
Theme Name: P2
Theme URI:
Author: Automattic
Author URI:
Description: A group blog theme for short update messages, inspired by Twitter. Featuring: Hassle-free posting from the front page. Perfect for group blogging, or as a liveblog theme. Dynamic page updates. Threaded comment display on the front page. In-line editing for posts and comments. Live tag suggestion based on previously used tags. A show/hide feature for comments, to keep things tidy. Real-time notifications when a new comment or update is posted. Super-handy keyboard shortcuts. Helvetica Neue for you modern font lovers.
Version: 1.4.2
Tags: blue, two-columns, fixed-width, rtl-language-support, right-sidebar, white, light, front-page-post-form, translation-ready, custom-background, custom-header, custom-menu, post-formats, sticky-post, theme-options
License: GNU General Public License v2.0
License URI:
brecke / gitlab init file
Last active December 11, 2015 19:08
my own version for the gitlab init script on a debian squeeze machine. adapted from the original script on
#! /bin/bash
# Maintainer: @brecke, based on what @randx did on
# App Version: 4.1
# Differences to the original version:
# - The gitlab user is actually gitlabhq (so is the app root dir)
# - Using nginx instead of unicorn
# - Assumes nginx creates a pid file in /home/gitlabhq/gitlabhq/tmp/pids/
brecke / login timeout authlogic
Created October 29, 2010 16:01
login timeout authlogic
acts_as_authentic do |c|
c.logged_in_timeout = 15.minutes # default is 10.minutes
# c.disable_perishable_token_maintenance = true
c.perishable_token_valid_for = 60.minutes
# c.allow_http_basic_auth = true # Configuration for the HTTP basic auth feature of Authlogic.
# c.my_config_option = my_value # for available options see documentation in: Authlogic::ActsAsAuthentic