Skip to content

Instantly share code, notes, and snippets.

View skwerlman's full-sized avatar
🧙‍♂️
wizard emoji

skwerlman

🧙‍♂️
wizard emoji
View GitHub Profile
@skwerlman
skwerlman / install-cockatrice.sh
Last active April 23, 2017 08:33
install cockatrice bleeding-edge on xubuntu
#!/usr/bin/env bash
sudo true || (echo "fatal: Root is needed to perform an upgrade!" & kill $$)
sudo add-apt-repository -y ppa:ubuntu-sdk-team/ppa
sudo apt-get update
sudo apt-get -y install git libprotobuf-dev protobuf-compiler qtbase5-dev qtdeclarative5-dev libqt5webkit5-dev libsqlite3-dev qt5-default qttools5-dev-tools qttools5-dev qtmultimedia5-dev libqt5svg5-dev cmake
cd ~
git clone git://github.com/Daenyth/Cockatrice
cd Cockatrice
mkdir build
cd build
@skwerlman
skwerlman / dec-to-cod.lua
Last active August 29, 2015 14:14
convert .dec's to .cod's
#!/usr/bin/env lua5.2
-- this must be run under 5.2 or 5.3 with 5.2 compat
-- this converter goes one way; i will not provide a way to go back to dec as that would involve discarding data
--[[
local bDebug = true
--]]
--
-- Really ugly constant definitions and handling of args
@skwerlman
skwerlman / IPs.md
Created April 17, 2015 18:15
Regex Cheatsheet

IPv4:

\b(?:(?:25[0-5]|2[0-4]\d|1?[1-9]?\d)\.){3}(?:25[0-5]|2[0-4]\d|1?[1-9]?\d)\b

IPv6:

((([\dA-Fa-f]{1,4}:){7}([\dA-Fa-f]{1,4}|:))|(([\dA-Fa-f]{1,4}:){6}(:[\dA-Fa-f]{1,4}|((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([\dA-Fa-f]{1,4}:){5}(((:[\dA-Fa-f]{1,4}){1,2})|:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([\dA-Fa-f]{1,4}:){4}(((:[\dA-Fa-f]{1,4}){1,3})|((:[\dA-Fa-f]{1,4})?:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([\dA-Fa-f]{1,4}:){3}(((:[\dA-Fa-f]{1,4}){1,4})|((:[\dA-Fa-f]{1,4}){0,2}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([\dA-Fa-f]{1,4}:){2}(((:[\dA-Fa-f]{1,4}){1,5})|((:[\dA-Fa-f]{1,4}){0,3}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([\dA-Fa-f]{1,4}:){1}(((:[\dA-Fa-f]{1,4}){1,6})|((:[\dA-Fa-f]{1,4}){0,4}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(:(((:[\dA-Fa
@skwerlman
skwerlman / color2.lua
Last active August 29, 2015 14:26
SolderInfo
local function reset()
term.setTextColor(colors.white)
end
function printc(color, ...)
term.setTextColor(color)
print(...)
end
function writec(color, ...)
local try = require "try"
try(
function()
error('oops')
end
):catch(
function(err)
print('caught error: ' .. err)
end
@skwerlman
skwerlman / xkcd-1513-3.lua
Created August 27, 2015 14:38
An implementation of xkcd 1513's 3rd insult
--[[
For best/most-reasonably-timed results, use with luajit
License: MIT
NOTE: this code has never finished running
--]]
local sourceString = 'This is a string. We will randomize a single character from it. After we do that, we will see if it runs as valid Lua code. If not, we will try again.'
@skwerlman
skwerlman / openpgp.txt
Created March 28, 2016 03:22
OpenKeychain Linked Identity
This Gist confirms the Linked Identity in my OpenPGP key, and links it to this GitHub account.
Token for proof:
[Verifying my OpenPGP key: openpgp4fpr:5d9df29e62c5c2e2951adc69862823899ac2e445]
@skwerlman
skwerlman / EXAMPLE_ISSUE_TEMPLATE.md
Last active April 1, 2016 11:26
Example template setup for TechnicSolder
#!/bin/bash
sudo apt-get update
sudo apt-get purge hexchat hexchat-common hexchat-perl hexchat-plugins hexchat-python
sudo apt-get purge pidgin pidgin-data pidgin-libnotify pidgin-otr
sudo apt-get purge deadbeef
sudo apt-get purge vlc vlc-data vlc-nox vlc-plugin-notify vlc-plugin-samba libvlc5 libvlccore8
sudo apt-get update
sudo apt-get upgrade
sudo apt-get autoremove
@skwerlman
skwerlman / install-haxe.sh
Last active August 31, 2016 02:22 — forked from jgranick/install-haxe.sh
Haxe Linux install script
#!/bin/sh
HAXE_VERSION=3.3.0-rc1
NEKO_VERSION=2.1.0
if [ `uname -m` = "armv7l" ]; then
HAXE_VERSION=3.1.3