Skip to content

Instantly share code, notes, and snippets.

View ProdigySim's full-sized avatar

Michael Busby ProdigySim

View GitHub Profile
using System;
using System.Runtime.CompilerServices;
using System.Threading.Tasks;
public class Class1
{
static Class1()
{
DoThing();
}
@ProdigySim
ProdigySim / SteamConnectionDemo.cs
Created March 8, 2014 21:14
Trying to write an async wrapper for SteamKit's SteamClient
using SteamKit2;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace SteamConnection
{
class Program
#include <left4downtown>
Handle:g_SurvSetCVar;
public OnPluginStart()
{
g_SurvSetCVar = CreateConVar("l4d_force_survivorset", "2",
"Forces specified survivor set (0 - do not force, 1 - force l4d1 set, 2 - force l4d2 set (allows to use l4d2 survivors voices in l4d1 campaigns))",
FCVAR_PLUGIN);
}
@ProdigySim
ProdigySim / l4d2_scoringwip.sp
Created February 4, 2013 12:07
Current progress of scoring WIP
#include <sourcemod>
#include <sdktools>
#include <left4downtown>
#include <l4d2_direct>
#define L4D2UTIL_STOCKS_ONLY
#include <l4d2util>
//#include <sendproxy>
public Action:L4D2_OnEndVersusModeRound(bool:countSurvivors)
@ProdigySim
ProdigySim / GameRules_DataNatives.diff
Created January 27, 2013 20:58
some potential patches for sm-central
# HG changeset patch
# Parent bf0211912ba1b67fc60d80038627156bb85e2779
Gamerules GetData natives.
diff -r bf0211912ba1 -r 03044c5b5fdf extensions/sdktools/gamerulesnatives.cpp
--- a/extensions/sdktools/gamerulesnatives.cpp Sun Jan 27 12:49:25 2013 -0800
+++ b/extensions/sdktools/gamerulesnatives.cpp Sun Jan 27 12:50:49 2013 -0800
@@ -87,6 +87,18 @@
PropField_String_T, /**< Valid for Data fields. Read only! */
};
@ProdigySim
ProdigySim / scoring_wip.sp
Created January 24, 2013 08:16
A little project I'm working on.
#include <sourcemod>
#include <sdktools>
#include <left4downtown>
#include <l4d2_direct>
#include <l4d2util>
stock SetVersusRoundInProgress(bool:inProgress)
{
static Address:pRoundInProgress = Address_Null;
if(pRoundInProgress == Address_Null)
@ProdigySim
ProdigySim / YoutubeUploadsHomepage.user.js
Created December 14, 2012 08:56
Greasemonkey script to make youtube less annoying after their homepage changes...
// ==UserScript==
// @name YoutubeUploadsHomepage
// @namespace Youtube
// @description Youtube Button goes to uploads page
// @include http*://*.youtube.com/*
// @version 1
// ==/UserScript==
document.getElementById('logo-container').href="/feed/subscriptions/u";
@ProdigySim
ProdigySim / Program.cs
Created November 7, 2012 21:13
saltarelle import constructor names
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Runtime.CompilerServices;
namespace saltytest
{
class Program
{
@ProdigySim
ProdigySim / Program.cs
Created October 30, 2012 18:12
example of event nulling behavior
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
//Expected Output:
//
//Execute: (Status: null)
//=======
//Execute: (Status: not null)
@ProdigySim
ProdigySim / addrtest.sp
Created March 11, 2012 00:49
Testing address functions of sourcemod
#include <sourcemod>
new Handle:g_hConf;
public OnPluginStart()
{
g_hConf = LoadGameConfigFile("addrtest");
RegConsoleCmd("addrtest_win", WinTest);
RegConsoleCmd("addrtest_lin", LinTest);
}