Skip to content

Instantly share code, notes, and snippets.

View DexterHaslem's full-sized avatar
💭
why are you taking advice from a site that goes down weekly?

Dexter M Haslem DexterHaslem

💭
why are you taking advice from a site that goes down weekly?
View GitHub Profile
@DexterHaslem
DexterHaslem / gist:6506587
Created September 10, 2013 08:34
asdfasdf
dkms install vboxhost/4.2.18 -k 3.11.0-dmh2+/x86_64
@DexterHaslem
DexterHaslem / gist:6543328
Created September 12, 2013 20:32
closure loop
Action a1 = null;
Action a2 = null;
a1 = () =>
{
Thread.Sleep(1000);
Console.WriteLine("a1");
a2();
};
//
var net = require('net');
var client = net.connect({host: "127.0.0.1", port: 36973},
function()
{
subscribe(client, 'ES 12-13', true)
}
);
IncludeScript("base_ctf")
IncludeScript("base_location")
IncludeScript("base_respawnturret")
function startup()
SetGameDescription("Capture the Flag")
SetPlayerLimit(Team.kBlue, 0)
SetPlayerLimit(Team.kRed, 0)
SetPlayerLimit(Team.kYellow, -1)
Action grabScreenshot = () =>
{
using (Bitmap bitmap = new Bitmap(Screen.PrimaryScreen.Bounds.Width, Screen.PrimaryScreen.Bounds.Height))
using (Graphics graphics = Graphics.FromImage(bitmap))
{
graphics.CopyFromScreen(0, 0, 0, 0, bitmap.Size);
string fileName = "urc00luniquefilenamehere.jpeg";
bitmap.Save(fileName, ImageFormat.Jpeg);
}
};
#include <stdio.h>
#include <stdlib.h>
struct data_info
{
void (*done_callback) (int status);
};
void done_handler(int status)
{
$GCC_ExtraCompilerFlags "-x c" [$LINUXALL]
set s [socket "localhost" 36973]
set done false
set chunk ""
set count 0
while {!$done} {
set char [read $s 1]
if {$char == "\0"} {
puts $chunk
set chunk ""
Action[] a = new Action[3];
for (int y = 0; y < a.Length; y++)
a[y] = new Action(() => Console.WriteLine(y));
for (int y = 0; y < a.Length; y++)
a[y]();
int x = 123;
Action printX = new Action(() => Console.WriteLine(x));
x = 456;
printX();