Skip to content

Instantly share code, notes, and snippets.

View strayer's full-sized avatar
🇺🇦
🕊

Sven Grunewaldt strayer

🇺🇦
🕊
View GitHub Profile
@strayer
strayer / fritzbox_get_external_ip.py
Created October 28, 2013 15:27
Command line script for retrieving the current external IP via the FritzBox UPnP API (requirements: requests, lxml)
#!/usr/bin/env python3
import requests
import sys
from lxml import etree
from io import StringIO
if len(sys.argv) < 2 or sys.argv[1] == "-h" or sys.argv[1] == "--help":
print("Usage: {} <fritzbox hostname>".format(__file__))
sys.exit(0)
@strayer
strayer / youtube-playlist-links.py
Last active December 29, 2015 06:09
Lists video page links of a YouTube playlist
@strayer
strayer / youtube-dl-dash.bash
Last active March 24, 2021 18:00
youtube-dl wrapper script to download DASH Video and Audio and combine it with ffmpeg with automatic best format detection and fallback to default youtube-dl behaviour for videos without DASH
#!/usr/bin/env bash
set -e
YOUTUBE_FORMATS=$(youtube-dl -F "$1")
if [[ "$YOUTUBE_FORMATS" == *"(DASH Video)"* ]]; then
VIDEO_NAME=$(youtube-dl --get-filename "$1")
VIDEO_NAME_TMP="$VIDEO_NAME.tmp"
echo "Filename: $VIDEO_NAME"
@strayer
strayer / second_skype.sh
Created June 21, 2014 07:25
Run a secondary instance of Skype on Mac OS X
#!/bin/bash
rm ~/Library/Application\ Support/Skype/Skype.pid
sleep 1
open -n "/Applications/Skype.app"
@strayer
strayer / ynab.desktop
Created July 30, 2014 14:01
YNAB 4 Linux .desktop launcher Install with: https://github.com/WolverineFan/YNABLinuxInstall
[Desktop Entry]
Encoding=UTF-8
Version=1.0
Type=Application
Name=YNAB
Icon=ynab.png
Path=/home/sgrunewaldt/.wine_YNAB4/drive_c/Program Files (x86)/YNAB 4
Exec=/home/sgrunewaldt/.bin/ynab
StartupNotify=false
StartupWMClass=YNAB 4.exe
@strayer
strayer / Dockerfile
Created May 24, 2016 08:48
Spigot Dockerfile
FROM alpine:3.3
ENV SPIGOT_BUILDTOOLS_REV=1.8.8
RUN apk add --no-cache --repository http://dl-1.alpinelinux.org/alpine/edge/community/ tini && rm -rf /var/cache/apk/*
RUN apk add --no-cache openjdk8-jre && rm -rf /var/cache/apk/*
RUN apk add --no-cache --virtual=build-dependencies curl bash git grep && \
mkdir /tmp/minecraft-builder && \

Keybase proof

I hereby claim:

  • I am strayer on github.
  • I am strayer (https://keybase.io/strayer) on keybase.
  • I have a public key ASDL-9eATKRsw97yAX7vxbrfC3_qs0jfB0yS_cbGm-TqAwo

To claim this, I am signing this object:

@strayer
strayer / btcconf.py
Last active November 17, 2017 14:14
Simple Python script to show BTC to EUR/USD as Alfred workflow result
#!/usr/local/bin/python3
import sys
from urllib.request import urlopen
import json
from decimal import Decimal
import locale
def format_eur(eur):
locale.setlocale(locale.LC_ALL, "de_DE.UTF-8")
return locale.currency(eur, grouping=True, international=True)
@strayer
strayer / titusz-cryptop.rb
Created November 14, 2017 09:32
titusz/cryptop Homebrew Formula
class TituszCryptop < Formula
desc "command line crypto portfolio"
homepage "https://github.com/titusz/cryptop"
head "https://github.com/titusz/cryptop.git"
include Language::Python::Virtualenv
depends_on :python3
resource "certifi" do
@strayer
strayer / i2c.ex
Created September 19, 2018 11:28
defmodule ExLCD.HD44780.I2C do
@moduledoc """
**ExLCD.HD44780** is the display driver module for Hitachi
HD44780 type parallel LCD display controller managed display modules.
## Hitachi HD44780 Style Controller (including Sitronix ST7066)
The HD44780 is the most ubiquitous character matrix display controller
but not the only one. It supports a number of standard operations like
moving the cursor, displaying characters and scrolling. It is an 8-bit