Skip to content

Instantly share code, notes, and snippets.

View asgrim's full-sized avatar
😈
Doing evil things, probably. Sorry...

James Titcumb asgrim

😈
Doing evil things, probably. Sorry...
View GitHub Profile
<?php
require "vendor/autoload.php";
class Foo {
public function bar() {}
}
$c = 1000;
@asgrim
asgrim / trollface on skype
Created August 27, 2015 13:31
as it says
:):):)(bandit)(bandit)(bandit)(bandit)(bandit)(bandit)(bandit)(bandit)(bandit):):):)
:)(bandit)(bandit):)(swear)(swear)(swear)(swear)(swear)(swear):):)(bandit):):)
(bandit):)(swear)(swear)(swear):):):):)(swear)(swear)(swear):)(bandit):)
(bandit):)(swear)(bandit)(bandit):):):):)(bandit)(bandit)(bandit)(swear)(bandit):)
(bandit)(swear)(bandit)(bandit)(bandit)(bandit):):)(bandit)(bandit)(bandit)(bandit)(bandit)(swear)(bandit)
(bandit)(swear):):):)(emo):):):):):):):)(swear)(bandit)
(bandit)(swear):):)(emo):):):)(emo):):):)(bandit)(swear)(bandit)
(bandit)(swear):):):)(emo)(emo)(emo):):)(bandit)(bandit)(bandit)(swear)(bandit)
(bandit):)(bandit)(bandit):):):):)(bandit)(bandit)(bandit)(~)(bandit)(swear)(bandit)
Exception#__construct.message
Exception#__construct.code
Exception#__construct.previous
ErrorException#__construct.message
ErrorException#__construct.code
ErrorException#__construct.severity
ErrorException#__construct.filename
ErrorException#__construct.lineno
ErrorException#__construct.previous
Closure#bind.newscope
foreach ([
'TraitFixtureA',
// 'TraitFixtureB',
// 'TraitFixtureC',
// 'TraitFixtureD',
] as $c) {
echo "\n\n" . $c . "\n" . str_repeat('=', strlen($c)) . "\n\n";
$a = new \ReflectionClass($c);
var_dump($a->getTraits());
var_dump($a->getTraitNames());
@asgrim
asgrim / keybase.md
Created July 6, 2015 09:36
keybase proof

Keybase proof

I hereby claim:

  • I am asgrim on github.
  • I am asgrim (https://keybase.io/asgrim) on keybase.
  • I have a public key whose fingerprint is 0CA7 4C69 68D5 5872 4C63 BC89 11EA 1C58 CEF3 7C1C

To claim this, I am signing this object:

<?php
/**
* Zend Framework (http://framework.zend.com/)
*
* @link http://github.com/zendframework/zf2 for the canonical source repository
* @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
*/
namespace ZendTest\EventManager;
@asgrim
asgrim / vpn.sh
Created May 11, 2015 09:23
OpenVPN with nameserver - when you connect to a VPN that does not automatically set appropriate nameserver, this wraps it and makes it work.
#!/bin/bash
if [ "$(id -u)" != "0" ]; then
echo "You must be root..."
exit 1
fi
sed -i -e "s/search homerouter\.cpe/nameserver 192.168.2.2\nsearch homerouter.cpe/" /etc/resolv.conf
openvpn --config #path-to-ovpn-config#
sed -i '/nameserver 192.168.2.2/d' /etc/resolv.conf
#include <iostream>
using namespace std;
int main()
{
int v;
int *ptr = &v;
*ptr = 15;
@asgrim
asgrim / blah.php
Last active August 29, 2015 14:14
function foo($value)
{
return ['hello', $value];
}
@asgrim
asgrim / .gitignore
Last active August 29, 2015 14:14
My stack interpreter from Cute Little Interpreters tutorial at phpbnl15
vendor