Skip to content

Instantly share code, notes, and snippets.

@LaggAt
LaggAt / myDict.py
Last active March 5, 2018 21:00
Python: dict supporting lazy sorting, Previous/Next item
#!/usr/bin/env python
# -*- coding: utf-8 -*-
# (c) 2018 Florian Lagg <github@florian.lagg.at>
# Under Terms of GPL v3
class MyDict(dict):
def __init__(self, *args, **kwargs):
self._sortedList = None
super(MyDict, self).__init__(*args, **kwargs)
@LaggAt
LaggAt / pushbullet.sh
Created October 4, 2017 14:48 — forked from outadoc/pushbullet.sh
Pushbullet bash script
#!/bin/bash
# from outadoc/pushbullet.sh
# Changes:
# get ACCESS_TOKEN from /etc/pushbullet.conf <LaggAt>
# optional wait for process ending (3rd parameter with PID/executable name), before sending with exit code information <LaggAt>
if [ $# -eq 0 ]; then
echo "Usage: $0 <message> [<title> [pid]]"
exit
fi
@LaggAt
LaggAt / build-git.sh
Created October 4, 2017 12:33 — forked from pescobar/build-git.sh
compile git with openssl instead of gnutls
#!/usr/bin/env bash
# original gist from pescobar/build-git.sh
# changes by LaggAt:
# * to be usable on Raspbian / tested RPi3 and
# * for automatic depency resolving
# Clear out all previous attempts
rm -rf "/tmp/source-git/"
# Get the dependencies for git, then get openssl