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
@interface MoonPhase : NSObject { | |
@private | |
NSDate *now; | |
} | |
- (float) phase; | |
@end | |
// --------------------------------------- |
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 Text::Xslate; | |
my $xs = Text::Xslate->new( | |
syntax => 'TTerse', | |
); | |
my $template = <<'END'; |
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 Text::Xslate; | |
my $xs = Text::Xslate->new( | |
syntax => 'TTerse', | |
); | |
my $template = <<'END'; |
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 Net::Ping; | |
my $p = Net::Ping->new("syn"); | |
$p->port_number( scalar getservbyname("http", "tcp") ); | |
$p->hires(1); | |
my $host = shift @ARGV // "127.0.0.1"; |
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 -- | |
# fill real rss feed url for Fresh Reader broken OPML | |
use strict; | |
use warnings; | |
use Path::Class qw(file); | |
use CGI; | |
use Feed::Find; | |
use utf8; |
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 -- | |
# see also: mytop(1) | |
use strict; | |
use warnings; | |
use DBI; | |
use Cache::SharedMemoryCache; | |
my $config = { | |
dsn => $ENV{'mysqlconnection'} || 'DBI:mysql:mysql', |
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
#!/bin/bash | |
# | |
# for sox-14.4.0 on OSX 10.8 + Xcode 4.5 | |
################################################################################ | |
# | |
# Copyright (c) 2008-2009 Christopher J. Stawarz | |
# | |
# Permission is hereby granted, free of charge, to any person | |
# obtaining a copy of this software and associated documentation files |
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
# | |
[color] | |
branch = auto | |
diff = auto | |
# diff = false | |
status = auto | |
[color "branch"] | |
current = yellow reverse | |
local = yellow |
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 perl | |
# split perl source/pod to save to Mod.pm/Mod.pod | |
use strict; | |
use warnings; | |
use Path::Class qw(file); | |
use Pod::Clipper; | |
my $file = shift @ARGV or die "usage: $0 <perl module file>"; |
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 perl | |
use strict; | |
use warnings; | |
use Term::ANSIColor qw(:constants); | |
use Number::Bytes::Human (); | |
use utf8; | |
my $from = shift @ARGV or die "usage: $0 <from> <to>"; |
OlderNewer