Skip to content

Instantly share code, notes, and snippets.

View N3X15's full-sized avatar

Rob Nelson N3X15

View GitHub Profile
@N3X15
N3X15 / .atom_build.json
Created September 19, 2017 05:00
VGStation13 atombuild
{
"_cmd_old": "C:\\Program Files (x86)\\BYOND\\bin\\dm.exe",
"cmd": "F:\\PATH\\TO\\vgstation13\\byond\\bin\\dm.exe",
"args": [ "vgstation13.dme" ],
"sh": false,
"errorMatch":
[
"\n(?<file>[\\\\\/0-9a-zA-Z\\._]+):(?<line>\\d+).*"
]
}
@N3X15
N3X15 / github.py
Last active February 23, 2017 06:46
Retrofit for github.py in MoMMI
@command(r"testmerge\s*\[?(\d+)\]?$")
async def test_merger(content, match, message):
if not isowner(message.author):
await output(message.channel, "No")
return
id = int(match.group(1))
async with aiohttp.ClientSession() as session:
# GET /repos/:owner/:repo/pulls/:number
url = github_url("/repos/{}/{}/pulls/{}".format(get_config("github.repo.owner"), get_config("github.repo.name"), id))
@N3X15
N3X15 / fixSQL.py
Created July 18, 2015 03:26
pg2mysql Output SQL Fixer
# pg2mysql SQL Fixer
# (c)2015 Rob "N3X15" Nelson <nexisentertainment@gmail.com>
#
# Available under the MIT Open-Source License
#
import os
import sys
import re
@N3X15
N3X15 / gen-blueprints.py
Last active April 5, 2022 20:57
Generate Assembler Blueprints for Space Engineers mods.
'''
Spengies Assembler Blueprint Generator
Copyright (c) 2015 Rob "N3X15" Nelson <nexisentertainment@gmail.com>
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
@N3X15
N3X15 / TorDNSBL.php
Last active August 29, 2015 14:15
(Old) Tor DNSBL for PHP
<?php
/* MIT license, (c) 2008-2015 Rob Nelson.
This is older than Christ, so may or may not work.
Older than composer, so you need ADODB and Savant2 for the verbatim version.
*/
include_once('adodb/adodb.inc.php');
include_once('Savant2.php');
class DNSBL
{
@N3X15
N3X15 / logtool.py
Created December 23, 2014 05:06
SS13 Log Parsing Tool
import os, sys, re, argparse
REG_ADMIN_PM = re.compile('ADMIN: (HELP|PM)')
REG_ADMIN_CHAT = re.compile('ADMIN: MOD') # msay
argp = argparse.ArgumentParser()
argp.add_argument('filename', type=str, help="Filename to grep")
argp.add_argument('outfile', type=str, help="Report filename")
argp.add_argument('-s', '--start', type=int, default=0, nargs='?', help='Line number to start at')
argp.add_argument('-e', '--end', type=int, default=None, nargs='?', help='Line number to end at')
@N3X15
N3X15 / bug68156.phpt
Created October 5, 2014 09:22
PHPT for PHP #68156
--TEST--
Bug #68156 (pg_query_params Sets Boolean False to Blank String)
--SKIPIF--
<?php
include("skipif.inc");
skip_server_version('7.4', '<');
?>
--FILE--
<?php
error_reporting(E_ALL);
@N3X15
N3X15 / dna_modifier.dm.patch
Created December 17, 2013 05:01
Changes between pre-DNA2 DNA modifiers and the current code.
--- C:/Users/Rob/Documents/Projects/vgstation13/code/game/dna/dna_modifier-a10e760.dm Mon Dec 16 20:53:20 2013
+++ C:/Users/Rob/Documents/Projects/vgstation13/code/game/dna/dna_modifier.dm Mon Dec 16 06:33:31 2013
@@ -14,7 +14,7 @@
var/locked = 0
var/mob/living/carbon/occupant = null
var/obj/item/weapon/reagent_containers/glass/beaker = null
- var/opened = 0.0
+ var/opened = 0
/obj/machinery/dna_scannernew/New()
/datum/construction/reversible/mecha/phazon
result = "/obj/mecha/combat/phazon"
steps = list(
//1
list("key"=/obj/item/weapon/weldingtool,
"backkey"=/obj/item/weapon/wrench,
"desc"="External armor is wrenched."),
//2
list("key"=/obj/item/weapon/wrench,
package net.llamaslayers.minecraft.biome;
import java.lang.reflect.Field;
import java.util.List;
import java.util.Random;
import java.util.logging.Logger;
import net.minecraft.server.BiomeBase;
import net.minecraft.server.BiomeCache;
import net.minecraft.server.ChunkPosition;