Skip to content

Instantly share code, notes, and snippets.

View marijn's full-sized avatar

Marijn Huizendveld marijn

View GitHub Profile
@marijn
marijn / event.sql
Created February 22, 2012 12:49
Event and snapshot queries
SELECT e.* FROM event e WHERE e.aggregate_id = ?1 ORDER BY e.playhead ASC
<?php
final class BlogPost
{
private $created;
private $publish;
public function __construct()
{
$this->created = new DateTime('now');
@marijn
marijn / post_commit
Created January 23, 2012 18:03
Post commit hook for a multiple branch Sismo setup.
#!/bin/sh
sismo --quiet build `git name-rev --name-only HEAD | xargs -I {} echo "Pink Tie/CoreBundle/{}" | tr '[A-Z]' '[a-z]' | tr "/" "-" | tr " " "-"` `git log -1 HEAD --pretty="%H"` &

Connect to server

$ ssh -l <username> -p <ssh-port> <domain>

Connect to MySQL server

config/vhost.conf
logs
documents
vendor
@marijn
marijn / Asiadam-bespaar 52% in Amsterdam (20110728).png
Created July 29, 2011 21:25
Data captured from Groupon website
Asiadam-bespaar 52% in Amsterdam (20110728).png
@marijn
marijn / entities.js
Created November 10, 2010 17:04
Formatted list of XHTML entities (credit: WYMEditor / wymeditor.org)
var _entities = { "&nbsp;"" : "&#0160;"
, "&iexcl;" : "&#0161;"
, "&cent;" : "&#0162;"
, "&pound;" : "&#0163;"
, "&curren;" : "&#0164;"
, "&yen;" : "&#0165;"
, "&brvbar;" : "&#0166;"
, "&sect;" : "&#0167;"
, "&uml;" : "&#0168;"
, "&copy;" : "&#0169;"
@marijn
marijn / dutchZipcodeTest.php
Created May 15, 2010 14:51
Dutch ZIP Code test written for PHPUnit
<?php
require_once 'PHPUnit/Framework.php';
class ZipCodeTest extends PHPUnit_Framework_TestCase
{
public function testDutchZipcodes ()
{
foreach (array('1017VN', '1017vn', '1017 VN', '1017 vn') as $zipCode)
@marijn
marijn / README.markdown
Last active October 1, 2023 13:42
List of countries in YAML, CSV and TXT format
<?php
class VideoEncoder
{
/**
* @var string
*/
private $_outputFile;