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
# http://www.klab.jp/tenka1programer/bosyu.html | |
# | |
use strict; | |
use warnings; | |
use Encode qw(decode); | |
my $bytes = [qw/ | |
e4bba5e4b88be381aee69687e5ad97e58897e381af5554462d38e38292e69687e5ad97 | |
e382a8e383b3e382b3e383bce38387e382a3e383b3e382b0e5bda2e5bc8fe381a8e381 | |
99e3828b3136e980b2e695b0e381aee38390e382a4e38388e58897e381a7e38182e3828be38082 |
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 strict; | |
use warnings; | |
use Geo::Gpx; | |
use Image::ExifTool; | |
use Image::ExifTool::Location; | |
use File::Slurp qw(read_file); | |
use DateTime::Format::Strptime; | |
use YAML; |
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
package Math::Base58; | |
use constant Alphanum => qw/ | |
1 2 3 4 5 6 7 8 9 | |
a b c d e f g h i | |
j k m n o p q r s | |
t u v w x y z A B | |
C D E F G H J K L | |
M N P Q R S T U V | |
W X Y Z |
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
<html> | |
<head> | |
<meta name="viewport" content="initial-scale=1.0, user-scalable=no"/> | |
<meta http-equiv="content-type" content="text/html; charset=UTF-8"/> | |
<title>geolocation + Google Maps JavaScript API</title> | |
<script type="text/javascript" src="http://maps.google.com/maps/api/js?sensor=false"></script> | |
<script type="text/javascript"> | |
function initialize() { | |
navigator.geolocation.getCurrentPosition(showMap); | |
} |
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/perl | |
# Ported http://dacp.jsharkey.org/ to Perl | |
use strict; | |
use AnyEvent; | |
use AnyEvent::Socket; | |
use AnyEvent::HTTP; | |
use Net::Rendezvous::Publish; | |
use Net::DAAP::DMAP qw(:all); | |
my $port = 10020; |
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/perl | |
use strict; | |
use LWP::Simple; | |
use JSON; | |
use URI; | |
my $query = shift; ## need to be artist name at this point | |
my $uri = URI->new('http://www.lala.com/api/SearchPage/runBucketedSearch/v22.7.1-18'); | |
$uri->query_form( | |
albumsQ => $query, |
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
diff --git a/lib/AnyEvent/Twitter/Stream.pm b/lib/AnyEvent/Twitter/Stream.pm | |
index 5796eed..542bfd1 100644 | |
--- a/lib/AnyEvent/Twitter/Stream.pm | |
+++ b/lib/AnyEvent/Twitter/Stream.pm | |
@@ -57,8 +57,13 @@ sub new { | |
}); | |
my $reader; $reader = sub { | |
my($handle, $json) = @_; | |
- my $tweet = JSON::decode_json($json); | |
- $on_tweet->($tweet); |
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
<?xml version="1.0" encoding="utf-8"?> | |
<mx:WindowedApplication xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute" > | |
<mx:TextInput x="10" y="10" text="username" id="username"/> | |
<mx:TextInput y="10" text="password" id="password" visible="true" displayAsPassword="true" x="178"/> | |
<mx:TextInput y="41" width="255" text="track" id="track" x="10"/> | |
<mx:Button id="startButton" y="41" label="Start" click="connectStreamServer()" width="55" x="283"/> | |
<mx:Button id="stopButton" x="283" y="41" label="Stop" click="stopToConnect()" visible="false"/> | |
<mx:List dataProvider="{dp}" labelField="text" height="218" y="71" width="328" x="10"></mx:List> | |
<mx:Script> |
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/perl | |
package Server; | |
use AnyEvent::Socket (); | |
sub new { | |
my $class = shift; | |
my $self = bless {}, $class; | |
$self->{server_guard} = undef; | |
$self->{sessions} = {}; | |
warn $self; |
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/perl | |
use strict; | |
use warnings; | |
use AnyEvent; | |
use AnyEvent::Socket qw/tcp_server/; | |
use AnyEvent::Handle; | |
my $buf = ''; |