- Keyboard: CAPS=CTRL, Swap CMD / OPTION
- Mouse: Naural Scroll
- Install https://iterm2.com/
- Install Firefox: https://www.mozilla.org/
- Install Bitwarden
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# ------- | |
# ------- banzhaf - version 1.1 | |
# ------- | |
# ------- A simple self-contained function to compute the Banzhaf Power Index given: | |
# ------- * a list of integer weights for all voters in the system, sorted in ascending order | |
# ------- * the quota for the voting system | |
# ------- | |
# ------- This is a slight modification (mainly vectorization) of the code by | |
# ------- Ruben R. Puentedura (http://www.hippasus.com/resources/socialsoftware/index.html) | |
# ------- which was published under CC-License in 2004 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
with builtins; | |
let | |
div = x: y: if y / x * x == y then true else false; | |
divany = L: x: | |
if (length L) == 0 then | |
false | |
else if (div (head L) x) then | |
true | |
else | |
(divany (tail L) x); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
""" | |
SYNOPSIS | |
gh-issue-fetch [-R <repository url>] [-d <output directory>] | |
DESCRIPTION | |
Fetch all issues from a GH repository into local text files. | |
By default issues are placed in ./issues/*, this can be | |
changed by using the -d flag. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
main: main.c lib.asm | |
nasm -f elf64 -o lib.o lib.asm | |
gcc -o main main.c lib.o | |
run: main | |
./main |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import pandas as pd | |
import vobject | |
df = pd.read_csv("contacts.csv", index_col="Id") | |
for row in df.iterrows(): | |
rec = row[1].to_dict() | |
for k,v in rec.items(): | |
if v == "-": | |
rec[k] = None |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# | |
# Read data from std in and show in a browser. | |
# | |
# E.g. curl google.com | bcat | |
# | |
EXT=${1:-.html} | |
TMPFILE=`mktemp '/tmp/bcat.XXXXXXXX'`"$EXT" || exit 1 | |
cat > $TMPFILE |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
statsd=localhost:8125 | |
dropbox=$HOME/bin/dropbox.py | |
socat=/usr/bin/socat | |
grep=/bin/grep | |
sed=/bin/sed | |
# Example output of `drobox.py status` | |
# ``` | |
# Syncing (51,938 files remaining, 2 mins left) | |
# Downloading 51,938 files (3,069 KB/sec, 2 mins left) |
I hereby claim:
- I am heinrichhartmann on github.
- I am hartmann (https://keybase.io/hartmann) on keybase.
- I have a public key ASADQm4Cys6zXNQQjsHsuEk7xwjRTWF7VSrdUI2kRjrcuQo
To claim this, I am signing this object:
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# | |
# This is a Python wrapper for the Snowth/IRONdb API I wrote | |
# for personal use in 2014. Use at your own risk. | |
# | |
import logging | |
log = logging.getLogger() | |
if __name__ == "__main__": log.setLevel(logging.DEBUG) | |
else: log.setLevel(logging.WARN) | |
import requests |
NewerOlder