Skip to content

Instantly share code, notes, and snippets.

Doing evil things, probably. Sorry...

James Titcumb asgrim

Doing evil things, probably. Sorry...
View GitHub Profile
View trollface on skype

Keybase proof

I hereby claim:

  • I am asgrim on github.
  • I am asgrim ( on keybase.
  • I have a public key whose fingerprint is 9561 1CC3 ABF3 B80A 0646 9529 A9FA 0974 0C21 7917

To claim this, I am signing this object:

View Foo.php
// gumf at the top
class Foo extends AbstractActionController
public function someCommonLogic()
if ($something) {
return $this->redirect()->toRoute('someRoute');
asgrim / gist:3445d0977ca0d7839372
Created Jun 9, 2014
So apparently, this is what happens when you update Composer at the same moment as you're running a composer update...
View gist:3445d0977ca0d7839372
[echo] Composer update
[exec] Warning: This development build of composer is over 30 days old. It is recommended to update it by running "/usr/local/bin/composer self-update" to get the latest version.
[exec] Loading composer repositories with package information
[exec] Updating dependencies (including require-dev)
[exec] e)
[exec] {
[exec] $this->addReason($rule->getId(), array(
[exec] 'rule' => $rule,
[exec] 'job' => $rule->getJob(),
View fix.css
@media (min-width: 1100px) {
.site-header {
min-width: 230px;
min-width: 23rem;
width: 30%;
padding-left: 5%;
padding-top: 3rem;
position: fixed;
float: left;
max-width: 520px; /* <--- this should do the job :) */
View flock.php
$flockHandle = fopen('/tmp/blah.lock', 'w');
if (!flock($flockHandle, LOCK_EX | LOCK_NB))
echo "Cannot get lock.";
// do something
asgrim /
Created Sep 8, 2014
Temporary fix for Chrome removing showModalDialog (breaking OWA)
"EnableDeprecatedWebPlatformFeatures": ["ShowModalDialog_EffectiveUntil20150430"]
asgrim / .gitignore
Last active Aug 29, 2015
My stack interpreter from Cute Little Interpreters tutorial at phpbnl15
View blah.php
function foo($value)
return ['hello', $value];
View segfault.cpp
#include <iostream>
using namespace std;
int main()
int v;
int *ptr = &v;
*ptr = 15;