Skip to content

Instantly share code, notes, and snippets.

View fabiant7t's full-sized avatar

Fabian Topfstedt fabiant7t

View GitHub Profile
@fabiant7t
fabiant7t / fabianConfiguration.json
Last active July 19, 2018 14:04
Fabian UHK Colemak Planck like
{
"userConfigMajorVersion": 4,
"userConfigMinorVersion": 0,
"userConfigPatchVersion": 0,
"deviceName": "Fabian UHK",
"doubleTapSwitchLayerTimeout": 250,
"iconsAndLayerTextsBrightness": 255,
"alphanumericSegmentsBrightness": 255,
"keyBacklightBrightness": 255,
"mouseMoveInitialSpeed": 4,
@fabiant7t
fabiant7t / tornado_test.py
Created March 22, 2018 17:19
Simple test that proxies remote content (and shows a memory issue in Tornado)
"""
Simple test that proxies remote content (and shows a memory issue in Tornado)
Call http://localhost:8888/200 and you will see that the request object dies.
But call http://localhost:8888/400 and the request object stays in memory forever (or until you press <Ctrl+c>
"""
#!/usr/bin/python3
import weakref
@fabiant7t
fabiant7t / .c
Created June 7, 2017 09:44
AMJ40 Ghetto Planck Fabian
#include "amj40.h"
#define _QWERTY 0
#define _LOWER 1
#define _RAISE 2
#define _ADJUST 3
enum custom_keycodes {
@fabiant7t
fabiant7t / gist:85ed7f8cac6ce77235ec5b5eff971676
Created March 17, 2017 15:15
Prime days in 2017 according to me, not Amazon: 69
2017-01-01
2017-01-02
2017-01-03
2017-01-05
2017-01-07
2017-01-11
2017-01-13
2017-01-17
2017-01-19
2017-01-23
@fabiant7t
fabiant7t / fab-init.lua
Last active September 21, 2016 20:49
hammerspoon configuration #1
-- Modifier
local hyper = {"cmd"}
-- Instant is better than animated
hs.window.animationDuration = 0
-- Window shadows off
hs.window.setShadows(false)
# MIT Licence, Copyright 2015 by Fabian Topfstedt <topfstedt@schneevonmorgen.com>
import datetime
import hashlib
import hmac
import urllib
import urlparse
def remove_from_qs(qs, param_name):
"""
#include <OneSheeld.h>
void setup()
{
OneSheeld.begin();
}
void loop()
{
if(Mic.getValue() > 50)
@fabiant7t
fabiant7t / backlight_brightness
Last active December 28, 2015 08:19
Backlight Brightness, Version 1.0 A utility to increase and decrease the backlight brightness using xrandr on linux boxes. Written, because the backlight of my Asus notebook was working with maximum brightness only and I had the idea of using xrandr and key bindings.
#!/usr/bin/env python
"""
The MIT License (MIT)
Copyright (c) 2013 by Fabian Topfstedt
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
@fabiant7t
fabiant7t / vimrc
Created June 23, 2012 21:17
fabiant7t vimrc
set visualbell " shut up
" Disable the cursor keys to force moving the cursor by h j k l
"" noremap <Up> ""
"" noremap! <Up> <Esc>
"" noremap <Down> ""
"" noremap! <Down> <Esc>
"" noremap <Left> ""
"" noremap! <Left> <Esc>
"" noremap <Right> ""
@fabiant7t
fabiant7t / s3_multipart_upload.py
Created April 17, 2011 14:54
Parallel S3 multipart upload with retries
import logging
import math
import mimetypes
from multiprocessing import Pool
import os
from boto.s3.connection import S3Connection
from filechunkio import FileChunkIO