Skip to content

Instantly share code, notes, and snippets.

View noqqe's full-sized avatar
😴

Florian Baumann noqqe

😴
View GitHub Profile
@noqqe
noqqe / gpx-visualization.R
Created May 3, 2017 15:49
Visualize gpx tracks from a folder on a picture from google maps.
library(plotKML)
library(maps)
library(ggmap)
# Settings
activities_folder = "/Users/noqqe/Downloads/activities/"
center_map_on = "Plech"
zoom_depth = 9 # 1 - 21
routes_color = "#FF000022"
@noqqe
noqqe / isso2yaml.py
Last active December 31, 2016 14:54
isso2yaml for markdown blogposts
#!/usr/bin/env python2.7
# -*- coding: utf-8 -*-
from datetime import datetime
import frontmatter
import glob
import codecs
import sqlite3 as lite
home = '/Users/noqqe/Code/noqqe.de/content/blog/'
@noqqe
noqqe / insta2pin.py
Created December 11, 2016 12:48
Instapaper to Pinboard Conversion Script
#!/usr/bin/env python2.7
import json
from datetime import datetime
import csv
l = csv.reader(open('instapaper-export.csv','rb'), delimiter=',')
pins = []
for link in l:
@noqqe
noqqe / fontmatter-hugo-post-converter
Last active February 24, 2017 16:11
Restructuring the metadata of my blog with frontmatter
#!/usr/bin/env python2.7
# -*- coding: utf-8 -*-
import frontmatter
import glob
import codecs
home = '/home/noqqe/Code/noqqe.de/content/blog/'
files = glob.glob(home + '*.md')
@noqqe
noqqe / archivist.py
Last active January 18, 2021 15:32
Fetches images from http://gatherer.magic.com and saves them to local disk
#!/usr/bin/env python
# -*- coding: utf-8 -*-
import os
from bs4 import BeautifulSoup
import requests
import urllib
import argparse
ap = argparse.ArgumentParser()
@noqqe
noqqe / linx-hard-expire.diff
Created September 15, 2016 08:40
linx-hard-expire.diff
diff --git a/upload.go b/upload.go
index b0bbd9f..0d66326 100644
--- a/upload.go
+++ b/upload.go
@@ -67,7 +67,7 @@ func uploadPostHandler(c web.C, w http.ResponseWriter, r *http.Request) {
if r.Form.Get("randomize") == "true" {
upReq.randomBarename = true
}
- upReq.expiry = parseExpiry(r.Form.Get("expires"))
+ upReq.expiry = parseExpiry("172800")
@noqqe
noqqe / nacl-encryption.py
Last active January 18, 2022 15:43
An example code for pynacl encryption and decryption (Salsa20+poly1305)
#!/usr/bin/env python2.7
# -*- coding: utf-8 -*-
import nacl.secret
import nacl.utils
import base64
from pyblake2 import blake2b
import getpass
@noqqe
noqqe / k4hue.py
Last active January 9, 2016 21:42
#!/usr/bin/python
from phue import Bridge
import random
import time
### Docs
# 1. Initales pairen Link button druecken und
# innerhalb 30 Sekunden ausfuehren
# 2. Im moment nur aus der K4CG Triggerbar.
# 3. Kein IPv6 auf der Bridge
@noqqe
noqqe / endecrypt.py
Created December 25, 2015 21:02
Simple library based encryption and decryption with python
#!/usr/bin/env python2
from simplecrypt import encrypt, decrypt
import getpass
# read inputs
msg = raw_input('Message: ')
pw = getpass.getpass('Password: ')
ciphertext = encrypt(pw, msg)
@noqqe
noqqe / bm.py
Created December 16, 2015 12:53
commandline bookmark manager in python and mongodb
#!/usr/bin/env python2.7
""" bm 1.0.0
Usage:
bm list
bm search <pattern>
bm add <url> <tags>... [--date=<date>]
bm stats
bm tags