Skip to content

Instantly share code, notes, and snippets.

<!DOCTYPE html PUBLIC> <html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>nullcrew.org</title>
<style type="text/css">*{margin:0; padding:0; border: 0; overflow:hidden} html, body {height: 100%;}</style>
</head>
<body width="100%" height="100%">
<noscript><meta http-equiv="refresh" content="0;url=http://imptestrm.com/rg-erdr.php?_dnm=nullcrew.org&_cfrg=1&_drid=as-drid-2908636497978342" /><center><p style="padding:1em; font-size:1.5em;">For search results please <a href="http://imptestrm.com/rg-erdr.php?_dnm=nullcrew.org&_cfrg=1&_drid=as-drid-2908636497978342" style="text-decoration:underline; color:#0000EE;">CLICK HERE</a>.</p></center></noscript>
<div id="rmgblock" width="100%" height="100%"></div>
public class Recorder : DynamicObject
{
private readonly ConcurrentQueue<KeyValuePair<string, object[]>> _methodsToInvoke;
public Recorder()
{
this._methodsToInvoke = new ConcurrentQueue<KeyValuePair<string, object[]>>();
}
public override bool TryInvokeMember(InvokeMemberBinder binder, object[] args, out object result)
export class Compiler {
//this is for version 0.9.5
private static libfile: any = ...;
private static FileName: string = 'sample.ts';
private _compiler: any;
constructor(sourceFile: string) {
this._compiler = new TypeScript.TypeScriptCompiler(null, this.Settings());
this._compiler.addFile('lib.d.ts', Compiler.libfile);
@Buildstarted
Buildstarted / Measure.cs
Last active January 2, 2016 01:09
Simple wrapper to measure how long it takes to run a block of code.
public static class Measure
{
public static bool PerformMeasure = true;
public static MeasureInst Step()
{
return new MeasureInst();
}
public static MeasureInst Step(string name)
{
@Buildstarted
Buildstarted / Trigger.ts
Last active December 29, 2015 20:29
Trigger object to define areas that cause events.
export enum TriggerType {
TriggerOnceAndRemove,
TriggerOnEnter,
TriggerOnLeave,
TriggerOnLeaveAndRemove,
TriggerOnEnterAndLeave
}
export class Trigger<T> extends eg.Collision.Collidable {
public Name: string;
@Buildstarted
Buildstarted / timers.ts
Created November 14, 2013 05:47
4 different timer implementations in typescript
module Utilities {
export class Timer implements eg.IUpdateable {
private OnTick: eg.EventHandler;
private _start: number;
private _interval: number;
private _started: boolean;
private _lastTime: number;
constructor(interval: eg.TimeSpan);
constructor(interval: eg.TimeSpan, callback?: Function);
///<reference path="typings/jquery/jquery.d.ts"/>
///<reference path="typings/signalr/signalr.d.ts"/>
module T {
export class CommandAdapter {
public OnPrint: any;
public Proxy: HubProxy;
public Connection: HubConnection;
constructor() {
this.Initialize($.connection.hub, (<any>$.connection).command);
@Buildstarted
Buildstarted / gist:7241388
Created October 30, 2013 22:22
Chat.ts for EndGate
module EndGate.Multiplayer {
export class ChatAdapter {
public OnMessageReceived: eg.EventHandler1<ChatMessage>;
public OnConnected: eg.EventHandler1<ChatConnected>;
public Proxy: HubProxy;
public Connection: HubConnection;
constructor() {
this.Connection = $.connection.hub;
this.Proxy = (<any>$.connection).chat;
//TODO: Add configuration for timeout and nprogress templates
(function ($, nProgress, undefined) {
if ($ === undefined) {
console.error("jQuery was not found. Please ensure jQuery is referenced before signalr.nprogress.js.");
}
if ($.signalR === undefined) {
console.error("SignalR was not found. Please ensure SignalR is referenced before signalr.nprogress.js.");
}
public class DucknamicObject : DynamicObject, IDictionary<string, object>, ICollection<KeyValuePair<string, object>>, IEnumerable<KeyValuePair<string, object>>, IEnumerable
{
private readonly IDictionary<string, object> _backing;
public override bool TryInvokeMember(InvokeMemberBinder binder, object[] args, out object result)
{
if (_backing.ContainsKey(binder.Name))
{
if (args.Any() && args[0].GetType() == typeof (bool) && ((bool) args[0]))
{