Skip to content

Instantly share code, notes, and snippets.

View akimsko's full-sized avatar

Bo Thinggaard akimsko

View GitHub Profile
@akimsko
akimsko / keyboardlistener.cs
Created March 10, 2012 12:41 — forked from Ciantic/keyboardlistener.cs
C# Keyboard listener
using System;
using System.Diagnostics;
using System.Runtime.InteropServices;
using System.Runtime.CompilerServices;
using System.Windows.Input;
using System.Windows.Threading;
using System.Collections.Generic;
namespace Ownskit.Utils
{
@akimsko
akimsko / gist:1505967
Created December 21, 2011 13:01
PHPLOL
if (('1lol' + 1) == 2) {
echo 'php rawks!';
}
@akimsko
akimsko / PHP - finding escaped backslashes
Created September 7, 2011 07:16 — forked from Ibmurai/PHP - finding escaped backslashes
PHP, regex and double quoted strings are fun...
<?php
/* This handy script lets you locate escaped backslashes in the prettiest way. */
$input = $_POST['value'];
$matches = array();
if (preg_match("/\\\\/", $input, $matches)) {
var_dump($matches);
} else {