Skip to content

Instantly share code, notes, and snippets.

@jacob1
jacob1 / TurnipPrices.cpp
Last active August 8, 2021 12:54 — forked from Treeki/TurnipPrices.cpp
AC:NH turnip price calculator
#include <stdint.h>
#include <stdio.h>
#include <stdlib.h>
// munged from https://github.com/simontime/Resead
namespace sead
{
class Random
{
@jacob1
jacob1 / savebackup.py
Created January 22, 2019 00:56
backup tpt saves, just give it a powder.pref
import urllib, urllib2
import re
import sys
import json
def FatalError(message):
print(message)
exit(1)
def GetPage(url, cookies = None, headers = None, removeTags = False):
@jacob1
jacob1 / buffextras.py
Last active February 5, 2018 01:55
Makes *buffextras messages look better
import hexchat
import re
import collections
__module_name__ = "Pretty Buffextras"
__module_version__ = "1.1"
__module_description__ = "Makes *buffextras messages look better"
__module_author__ = "Mrprocom"
@jacob1
jacob1 / hexchat example lua script.lua
Created July 7, 2017 23:40
Hexchat example Lua script
hexchat.register("myscript", "0.1", "script description goes here")
local function DelayedMessage(context, message)
context:command("say "..message)
end
local function makeFancyCallback(f, ...)
local arg = {...}
return function() return f(unpack(arg)) end
end
@jacob1
jacob1 / colors.conf
Last active January 4, 2017 03:24
hexchat colors
color_0 = d3d3 d7d7 cfcf
color_1 = 2e2e 3434 3636
color_2 = 3434 6565 a4a4
color_3 = 4e4e 9a9a 0606
color_4 = cccc 0000 0000
color_5 = 8f8f 3939 0202
color_6 = 5c5c 3535 6666
color_7 = cece 5c5c 0000
color_8 = c4c4 a0a0 0000
color_9 = 7373 d2d2 1616
@jacob1
jacob1 / startbot.py
Last active January 21, 2017 21:53
!!freload
#!/usr/bin/env python3
# Copyright (c) 2011 Jimmy Cao
# 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
# furnished to do so, subject to the following conditions:
# The above copyright notice and this permission notice shall be included in
@jacob1
jacob1 / instructions.txt
Last active September 16, 2015 06:09
installing the script manager and tptmp
Downloading the TPT Multiplayer or the script manager can be confusing.
Well it really isn't that hard, but on some platforms like mac it is a little work to open the data folder, and make sure you create autorun.lua properly.
Here is some code that will download the script manager for you (restart required):
c=socket.connect("starcatcher.us",80)c:send"GET /scripts/main.lua?get=1\n"d=c:receive"*a"f=io.open("autorun.lua","w")
l=d:find("--Crac")d=d:sub(l)f:write(d)f:close()
Copy the first line and paste it into the console, then copy and paste the other, then restart TPT.
Afterwards, a 'LUA' icon appears above the walls menusection, click that and click on 'online'.
Once it gets the script list, download the first one (TPTMulti).