Skip to content

Instantly share code, notes, and snippets.

View Lokaltog's full-sized avatar

Kim A. Ødegaard Lokaltog

View GitHub Profile

Keybase proof

I hereby claim:

To claim this, I am signing this object:

@Lokaltog
Lokaltog / bring-monitor.py
Created July 25, 2016 08:30
Tired of the Norwegian postal service (Posten/Bring) tagging shipments as "attempted delivered, nobody present/unknown address" without actually attempting to deliver the package? This script monitors the package tracking page and plays a siren sound/alert when the status changes. You can then call customer support and complain at +4721316234, i…
#!/usr/bin/env python
'''
Tired of the Norwegian postal service (Posten/Bring) tagging shipments as
"attempted delivered, nobody present/unknown address" without actually
attempting to deliver the package? This script monitors the package tracking
page and plays a siren sound/alert when the status changes. You can then call
customer support and complain at +4721316234, if you're lucky they'll call the
delivery driver and tell him to return and actually deliver the package.
@Lokaltog
Lokaltog / em.py
Created August 25, 2013 11:26
EasyMotion 2 jump text proof-of-concept
#!/usr/bin/env python
text = '''
lorem ipsum dolor sit amet, consectetur adipiscing elit. suspendisse
sagittis sollicitudin cursus. proin quis nisl tempus, facilisis nisl
volutpat, consectetur ipsum. sed congue, mauris a vestibulum
condimentum, elit nulla lacinia arcu, id eleifend metus magna in lacus.
nam vel nisi a a a a a a a b b b b b ab ab ab ab ab consectetur,
aliquam ligula egestas, interdum mauris. maecenas in mauris quis velit
@Lokaltog
Lokaltog / fish_prompt.py
Created May 21, 2013 08:03
Powerline fish prompt renderer test
# vim:fileencoding=utf-8:noet
from powerline.renderer import Renderer
from powerline.colorscheme import ATTR_BOLD, ATTR_ITALIC, ATTR_UNDERLINE
def int_to_rgb(num):
r = (num >> 16) & 0xff
g = (num >> 8) & 0xff
b = num & 0xff
@Lokaltog
Lokaltog / client.py
Created March 12, 2013 14:37
Powerline client-server memoization test
from multiprocessing.connection import Client
import time
for i in range(1, 10):
conn = Client('/tmp/pl-mp-test')
print('**** Query server')
conn.send(['f1', dict(param='test')])
conn.send(['f2', dict()])
try:
while True:
@Lokaltog
Lokaltog / 10-powerline-symbols.conf
Created January 18, 2013 11:37
Powerline fontconfig
<?xml version="1.0"?>
<!DOCTYPE fontconfig SYSTEM "fonts.dtd">
<fontconfig>
<alias>
<family>monospace</family>
<prefer><family>PowerlineSymbols</family></prefer>
</alias>
<alias>
<family>Droid Sans Mono</family>
@Lokaltog
Lokaltog / default.json
Created November 26, 2012 07:47
Proposed Powerline theme syntax
{
"name": "default",
"segments": {
"left": [
{
"type": "function",
"name": "mode"
},
{
"type": "function",
@Lokaltog
Lokaltog / colorscheme.py
Created November 13, 2012 08:53
Powerline config idea
class Colorscheme:
COLOR_LIGHTBLUE = 123
COLOR_MEDIUMBLUE = 123
COLOR_DARKBLUE = 123
COLOR_...
class SolarizedColorscheme(Colorscheme):
COLOR_LIGHTBLUE = 321
COLOR_...
# Contributor: Lokaltog <kimmern@lokaltog.net>
packager="slaveriq <arch@plassmann.biz>"
pkgname=wimp-no
pkgver=1.5.9
license='custom'
pkgrel=1
arch=('i686' 'x86_64')
pkgdesc="Adobe Air based streaming client for the Telenor Wimp service. Norwegian version, english language available."
url=('http://getwimp.com')