Skip to content

Instantly share code, notes, and snippets.

View N3X15's full-sized avatar

Rob Nelson N3X15

View GitHub Profile
@N3X15
N3X15 / mod_SnowFall.java
Created January 25, 2011 02:03
Snowfall mod for modloader (lolbroken)
/**
* Public domain.
*/
package net.minecraft.src;
import net.minecraft.client.Minecraft;
import org.lwjgl.input.Keyboard;
/**
* Most of SnowMod is in World, Chunk, and EntityRenderer. This is merely for
<worlds>
<world name="titan" seed="">
<generate>
<IslandProvider />
</generate>
<populate>
<stage id="prepopulate">
<ore type="14" distribution="vein" probability="5" minY="0" maxY="64" />
<ore type="15" distribution="glob" probability="4" minY="0" maxY="64" />
</stage>
@N3X15
N3X15 / gist:1051220
Created June 28, 2011 14:16
Fluid pressure equalization
/**
* Equalize water pressure (think of how water acts in a U-tube)
* @param world
* @param cx Current X Coordinate
* @param cy
* @param cz
* @param ox Original X Coordinate
* @param oy
* @param oz
* @param data Metadata
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;
/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,
@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()
@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 / 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 / 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 / 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