This file contains 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 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 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
Nov 27 01:21:43 coreos-2 systemd[1]: Started etcd2. | |
Nov 27 01:21:43 coreos-2 systemd[1]: Starting etcd2... | |
Nov 27 01:21:43 coreos-2 etcd2[883]: 2015/11/27 01:21:43 etcdmain: etcd Version: 2.1.2 | |
Nov 27 01:21:43 coreos-2 etcd2[883]: 2015/11/27 01:21:43 etcdmain: Git SHA: ff8d1ec | |
Nov 27 01:21:43 coreos-2 etcd2[883]: 2015/11/27 01:21:43 etcdmain: Go Version: go1.4.2 | |
Nov 27 01:21:43 coreos-2 etcd2[883]: 2015/11/27 01:21:43 etcdmain: Go OS/Arch: linux/amd64 | |
Nov 27 01:21:43 coreos-2 etcd2[883]: 2015/11/27 01:21:43 etcdmain: setting maximum number of CPUs to 1, total number of available CPUs is 1 | |
Nov 27 01:21:43 coreos-2 etcd2[883]: 2015/11/27 01:21:43 etcdmain: peerTLS: cert = /home/core/coreos.pem, key = /home/core/coreos-key.pem, ca = /home/core/ca.pem | |
Nov 27 01:21:43 coreos-2 etcd2[883]: 2015/11/27 01:21:43 etcdmain: listening for peers on https://10.132.206.153:2380 | |
Nov 27 01:21:43 coreos-2 etcd2[883]: 2015/11/27 01:21:43 etcdmain: clientTLS: cert = /home/core/coreos.pem, |
This file contains 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 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
<script type="text/javascript"> | |
jQuery(document).ready(function($){ | |
$('.datepicker').datepicker({ changeMonth: true, changeYear: true, minDate: '-1y', maxDate: '+3y'}); | |
$.validator.addMethod("time", function(value, element) { | |
return this.optional(element) || /^(([0-1]?[0-2])|([2][0-3])):([0-5]?[0-9])(a|p)m?$/i.test(value); | |
}, "Please enter a valid time."); | |
$("#post").validate({ | |
rules: { | |
time: "required time" |
This file contains 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 | |
/** | |
* This section provides a convenient place to setup many commonly used variables | |
* needed for the php sample code to function. | |
*/ | |
function getProperty($var){ | |
if($var == 'check') Return true; | |
if($var == 'shipaccount') Return 'XXX'; | |
if($var == 'billaccount') Return 'XXX'; |
This file contains 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
brennen@brennen-dev 15:13:09 /var/www (master) $ cat ~/commit_dates | perl ~/commit_dates.pl | sort | uniq -c | |
88 00 | |
46 01 | |
18 02 | |
5 03 | |
4 04 | |
6 05 | |
7 06 | |
18 07 | |
117 08 |
This file contains 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
" BangOpen ------------------------------------------------------------ {{{ | |
function! BangOpen(arg) | |
execute 'tabe ' . system(a:arg) | |
endfunction | |
command! -nargs=1 BangOpen :call BangOpen(<f-args>) | |
" }}} |
This file contains 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! ToggleMinimap() | |
if exists("s:isMini") && s:isMini == 0 | |
let s:isMini = 1 | |
else | |
let s:isMini = 0 | |
end | |
if (s:isMini == 0) |
This file contains 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 | |
namespace bpb; | |
$events = array( | |
array( | |
'name' => 'brennen', | |
'dog' => 'silent' | |
), | |
array( | |
'name' => 'suzy', |