Skip to content

Instantly share code, notes, and snippets.

View mjohnson9's full-sized avatar

Mike Johnson mjohnson9

View GitHub Profile
@tim-evans
tim-evans / xmpp_cascade_data_source.js
Created December 22, 2011 16:45
Cascade XMPP Data Source
XMPP = {};
// ...............................................
// Models
//
XMPP.BOSHConnection = SC.Record.extend({
primaryKey: 'jid',
jid: SC.Record.attr(String),
password: SC.Record.attr(String),
@audreyfeldroy
audreyfeldroy / pypi-release-checklist.md
Last active February 23, 2023 15:03
My PyPI Release Checklist
  • Update HISTORY.md
  • Commit the changes:
git add HISTORY.md
git commit -m "Changelog for upcoming release 0.1.1."
  • Update version number (can also be minor or major)
bumpversion patch
@dotysan
dotysan / spamhaus2quagga.sh
Last active June 17, 2020 05:52
Run as hourly cronjob to sync the Spamhaus DROP/EDROP lists into quagga.
#! /bin/bash -e
#
# maintain spamhaus blacklists as quagga prefix filters
#
cd ~/net
wget -nv -N http://www.spamhaus.org/drop/{,e}drop.txt
re1='^([0-9]+\.[0-9]+\.[0-9]+\.[0-9]+/[0-9]+) '
re2='^([-+])([0-9]+\.[0-9]+\.[0-9]+\.[0-9]+/[0-9]+)$'
@mjohnson9
mjohnson9 / dscp-designer.go
Last active March 1, 2016 04:35
QoS designer for RouterOS devices
package main
import (
"bytes"
"flag"
"fmt"
"io"
"os"
"strconv"
"strings"
@tallclair
tallclair / restricted-psp.yaml
Last active April 16, 2024 07:46
Restricted PodSecurityPolicy
apiVersion: extensions/v1beta1
kind: PodSecurityPolicy
metadata:
name: restricted
annotations:
seccomp.security.alpha.kubernetes.io/allowedProfileNames: 'docker/default'
apparmor.security.beta.kubernetes.io/allowedProfileNames: 'runtime/default'
seccomp.security.alpha.kubernetes.io/defaultProfileName: 'docker/default'
apparmor.security.beta.kubernetes.io/defaultProfileName: 'runtime/default'
spec:
@izzyleung
izzyleung / README.md
Last active June 5, 2024 03:23
Update your WireGuard public key in Mullvad via its public API

Generate a new pair of keys via wg

$ wg genkey | tee privatekey | wg pubkey > publickey

Rotate your public key via the same logic as in Mullvad's source code:

  • Step 1: Obtaining an access token:
$ curl -fsSL -X POST \
    -H 'Content-Type: application/json' \