Skip to content

Instantly share code, notes, and snippets.

❤️ not eating nor abusing animals 🍀

Daniel Hahler blueyed

❤️ not eating nor abusing animals 🍀
View GitHub Profile
chekunkov /
Last active Jan 19, 2017
PYTHONSTARTUP file example with custom displayhook
#!/usr/bin/env python
import sys
import pprint
def displayhook_pprint(o):
"""Display hook powered by pprint.
coderofsalvation / export_process
Last active May 14, 2020
updates an environment variable of a running process
View export_process
# updates an environment variable of a running process (needs sudo)
# example: sudo export_pid <variable=value> <pid>
echo -e "attach $2\ncall putenv (\"$1\")\ndetach\n" > $script
gdb -q -batch -x $script &>/dev/null
rm $script
tarruda /
Created Jan 9, 2015
Install pygtk3 in pyenv
# script for pyenv installation of pygtk3 in ubuntu 12.04
# Adapted from
system_package_installed() {
if ! dpkg -l | grep -q $1; then
sudo apt-get install $1
brianclements / Commit
Last active Oct 14, 2021
Angular Commit Format Reference Sheet
View Commit

Commit Message Guidelines

We have very precise rules over how our git commit messages can be formatted. This leads to more readable messages that are easy to follow when looking through the project history. But also, we use the git commit messages to generate the Angular change log.

Commit Message Format

Each commit message consists of a header, a body and a footer. The header has a special format that includes a type, a scope and a subject:

View gist:8c25ed4abb36372bc6fe
" quick replace occurences
let g:should_inject_replace_occurences = 0
function! MoveToNext()
if g:should_inject_replace_occurences
call feedkeys("n")
call repeat#set("\<Plug>ReplaceOccurences")
let g:should_inject_replace_occurences = 0
chmouel / pan.zsh
Last active Jun 4, 2017
PAN: a zsh tool to switch easily with completion the tox virtualenvs and tests (demo:
View pan.zsh
# Author: Chmouel Bodujnah <>
# Pan a zsh tool to complete virtualenv tox targets and tests launched via
# testtools
# Demo:
# When you use zsh just source the file directly and when you are inside a
# project which has been pre-built with tox targets you can start do:
# pan <TAB>
#!/usr/bin/env python
# -*- coding: utf-8 -*-
import urllib2
import pcap #requires the python-libpcap module
def libpcap_net_data(cap_file, net_iface, filter_expr=None):
"""A decorator that can be used to sniff network data for the duration of a function call
if there is heavy traffic on the network interface the captured data will contain spurious packets
not related to the function call
# bash/zsh git prompt support
# # -*- encoding: utf-8 -*-
# Copyright (C) 2006,2007 Shawn O. Pearce <>
# Distributed under the GNU General Public License, version 2.0.
# This script allows you to see repository status in your prompt.
# To enable:
# 1) Copy this file to somewhere (e.g. ~/
bitjockey42 /
Created Apr 20, 2014
An installation and setup guide for mopidy on Arch Linux.

Mopidy on Arch Linux



Install from the AUR.

soarez /
Last active Oct 16, 2021
How to setup your own CA with OpenSSL

How to setup your own CA with OpenSSL

For educational reasons I've decided to create my own CA. Here is what I learned.

First things first

Lets get some context first.