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
package Rhythmbox::Playlist; | |
use strict; | |
use warnings; | |
use XML::Simple; | |
use URI::Escape qw(uri_unescape); | |
sub new { | |
my $class = shift; |
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/php | |
<?php | |
/* This might be a good general approach to getting some real | |
value out of PHP's built-in error reporting, where it's | |
painful to turn it on for an entire application. Presently | |
living in a t/ directory, and called like so: | |
php t/error_test.php name_of_file_to_check.php | |
I've just written a couple of shell script wrappers to |
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/perl | |
use strict; | |
use warnings; | |
use 5.10.0; | |
# attempt to determine if two strings are anagrams | |
my (@first) = split //, 'brennen'; | |
my (@second) = split //, 'bernnen'; |
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 | |
class foo { | |
function __construct ($arg) { | |
echo $arg; | |
} | |
} | |
class bar extends foo { | |
} |
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@catastrophe:/usr/share/xsessions$ cat xmonad.desktop | |
[Desktop Entry] | |
Encoding=UTF-8 | |
Name=XMonad | |
Comment=Lightweight tiling window manager | |
Exec=xmonad.start | |
Icon=xmonad.png | |
Type=XSession | |
brennen@catastrophe:/usr/share/xsessions$ cd /usr/local/bin/ | |
brennen@catastrophe:/usr/local/bin$ ls -lh |
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', |
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
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
<?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
<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" |
OlderNewer