Skip to content

Instantly share code, notes, and snippets.

Birkhoff Lee BirkhoffLee

Block or report user

Report or block BirkhoffLee

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
BirkhoffLee / docker-compose.yml
Created Sep 16, 2019
docker-compose Grafana + InfluxDB + collectd with Traefik
View docker-compose.yml
version: '3.2'
image: fr3nd/collectd
privileged: true
network_mode: host
- /proc:/mnt/proc:ro
- ./collectd.conf:/etc/collectd/collectd.conf
BirkhoffLee / index.js
Last active Aug 31, 2019
daily RSS feed to mailgun email
View index.js
let d = new Date()
d.setDate(d.getDate() - 1)
const date = d.toISOString().split('T')[0]
const RssToEmail = require('rss-to-email')
const config = {
accentColor: "red",
header: {
link: "",
title: "RSS Feed"
BirkhoffLee /
Created Apr 22, 2019
Change the ID of Teamviewer for macOS to circumvent "commercial use detected"
# -*- coding: utf-8 -*-
import sys
import os
import glob
import platform
import re
import random
import string
print('Change ID of Teamviewer for macOS')
BirkhoffLee /
Created Mar 14, 2019
Calculates traffic usage with rixCloud API and push notification to your iPhone
bytesToHuman() {
b=${1:-0}; d=''; s=0; S=(Bytes {K,M,G,T,P,E,Z,Y}iB)
while ((b > 1024)); do
d="$(printf ".%02d" $((b % 1024 * 100 / 1024)))"
b=$((b / 1024))
let s++
View netdata.html
<!DOCTYPE html>
<html lang="en">
// don't load bootstrap - confluence does not need this
var netdataNoBootstrap = true;
var netdataTheme = 'white';
var netdataPrepCallback = function() {
BirkhoffLee / base64.js
Created Jan 13, 2019
base64 in nodejs
View base64.js
const encode = s => Buffer.from(s).toString('base64')
const decode = s => Buffer.from(s, 'base64').toString()
BirkhoffLee /
Last active Dec 5, 2018
CentOS firewalld + Docker companion
cp /etc/docker/daemon.json /etc/docker/daemon.json.old
echo '{"iptables": false}' > /etc/docker/daemon.json
firewall-cmd --permanent --direct --add-rule ipv4 nat POSTROUTING 0 -o eth0 -j MASQUERADE # this enables containers access outside internet
firewall-cmd --reload
BirkhoffLee / ss_subscribe_to_surge.js
Created Oct 11, 2018
This node script converts a base64-encoded ShadowSocks subscription string to a Surge proxies configuration.
View ss_subscribe_to_surge.js
const querystring = require('querystring')
let args = process.argv.slice(2)
if (!args[0]) {
console.error("Usage: node index.js [subscribe_list_base64_encoded]")
BirkhoffLee / steamguard.js
Last active Jun 28, 2019
Steamguard data & device id extractor
View steamguard.js
// yarn add binary-cookies bplist-parser
To get the Steamguard file, you don't necessarily need to be jailbroken, but
if you're jailbroken: head to
and you can get them. I'm not sure the UUID is same on all devices, but this is the actual path
on my device (iOS 12)
If you're non-jailbroken, you need to get an unencrypted backup using iTunes,
BirkhoffLee / config.cfg
Last active Feb 2, 2018
My edited CS:GO config.cfg based on C9 Shroud's original one
View config.cfg
bind "1" "slot1"
bind "2" "slot2"
bind "3" "slot3"
bind "4" "slot4"
bind "5" "slot5"
bind "9" "slot9"
bind "a" "+moveleft"
bind "b" "buymenu"
bind "c" "slot6"
You can’t perform that action at this time.