This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// i used to always indent after the opening php tag, but i've decided that's | |
// kind of silly for non-template stuff. | |
// general stuff: | |
// - 2 space indents, no tab characters. | |
// - i think whitespace contributes to readability, and code that is | |
// crammed into the least space possible often strikes me as harder | |
// to follow. | |
// - i like to align like things vertically. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
fun! MapFancyChar() | |
let mapping = { | |
\ 'l' : 'ł', | |
\ 'L' : 'Ł' | |
\} | |
let char = nr2char(getchar()) | |
let mapcheck = get(mapping, char) | |
if mapcheck != "0" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env phantomjs | |
require('./TAP.js'); | |
var t = new Test.TAP(function (text) { console.log(text); }); | |
t.plan(3); | |
var page = require('webpage').create(); | |
page.open('https://www.sparkfun.com/', function (status) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(function( $ ){ | |
var methods = { | |
init : function (options) { | |
}, | |
render : function (target, data, labels, color) { | |
if (! (target && target.getContext)) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
^ # start | |
( | |
(?U) # ??? - named capture group? | |
.+ # one or more of anything | |
\.php) # a literal ".php", but why the fuck is there a paren at the end of it? | |
( |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env perl | |
use LWP::Simple; | |
$page = get('http://www.bvsd.org/'); | |
if ($page =~ /troublebutton/m) { | |
print "yes.\n"; | |
} else { | |
print "sorry.\n"; | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env php | |
<?php | |
define('LIBDIR', 'lib/'); | |
require LIBDIR . 'classes/SparkLib/Autoloader.php'; | |
SparkLib\Autoloader::setup(); | |
use FeedWriter\Feed; | |
use FeedWriter\View\JSON; | |
use FeedWriter\View\XML; | |
use FeedWriter\View\CSV; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[ 0.000000] Booting Linux on physical CPU 0xf00 | |
[ 0.000000] Initializing cgroup subsys cpu | |
[ 0.000000] Initializing cgroup subsys cpuacct | |
[ 0.000000] Linux version 3.18.6-v7+ (root@vagrant-ubuntu-precise-32) (gcc version 4.8.3 20140106 (prerelease) (crosstool-NG linaro-1.13.1-4.8-2014.01 - Linaro GCC 2013.11) ) #1 SMP PREEMPT Thu Feb 26 03:18:12 UTC 2015 | |
[ 0.000000] CPU: ARMv7 Processor [410fc075] revision 5 (ARMv7), cr=10c5387d | |
[ 0.000000] CPU: PIPT / VIPT nonaliasing data cache, VIPT aliasing instruction cache | |
[ 0.000000] Machine model: Raspberry Pi 2 Model B | |
[ 0.000000] cma: Reserved 8 MiB at 0x3a800000 | |
[ 0.000000] Memory policy: Data cache writealloc | |
[ 0.000000] On node 0 totalpages: 241664 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[ 0.000000] Booting Linux on physical CPU 0xf00 | |
[ 0.000000] Initializing cgroup subsys cpu | |
[ 0.000000] Initializing cgroup subsys cpuacct | |
[ 0.000000] Linux version 3.18.6-v7+ (root@vagrant-ubuntu-precise-32) (gcc version 4.8.3 20140106 (prerelease) (crosstool-NG linaro-1.13.1-4.8-2014.01 - Linaro GCC 2013.11) ) #1 SMP PREEMPT Thu Feb 26 03:18:12 UTC 2015 | |
[ 0.000000] CPU: ARMv7 Processor [410fc075] revision 5 (ARMv7), cr=10c5387d | |
[ 0.000000] CPU: PIPT / VIPT nonaliasing data cache, VIPT aliasing instruction cache | |
[ 0.000000] Machine model: Raspberry Pi 2 Model B | |
[ 0.000000] cma: Reserved 8 MiB at 0x3a800000 | |
[ 0.000000] Memory policy: Data cache writealloc | |
[ 0.000000] On node 0 totalpages: 241664 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sudo mv /usr/share/X11/xorg.conf.d/99-fbturbo.conf ~ | |
echo 'export FRAMEBUFFER=/dev/fb1' >> ~/.profile | |
make sure these are in /etc/modules: | |
rpi_power_switch | |
spi-bcm2708 | |
i2c-bcm2708 | |
i2c-dev | |
stmpe_ts |