Skip to content

Instantly share code, notes, and snippets.

Avatar

Marcus Bointon Synchro

View GitHub Profile
@snobu
snobu / config.txt
Created Mar 29, 2018
Raspberry Pi 2560x1440@60Hz
View config.txt
hdmi_group=2
hdmi_mode=87
hdmi_cvt=2560 1440 60 3 0 0 1
max_framebuffer_width=2560
max_framebuffer_height=1440
hdmi_pixel_freq_limit=400000000
@warmans
warmans / CsvMapper.php
Created Jun 29, 2012
Crap-ish CSV Parser
View CsvMapper.php
<?php
/**
* Map CSV columns to fields
*
* somefile.csv content = "some guy, 5 Road Street, Town, Postcode"
*
* $mapper = new CsvMapper('/tmp/somefile.csv');
* $mapper->mapField('A', 'name')->filter('name', function($value){ return ucwords($value); });
* $mapper->mapAggregateField(array('B', C', D'), 'address', ', ');
* $mapper->mapLiteral('source', 'unknown');
@dave1010
dave1010 / htaccess
Created Dec 14, 2011
HTTP Status Cats Apache (htaccess) config
View htaccess
# HTTP Status Cats
# Apache (htaccess) config created by @dave1010
# Licensed CC BY 2.0
# Images CC BY 2.0, from GirlieMac's photostream:
# http://www.flickr.com/photos/girliemac/sets/72157628409467125/with/6508023065/
# Usage: copy save this file as .htaccess or add it to your httpd.conf
ErrorDocument 404 '<a href="http://www.flickr.com/photos/girliemac/6508022985/" title="404 - Not Found by GirlieMac, on Flickr"><img src="http://farm8.staticflickr.com/7172/6508022985_b22200ced0.jpg" width="500" height="400" alt="404 - Not Found"></a>'