Skip to content

Instantly share code, notes, and snippets.

View jabbrwcky's full-sized avatar
🏡

Jens Hausherr jabbrwcky

🏡
View GitHub Profile
@nvie
nvie / gist:2225508
Created March 28, 2012 11:19
zsh-sourcing.txt
#
# .zshenv
# .zshenv is the 1st file zsh reads; it's read for every shell, even if
# started with -f (setopt NO_RCS)
# .zprofile
# read after zshenv, if the shell is a login shell
# .zshrc
# read after zprofile, if the shell is an interactive shell
# .zlogin
# read after zshrc, if the shell is a login shell
@minikomi
minikomi / persona.go
Last active December 11, 2015 06:59
mozilla persona test
package main
import (
"encoding/json"
"fmt"
"github.com/gorilla/sessions"
"io/ioutil"
"log"
"net/http"
"net/url"
@defunkt
defunkt / installing-mustache.vim.md
Created March 6, 2010 10:21
Installing mustache.vim

mustache.vim

In your shell:

cd ~/.vim
git clone git://github.com/juvenn/mustache.vim.git
mv mustache.vim/syntax/* syntax/
mv mustache.vim/indent/* indent/
mv mustache.vim/ftdetect/* ftdetect/

rm -rf mustache.vim

@melekes
melekes / Makefile
Created March 21, 2014 09:34
Colored Makefile for Golang projects
NO_COLOR=\033[0m
OK_COLOR=\033[32;01m
ERROR_COLOR=\033[31;01m
WARN_COLOR=\033[33;01m
DEPS = $(go list -f '{{range .TestImports}}{{.}} {{end}}' ./...)
deps:
@echo "$(OK_COLOR)==> Installing dependencies$(NO_COLOR)"
@go get -d -v ./...
@echo $(DEPS) | xargs -n1 go get -d
@lehnerpat
lehnerpat / dual-output-jack-ubuntu13.10.markdown
Last active June 1, 2020 06:23
Simultaneous output to Analog and HDMI with Jack on Ubuntu 13.10

How to get simultaneous / dual output to both Analog out and HDMI out with Jack Audio on Ubuntu 13.10

Configuration used:

  • OS: Xubuntu (Ubuntu) 13.10 (saucy)
  • Audio: HDA Intel PCH (ALC269VB Analog) on an Intel Core i5 2557M (Sandy Bridge microarch)

Install below packages and set user group, then reboot

Packages you will need (and the versions I had when I did this):

  • jackd2, 1.9.9.5+20130622git7de15e7a-1
@petervanderdoes
petervanderdoes / filter-flow-hotfix-start-version
Created June 5, 2012 22:20
gitflow hooks and filter for gitflow development
#!/bin/sh
#
# Runs during git flow release start
#
# Positional arguments:
# $1 Version
#
# Return VERSION - When VERSION is returned empty gitflow
# will stop as the version is necessary
#
@Samuirai
Samuirai / captcha.md
Created June 14, 2012 20:59
G-WAN Captcha Decode

G-WAN is a new free web server. They seem to be very proud of it, or at least just want to make a lot of money. Well anyway, in almost every sentence they write, they claim that they are 20% cooler than anything else. It feels a bit arrogant. I have to admit, I don't know a lot about web servers, so I can't speak to how good they are.

However, then I saw their Captcha example. I also don't know much about machine learning algorithms, OCR, and stuff like that, but I do know how to read pixels. I also know how to compare values with python :P

demo

They say the following about their Captcha:

@rmmh
rmmh / gist:8515577
Created January 20, 2014 05:53
MSP430 Alphanumeric Instructions
[0-9a-zA-Z]{2}
30-39,41-5a,61-7a
a:61 z:7a A:41 Z:5a 0:30 9:39
MSP430 alphanumeric shellcode is hard. There's no way to write to memory,
no word-sized reg-reg operations, and all we have is add/sub/mov and a few conditional jumps.
@lemenkov
lemenkov / avahi.go
Last active January 30, 2022 01:18
How to register service with Avahi using golang and dbus
package main
import (
"github.com/guelfey/go.dbus"
"log"
"bufio"
"os"
)
func main() {
@olivierlacan
olivierlacan / migrate_postgresql_database.md
Last active March 24, 2022 20:30
How to migrate a Homebrew-installed PostgreSQL database to a new major version (9.3 to 9.4) on OS X. See upgraded version of this guide: http://olivierlacan.com/posts/migrating-homebrew-postgres-to-a-new-version/

This guide assumes that you recently run brew upgrade postgresql and discovered to your dismay that you accidentally bumped from one major version to another: say 9.3.x to 9.4.x. Yes, that is a major version bump in PG land.

First let's check something.

brew info postgresql

The top of what gets printed as a result is the most important: