Skip to content

Instantly share code, notes, and snippets.

View lrstanley's full-sized avatar
👋
Busy. All the time.

Liam Stanley lrstanley

👋
Busy. All the time.
View GitHub Profile
@lrstanley
lrstanley / tunnel_4to6.py
Last active July 12, 2023 22:27
How to use tunnelbroker tunnels on KVM/OpenVZ/etc. (Debian)
"""
HE-2-4 Copyright (C) 2014 Liam Stanley
License: Eiffel Forum License, version 2
- https://links.ml/FFa1
Website: https://liamstanley.io
NOTE: THIS IS FOR KVM BASED SERVERS ONLY.
I'M NOT ADDING CUSTOM CHECKS TO SEE IF
YOU'RE USING KVM.
"""
@lrstanley
lrstanley / shorten.py
Last active August 29, 2015 13:56
Weechat script to auto convert links into a shortened link, using http://links.ml (Put this in ~/.weechat/python/shorten.py)
import weechat as w
import re, urllib, urllib2, json
weechat = w
SCRIPT_NAME = "shorten"
SCRIPT_AUTHOR = "Liam Stanley <me@liamstanley.io>"
SCRIPT_VERSION = "0.2"
SCRIPT_LICENSE = "GPL3"
SCRIPT_DESC = "Convert/Shorten all links to http://links.ml/ links"
@lrstanley
lrstanley / jsonapi-v2.py
Last active August 29, 2015 13:56
JSONAPI basic HTTP Python API
#!/usr/bin/python
import json
from hashlib import sha256
from urllib2 import urlopen
from urllib import quote
# https://github.com/alecgorge/jsonapi/wiki/Analyzing-the-jsonapi-request-and-response-format
# http://alecgorge.github.io/jsonapi/
# NEW API USAGE: http://mcjsonapi.com/apidocs/
@lrstanley
lrstanley / install_supervisor.sh
Created January 26, 2014 05:09
Supervisord basic install instructions for Debian (Ubuntu)
#!/bin/bash
# First, install supervisor. Don't install through your package manager because those packages are unupdated!
sudo apt-get install python-setuptools python-pip curl
easy_install supervisor
# Use pip too
pip install supervisor
@lrstanley
lrstanley / supervisord
Created January 26, 2014 05:01
Supervisord init.d script
#! /bin/sh
### BEGIN INIT INFO
# Provides: supervisord
# Required-Start: $remote_fs
# Required-Stop: $remote_fs
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: Supervisord initscript
# Description: This file should be used to construct scripts to be
# placed in /etc/init.d.
@lrstanley
lrstanley / media.php
Created December 13, 2013 13:38
Media based file indexer. (I.e, if you have a directory full of .png, .txt, or .doc, etc) this will cleanly list them (and remove the index.php from the list of files)
<!doctype html>
<html>
<head>
<title>File index</title>
<meta name="viewport" content="width=device-width">
<!--<link rel="stylesheet" href="https://netdna.bootstrapcdn.com/bootstrap/3.0.3/css/bootstrap.min.css">-->
<link rel="stylesheet" href="https://netdna.bootstrapcdn.com/bootswatch/3.0.2/cosmo/bootstrap.min.css">
<script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/2.0.3/jquery.min.js"></script>
<script type="text/javascript" src="https://netdna.bootstrapcdn.com/bootstrap/3.0.3/js/bootstrap.min.js"></script>
</head>
@lrstanley
lrstanley / dark_teal.css
Last active December 19, 2015 08:19
Custom PISG (Perl IRC Statistics Generator) Theme
a {
color: #0088FF;
}
a:link {
color: #0088FF;
}
a:visited {
color: #0088FF;
}
a:hover {
@lrstanley
lrstanley / url_collector.ini
Last active February 28, 2021 00:27
mIRC URL collector/GUI viewer
on 1:TEXT:*http*//*:#:{
var %url = $wildtok($1-, http://*, 1, 32)
if (%url == $NULL) { return }
if ($read(banurls.txt,wn,* $+ %url $+ *) != $NULL) { return }
if ($read(urls.txt,wn,* $+ %url $+ *) == $NULL) {
write urls.txt - $fulldate - $chan ( $+ $nick $+ ): $1-
}
}
alias urlrec {
if ($dialog(UR.Main)) dialog -v UR.Main