Skip to content

Instantly share code, notes, and snippets.

View sarelvdwalt's full-sized avatar

Sarel van der Walt sarelvdwalt

View GitHub Profile
#!/bin/bash
cd "/Users/sarel/Library/ApplicationSupport/EVE Online/p_drive/Local Settings/Application Data/CCP/EVE/SharedCache/wineenv/drive_c/users/sarel/Local Settings/Application Data/CCP/EVE/c_tq_tranquility/settings_Default"
cat core_char_95599916.dat > core_char_95667485.dat
cat core_char_95599916.dat > core_char_96349917.dat
cat core_char_95599916.dat > core_char_96595293.dat
echo 'done.'%
@sarelvdwalt
sarelvdwalt / ResponseJSON.php
Created June 1, 2015 19:40
Symfony Response Object that creates a JSON object which envelopes your content in a "content" part and has "meta" data that you can add on to. I tuses the JMSSerializerBundle to make sure it serializes properly.
<?php
/**
* User: sarel
* Date: 2015/05/31
* Time: 10:10 AM
*/
namespace AH\AQueueBundle\Helper;
use JMS\Serializer\SerializerBuilder;
try {
// something cool goes here
} catch (Tail $t) {
// write entry in diary
} finally {
// finally! fuck!
}
@sarelvdwalt
sarelvdwalt / cappedStaticCacheVAR.php
Last active August 29, 2015 13:57
Demonstrates how to have a static cache variable (array) which is capped to a maximum count of entries, with last-in-first-out.
<?php
/**
* Demonstrate how to have a static cache variable that is capped to a maximum count.
*
* User: sarel
* Date: 2014/03/06
* Time: 8:27 PM
*/
class testShifting {