Skip to content

Instantly share code, notes, and snippets.

View JeroenDeDauw's full-sized avatar
🐈
~=[,,_,,]:3

Jeroen De Dauw JeroenDeDauw

🐈
~=[,,_,,]:3
View GitHub Profile
@JeroenDeDauw
JeroenDeDauw / active.md
Last active August 29, 2015 14:03 — forked from paulmillr/active.md

Most active GitHub users (git.io/top)

The count of contributions (summary of Pull Requests, opened issues and commits) to public repos at GitHub.com from Sat, 29 Jun 2013 00:57:40 GMT till Sun, 29 Jun 2014 00:57:40 GMT.

Only first 1000 GitHub users according to the count of followers are taken. This is because of limitations of GitHub search. Sorting algo in pseudocode:

githubUsers
 .filter((user) -> user.followers > 62)
@JeroenDeDauw
JeroenDeDauw / keybase.md
Last active August 29, 2015 14:07
Keybase verification

Keybase proof

I hereby claim:

  • I am JeroenDeDauw on github.
  • I am jeroendedauw (https://keybase.io/jeroendedauw) on keybase.
  • I have a public key whose fingerprint is AB95 CECD B3C2 6869 E485 CD1C EEAA 431E 2E91 371F

To claim this, I am signing this object:

@JeroenDeDauw
JeroenDeDauw / ElementTowerDefence.php
Last active August 29, 2015 14:10
Selling point for pure essence in Element Tower Defence (StarCraft 2 version)
<?php
$maxWave = 60;
$interestInterval = 15;
$interestPercentage = 2;
$waveDuration = 40;
$lateSell = getSaleProfit( $maxWave );
for ( $sellWave = 1; $sellWave <= $maxWave; $sellWave++ ) {
@JeroenDeDauw
JeroenDeDauw / MapPatcher.php
Created December 29, 2014 15:27
MapPatcher method split
<?php
namespace Diff\Patcher;
use Diff\Comparer\StrictComparer;
use Diff\Comparer\ValueComparer;
use Diff\DiffOp\Diff\Diff;
use Diff\DiffOp\DiffOpAdd;
use Diff\DiffOp\DiffOpChange;
use Diff\DiffOp\DiffOpRemove;
<?php
interface Identifiable {
/**
* @return Id
*/
public function getId();
/**
@JeroenDeDauw
JeroenDeDauw / gist:3600814
Created September 2, 2012 15:53
Evil PHP changing string to int
php > $a = array();
php > $a['42'] = true;
php > var_dump($a);
array(1) {
[42]=>
bool(true)
}
@JeroenDeDauw
JeroenDeDauw / CurrentFormat.json
Last active December 2, 2015 19:11
QueryR item response format
data: {
"sister city": {
"type": "string",
"value": "Berlin",
"values": [
"Berlin",
"Brussels"
]
}
}
@JeroenDeDauw
JeroenDeDauw / ValueObjectsInPhpStuckBalls.php
Created December 4, 2015 22:14
Value Objects in PHP suck balls
trait ValueObjectsInPhpStuckBalls {
public static function newInstance() {
return new self();
}
/**
* @throws \RuntimeException
*/
public function validate() {
.svn
*~
*.kate-swp
.*.swp
public function testInsertEntity() {
$item = Item::newEmpty();
$item->setId( 42 );
$queryInterface = new ObservableQueryInterface();
$assertEquals = array( $this, 'assertEquals' );
$queryInterface->registerCallback(
'insert',