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
<!DOCTYPE html> | |
<html lang='en'> | |
<head> | |
<link href='/css/bootstrap.css' rel='stylesheet'> | |
<script src='/js/d3.v2.min.js'></script> | |
<script src='/js/jquery.min.js'></script> | |
<script src='/js/jquery.ba-bbq.min.js'></script> | |
</head> | |
<body> |
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
require 'sinatra' | |
require 'open-uri' | |
require 'RMagick' | |
include Magick | |
get '/' do | |
'This service is currently REST only. | |
You will have to manually request service by typing and entering your own URI like so: | |
<p><tt>acme.com/<image_url>?w=XX&h=XX</tt></p>' | |
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 -l | |
use strict; | |
use warnings; | |
use File::Temp qw( tempdir ); | |
# init | |
chomp( my @dists = <DATA> ); | |
my $root = '/Users/jeffa/perl/tmp/'; | |
my $wipe = $root . '*'; |
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
#include <stdio.h> | |
#include <pthread.h> | |
#include <getopt.h> | |
#define MAX_DIMENSIONS 25 | |
#define MAX_THREADS 9 | |
typedef struct { | |
int size; | |
int top; |
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
use strict; | |
use warnings; | |
use Audio::Wav; | |
use Math::Complex; | |
use constant TWO_PI => pi() * 2; | |
my $wav = Audio::Wav->new(); | |
my $sample_rate = 44100; | |
my $bits_sample = 16; |
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
use strict; | |
use warnings; | |
use MIDI; | |
use XML::Simple; | |
my $xml = XMLin(\*DATA); | |
my $song = $xml->{SONG}; | |
my @note = @{ $song->{NOTE} }; | |
my $title = $song->{title} || 'unknown'; | |
my $author = $song->{author} || 'unknown'; |
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
=head1 NAME | |
Crypt::Rot26 - Encrypt data with TWICE the power of Rot13!! | |
=head1 SYNOPSIS | |
use strict; | |
use Crypt::Rot26; |
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
use strict; | |
use warnings; | |
use CGI qw(:standard); | |
use CGI::Carp qw(fatalsToBrowser); | |
use DBI; | |
use DBIx::XHTML_Table; | |
print header(), start_form(); |
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
use strict; | |
use warnings; | |
use Math::Matrix qw(transpose); | |
use Spreadsheet::ParseExcel::Simple; | |
use Spreadsheet::WriteExcel::Simple; | |
my $xls = Spreadsheet::ParseExcel::Simple->read('old.xls'); | |
my @data; | |
for ($xls->sheets) { | |
while ($_->has_data) { |
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
use strict; | |
use warnings; | |
use DBI; | |
# connect | |
my $dbh = DBI->connect( | |
qw(DBI:mysql:mp3:host user pass), | |
{ RaiseError => 1 } | |
); |
OlderNewer