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
brecke / ergodox-pt_pt.hex
Created March 8, 2019 15:36
Ergodox config for PT-pt
:100000000C9484040C94A1040C94A1040C94A104F9
:100010000C94A1040C94A1040C94A1040C94A104CC
:100020000C94A1040C94A1040C94A4300C9476318B
:100030000C940C290C94A1040C94A1040C94A1041C
:100040000C94A1040C94A1040C94A1040C94A1049C
:100050000C94A1040C9474290C94A1040C94A10494
:100060000C94A1040C94A1040C94A1040C94A1047C
:100070000C94A1040C94A1040C94A1040C94A1046C
:100080000C94A1040C94A1040C94A1040C94A1045C
:100090000C94A1040C94A1040C94A1040C94A1044C
@brecke
brecke / pyaudio on a rPi
Created January 27, 2015 22:04
How to install PyAudio on a Raspberry Pi
# taken from http://raspberrypihell.blogspot.pt/2013/07/pyaudio-and-how-to-install.html
sudo apt-get install git
sudo git clone http://people.csail.mit.edu/hubert/git/pyaudio.git
sudo apt-get install libportaudio0 libportaudio2 libportaudiocpp0 portaudio19-dev
sudo apt-get install python-dev
cd pyaudio
sudo python setup.py install
### Keybase proof
I hereby claim:
* I am brecke on github.
* I am miguellaginha (https://keybase.io/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
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
PYENV_PROMPT_DEFAULT_VERSION=${PYENV_PROMPT_DEFAULT_VERSION:="system"}
function _pyenv_prompt_info {
[[ -n $(whence pyenv_prompt_info) ]] && \
[[ "$(pyenv_prompt_info)" != "${PYENV_PROMPT_DEFAULT_VERSION}" ]] && \
echo "${ZSH_THEME_PYENV_PROMPT_PREFIX}$(pyenv_prompt_info)${ZSH_THEME_PYENV_PROMPT_SUFFIX}"
}
@brecke
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
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: http://p2theme.com/
Author: Automattic
Author URI: http://automattic.com/
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: http://www.gnu.org/licenses/gpl-2.0.html
@brecke
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 https://raw.github.com/gitlabhq/gitlab-recipes/4-1-stable/init.d/gitlab
#! /bin/bash
# GITLAB
# Maintainer: @brecke, based on what @randx did on https://raw.github.com/gitlabhq/gitlab-recipes/4-1-stable/init.d/gitlab
# 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
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
end