Skip to content

Instantly share code, notes, and snippets.

Avatar
😈
Doing evil things, probably. Sorry...

James Titcumb asgrim

😈
Doing evil things, probably. Sorry...
View GitHub Profile
View trollface on skype
:):):)(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)
View keybase.md

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 9561 1CC3 ABF3 B80A 0646 9529 A9FA 0974 0C21 7917

To claim this, I am signing this object:

View Foo.php
<?php
// gumf at the top
class Foo extends AbstractActionController
{
public function someCommonLogic()
{
if ($something) {
return $this->redirect()->toRoute('someRoute');
}
@asgrim
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
update-deps:
[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
<?php
$flockHandle = fopen('/tmp/blah.lock', 'w');
if (!flock($flockHandle, LOCK_EX | LOCK_NB))
{
echo "Cannot get lock.";
die();
}
// do something
@asgrim
asgrim / .etc.opt.chrome.policies.managed.show_modal_dialog_policy.json
Created Sep 8, 2014
Temporary fix for Chrome removing showModalDialog (breaking OWA)
View .etc.opt.chrome.policies.managed.show_modal_dialog_policy.json
{
"EnableDeprecatedWebPlatformFeatures": ["ShowModalDialog_EffectiveUntil20150430"]
}
@asgrim
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;