Skip to content

Instantly share code, notes, and snippets.

View oliverpool's full-sized avatar
🏔️

oliverpool

🏔️
View GitHub Profile
@oliverpool
oliverpool / git-timetracker.sh
Last active December 7, 2016 12:10 — forked from kvz/git-timetracker.sh
You can then type git timetrack, git timetrack "1 day", git timetrack "1 month" --reverse (the arguments are positional, so the duration is required in this case) in any git repository!
# add it to your ~/.gitconfig as an alias:
[alias]
timetrack = "!f() { \
git --no-pager log \
--date=iso \
--since="${1-2 months}$" \
"${2}" \
--date-order \
--full-history \
@oliverpool
oliverpool / console.js
Last active March 6, 2017 16:42
Display console.log output (useful on jsfiddle for instance)
function newLog(oldLog) {
return function() {
var args = Array.prototype.slice.call(arguments, 0);
document.getElementById('console-log').innerText += args.join(" ") + "\n";
oldLog.apply(this, args)
}
}
console.log = newLog(console.log)
console.error = newLog(console.error)
@oliverpool
oliverpool / fritz.sh
Created December 31, 2018 17:39
Generate fritzbox certificate using acme.sh (let's encrypt) + pass + auto-upload (thank https://gist.github.com/wikrie/f1d5747a714e0a34d0582981f7cb4cfb)
#!/bin/bash
# parameters
DOMAIN="sub.example.org"
USERNAME=""
PASSWORD=$FRITZ_PASSWORD
PRIVATE_KEY="~/.acme.sh/$DOMAIN/$DOMAIN.key"
FULLCHAIN="~/.acme.sh/$DOMAIN/fullchain.cer"
CERTPASSWORD=""
HOST=http://fritz.box