This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
# Git clone all my gists | |
import json | |
import urllib | |
from subprocess import call | |
from urllib import urlopen | |
import os | |
USER = os.environ['USER'] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// https://autoeq.app | |
// Sennheiser HD595 / iTunes Built-in equalizer | |
tell application "Music" | |
activate | |
set newPreset to make new EQ preset | |
set name of newPreset to "Sennheiser HD595" | |
set band 1 of newPreset to 12 | |
set band 2 of newPreset to 4.8 | |
set band 3 of newPreset to -0.1 | |
set band 4 of newPreset to -2.5 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
set -eu | |
set -o pipefail | |
dns_server=172.24.100.250 | |
client_ip=$1 | |
psk=$(wg genpsk) | |
client_privkey=$(wg genkey) | |
client_pubkey=$(wg pubkey <<<"$client_privkey") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python3.4 | |
import sys | |
import sqlite3 | |
from html.parser import HTMLParser | |
class TableParser(HTMLParser): | |
def __init__(self): |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python3 | |
# encoding: utf-8 | |
# By Joonas Kuorilehto 2011, MIT license | |
# | |
# The script combines .ssh/known_hosts so that each fingerprint is only | |
# listed once. | |
import re | |
import sys | |
import os |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python3 | |
# Joonas Kuorilehto 2013 | |
# This script is Public Domain. | |
import csv | |
import subprocess | |
import pipes | |
from datetime import datetime | |
import smtplib |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Options -Indexes | |
RewriteEngine On | |
RewriteCond %{REQUEST_FILENAME} !-f | |
RewriteRule ^(.*)$ http://lakka.n.kapsi.fi:31859/$1 [L,P] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
auto wan0 | |
iface wan0 inet dhcp | |
bridge_ports enp9s0 enp4s0f1 | |
#bridge_hw 00:11:22:33:44:55 | |
nameserver 127.0.0.1 | |
# CAKE / Uplink shaping | |
post-up tc qdisc add dev enp9s0 root cake bandwidth 80Mbit docsis nat ack-filter | |
pre-down tc qdisc del dev enp9s0 root |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Place your key bindings in this file to overwrite the defaults | |
[ | |
{ | |
"key": "shift+cmd+l", | |
"command": "editor.action.insertCursorAtEndOfEachLineSelected", | |
"when": "editorTextFocus" | |
}, | |
{ | |
"key": "shift+cmd+c", | |
"command": "workbench.action.terminal.toggleTerminal" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
# Ident lookup for incoming connections | |
# RFC 1413 - Identification Protocol | |
import socket | |
def lookup_ident(host, server_port, client_port): | |
s = socket.socket(socket.AF_INET6, socket.SOCK_STREAM) | |
s.settimeout(1) | |
try: | |
s.connect((host, 113)) |
NewerOlder