Skip to content

Instantly share code, notes, and snippets.

@Hoikas
Hoikas / gist:8747819
Last active August 29, 2015 13:55
Gehn 19
- Change /dance to loop the animation
- Ensure the launcher actually installs redists
- Fix a few memory leaks in the client
- Fix a lot of nasty memory leaks in the server
- Fix HANDLE leaks in the launcher
- Fix several potential crashes
- Reduce memory usage caused by unnecessary string copying
- Stew leeks
// FIXME: Localize this error message.
plString hack = plString::Format("%S: %s\nThere appears to be a problem with your %s install.\n\
Please run the repair utility found in the Start Menu or Start Screen.",
NetErrorAsString(result), filename.AsString().c_str(),
plProduct::LongName());
@Hoikas
Hoikas / gist:c0aa7094005382abd84a
Last active August 29, 2015 14:25
Korman 0.02 Changelog
- Added the Animation Group modifier
- Added the Render Follow (FollowMod) modifier
- Added the Render Swivel (ViewFaceMod) modifier
- Added the Timed Callback Message logic node
- Added the Enable Message logic node
- Added the Exclude Region logic node
- Added Python logic nodes
- Added Water (waveset) modifiers
- Added the ability to not regenerate baked vertex lighting
- Changed the modifier list to be sorted by name
@Hoikas
Hoikas / gist:e65feaf76b75ad78ba42
Created August 9, 2015 00:46
OnRTChat profile
(08/08 20:43:02) 85function callsin 0.010 seconds
(08/08 20:43:02) Ordered by: cumulative time
(08/08 20:43:02) ncalls tottime percall cumtime percallfilename:lineno(function)
(08/08 20:43:02) 1 0.000 0.000 0.010 0.010profile:0(<bound method xKI._OnRTChat of <ki.xKI instance at 0x109A5AD0>>)
(08/08 20:43:02) 1 0.000 0.000 0.009 0.009__init__.py:1170(_OnRTChat)
(08/08 20:43:02) 1 0.000 0.000 0.009 0.009xKIChat.py:402(AddChatLine)
(08/08 20:43:02) 2 0.003 0.002 0.003 0.002:0(insertStringW)
(08/08 20:43:02) 1 0.002 0.002 0.002 0.002:0(show)
(08/08 20:43:02) 1 0.001 0.001 0.001 0.001:0(refresh)
(08/08 20:43:02) 2 0.001 0.001 0.001 0.001:0(moveCursor)
@Hoikas
Hoikas / gist:960200
Created May 7, 2011 04:29
PEP 302 Import Hook for External.Release
/////////////////////////////////////////////////////////////////////////////
// PEP 302 Import Hook
/////////////////////////////////////////////////////////////////////////////
#ifndef BUILDING_PYPLASMA
struct ptImportHook
{
PyObject_HEAD
};
// First three functions are just so I can be lazy
@Hoikas
Hoikas / nospecials.sp
Created June 4, 2011 23:40
Adam's Versus Mod
#include <sourcemod>
public Plugin:myinfo = {
name = "[L4D2] Adam's Versus Mod",
author = "Adam Johnson",
description = "A variety of modifications for L4D2's Versus mode",
version = "1.0.0",
url = "http://www.hoikas.com"
};
KernelBase.dll!7581d368()
[Frames below may be incorrect and/or missing, no symbols loaded for KernelBase.dll]
kernel32.dll!74e918aa()
> plClient.exe!plSecureStream::ICheckMagicString(void * fp) Line 610 C++
plClient.exe!plSecureStream::IsSecureFile(const wchar_t * fileName) Line 642 + 0x6 bytes C++
plClient.exe!plSecureStream::IsSecureFile(const char * fileName) Line 617 C++
plClient.exe!plStreamSource::GetFile(std::basic_string<wchar_t,std::char_traits<wchar_t>,std::allocator<wchar_t> > filename) Line 128 + 0x11 bytes C++
plClient.exe!plSDLParser::ILoadSDLFile(const char * fileName) Line 328 C++
plClient.exe!plSDLParser::IReadDescriptors() Line 411 + 0xe bytes C++
plClient.exe!plSDLMgr::Init(unsigned int behaviorFlags) Line 74 C++
Shorah everyone!
We will be bringing the MOULa servers down at 10:00 am so that we can modify the current server setup. For more details on what is happening, please read the post Chogon made here: http://mystonline.com/forums/viewtopic.php?t=20014&start=675.
We expect that this process will take about 2 hours and we will post here to let you know when the servers are back up.
Thanks!
Dexter
<?php
define('kPidFile', '/home/dirtsand/server/ds.pid');
function ds_running()
{
// No pid file, no shard.
if (!file_exists(kPidFile)){ return false; }
// Get pid and test to see if that proc is running
$pid = file_get_contents(kPidFile);
if (file_exists('/proc/'.$pid)) { return true; }
from hashlib import md5
from optparse import OptionParser # argparse sucks
import struct
import sys
parser = OptionParser()
parser.add_option("-s", "--source", dest="source",
help="SOURCE file containing known good data", metavar="SOURCE",
default="read.dat")
parser.add_option("-o", "--output", dest="output",