Skip to content

Instantly share code, notes, and snippets.

View NullEntity's full-sized avatar

Bryce Walther NullEntity

  • Philadelphia, PA
View GitHub Profile
@NullEntity
NullEntity / myshoutbox.js
Last active December 10, 2015 16:28 — forked from anonymous/myshoutbox.js
Updated showShouts function to only create the timer once.
// MyShoutbox for MyBB
// (c) Pirata Nervo, www.consoleworld.net
//
// Based off:
// SpiceFuse AJAX ShoutBox for MyBB
// (c) Asad Niazi, www.spicefuse.com!
//
// Code is copyrighted and does not belong to public domain.
// Copying or reusing in different forms/softwares isn't allowed.
//
{
:before => before,
:after => after,
:ref => ref,
:commits => [{
:id => commit.id,
:message => commit.message,
:timestamp => commit.committed_date.xmlschema,
:url => commit_url,
:added => array_of_added_paths,
util.AddNetworkString( "BetchaOpenMenu" )
local DisabledRoundStates = { ROUND_WAIT, ROUND_POST }
local function ParseChat( ply, msg )
if msg ~= "/bet" then return msg end
if not ply:Alive() then
NotifyPlayer( ply, "You must be alive to place a bet!" )
return
elseif ply:IsTraitor() then
@NullEntity
NullEntity / beep.user.js
Created October 16, 2014 23:33
Greasemonkey script to make Lifepunch's shoutobx beep when it doesn't have focus
// ==UserScript==
// @name BEEP BEEP MOTHERFUCKER
// @namespace http://agent766.com/
// @version 0.1
// @description something useful
// @author Scratch
// @match http://www.lifepunch.net/forums/*
// @grant none
// ==/UserScript==
// basic class to hold a publicly accessible GameObject
using UnityEngine;
public class GameManager : MonoBehaviour
{
private GameObject _manager; // static properties can't be modified from the editor
public GameObject manager;
void Start()
{
function removeCircularReferences(obj) {
debugger;
var cache = [];
var filter = function(obj, path) {
return _.reduceRight(obj, function(memo, v, k) {
if (typeof v === 'object' && v !== null) {
var index = cache.indexOf(v);
if (index !== -1) {
memo[k] = '__circular__@' + index;
-- returns `fn` which memoizes its arguments
local function memoize( fn )
local cache = {}
local function memoize(...)
-- convert args into a string if they're a table
local args = {...}
local sArg = table.ToString(args)
-- get the item with the given arguments from the cache
local cached = cache[sArg]
private static void GetRetweets()
{
// oauth implementation details
var oauth_version = "1.0";
var oauth_signature_method = "HMAC-SHA1";
// unique request details
var oauth_nonce = Convert.ToBase64String(new ASCIIEncoding().GetBytes(DateTime.Now.Ticks.ToString()));
private readonly Dictionary<object, Dictionary<Type, Dictionary<object, object>>> _memos = new Dictionary<object, Dictionary<Type, Dictionary<object, object>>>();
public TOut Memoize<TIn, TOut>(TIn input, Func<TIn, TOut> expression)
{
if (_memos.ContainsKey(input)
&& _memos[input].ContainsKey(typeof (TIn))
&& _memos[input][typeof (TIn)].ContainsKey(expression))
return (TOut) _memos[input][typeof (TIn)][expression];
var result = expression(input);
@NullEntity
NullEntity / Error trace.txt
Created November 15, 2016 10:01
Damn Java verbosity
jetbrains.buildServer.maintenance.exceptions.UnknownServerStartupError: Could not create the main application servlet: Error creating bean with name 'buildArtifactsCleaner' defined in URL [jar:file:/C:/TeamCity/webapps/ROOT/WEB-INF/lib/server.jar!/META-INF/buildServerSpring.xml]: Unsatisfied dependency expressed through constructor argument with index 0 of type [jetbrains.buildServer.serverSide.ServerSettings]: Error creating bean with name 'serverSettings' defined in URL [jar:file:/C:/TeamCity/webapps/ROOT/WEB-INF/lib/server.jar!/META-INF/buildServerSpring.xml]: Cannot resolve reference to bean 'buildServer' while setting bean property 'server'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'buildServer' defined in URL [jar:file:/C:/TeamCity/webapps/ROOT/WEB-INF/lib/server.jar!/META-INF/buildServerSpring.xml]: Cannot resolve reference to bean 'userModel' while setting bean property 'userModelEx'; nested exception is org.springframework.beans.factor