Skip to content

Instantly share code, notes, and snippets.

View jlu5's full-sized avatar

James Lu jlu5

View GitHub Profile
@jlu5
jlu5 / docker-compose.yml
Created April 10, 2020 21:02
example docker compose for pylink
version: '3.7'
services:
pylink:
restart: always
image: jlu5/pylink:3
volumes:
- /path/to/your/configs/:/pylink
@jlu5
jlu5 / proxmox-import-cloud.sh
Created February 19, 2020 05:49
Import a cloud-init image to Proxmox - based off notes at https://pve.proxmox.com/wiki/Cloud-Init_Support
#!/bin/bash
set -e
if [[ -z "$3" ]]; then
echo "Usage: $0 <VM ID> <VM NAME> <IMAGE PATH>"
echo "Imports the given cloud-init image into a VM with the given ID."
exit 1
fi
@jlu5
jlu5 / pylink@.service
Created November 27, 2019 05:41
Sample systemd service definition for PyLink
# SASL-only Tor hidden service for InspIRCd 2.0
# Replace "10.20.30.40" with whatever IP Tor users will be connecting from. In my case, I defined
# that IP in a separate loopback interface which is only used by the Tor daemon.
# Accept logged in users
<connect
name="tor-hidden"
allow="10.20.30.40"
resolvehostnames="no"
useident="no"
From 68e7cdd057a5a3a0a7cf8d4acf01c7daf2a10ed1 Mon Sep 17 00:00:00 2001
From: James Lu <james@overdrivenetworks.com>
Date: Fri, 5 Oct 2018 23:39:04 -0700
Subject: [PATCH] [WIP] discord madness, pass 1
---
classes.py | 7 ++-
protocols/discord.py | 136 +++++++++++++++++++++++++++++++++++++++++++
2 files changed, 142 insertions(+), 1 deletion(-)
create mode 100644 protocols/discord.py
@jlu5
jlu5 / alioth-authors.py
Created June 3, 2017 08:40
Generates git-svn authors files for alioth.debian.org SVN repositories.
#!/usr/bin/env python3
"""
Generates a git-svn authors file using usernames from https://alioth.debian.org.
"""
import subprocess
import re
import bs4
import urllib.request
import sys
@jlu5
jlu5 / supy-gh-formats.txt
Last active April 7, 2018 23:52
Custom configuration for the Limnoria GitHub plugin (https://github.com/ProgVal/Supybot-plugins/tree/master/GitHub)
config plugins.github.format.before.push "cif [ceq [echo $__num_commits] 0] ignore \"echo \\\"[2$repository__owner__name/$repository__name] 07$pusher__name pushed $__num_commits commit(s) to $ref__branch:\\\" [urlify $compare]\""
prefer username:
config plugins.github.format.push "echo \"[2$repository__owner__name/$repository__name]07\" [cif [ceq [echo $__commit__author__username] $__commit__author__username] \"echo \\\"$__commit__author__name\\\"\" \"echo \\\"$__commit__author__username\\\"\"] \"[$__commit__id__short] $__commit__message__firstline\""
use realname:
Working on it...
config plugins.github.format.commit_comment "echo \"[2$repository__owner__login/$repository__name] 07$comment__user__login commented on commit $comment__commit_id__short\" [urlify $comment__html_url__tiny]"
@jlu5
jlu5 / 0serverprotocol.md
Last active February 1, 2017 04:37
UnrealIRCd 3.2 Server Protocol docs, ripped from https://www.vulnscan.org/UnrealIRCd/serverprotocol.html as the original is dead

Unreal 3.2 Protocol Documentation

Last update: 29 November 2006

1 Introduction

This document describes the UnrealIRCd server-to-server protocol as of protocol 2307 (Unreal 3.2.4).

@jlu5
jlu5 / genchanges.sh
Last active January 11, 2017 02:11 — forked from thepaul/changelog_from_deb.sh
extract and dump the changelog of a Debian package
#!/bin/bash
# Adapted from https://gist.github.com/thepaul/1002763
changelog_from_deb () {
# won't work when packages symlink their docs from another package from the same source;
# you'll get "No changelog found."
if [[ -z "$2" || -e "$2" ]]; then
echo "Target file \"$2\" exists or is empty; skipping" >&2
return 0
ּ_בּ
בּ_בּ
טּ_טּ
כּ‗כּ
לּ_לּ
מּ_מּ
סּ_סּ
תּ_תּ
٩(×̯×)۶
٩(̾●̮̮̃̾•̃̾)۶