Skip to content

Instantly share code, notes, and snippets.

#!/usr/bin/perl
=for comment
Take a simplified graph description source file (read on STDIN) and generate xvcg graphs. Requires the xvcg package and NetPBM.
Eg:
foo: Foo is Foo -- create a node named 'foo' (in the source file) containing the text (in the output graph) 'Foo is Foo'
bar: Bar is Bar -- similar
JavaScript The Definitive Guide
ActionScript 3.0 Cookbook
Facebook Cookbook
Naked Statistics
The Toaster Project
Programming Flex 2
Applied Statistics and the SAS Programming Language
OpenGL ES Game Development
OpenGL Refrence Manual (3rd edition)
Salesforce Cookbook
#!/usr/bin/perl
=for comment
MUD<->IRC proxy
Presents MUD as an IRC server
Todo
----
bash-4.3# cabal install pandoc
Resolving dependencies...
Downloading SHA-1.6.4.2...
Downloading async-2.0.2...
Downloading base64-bytestring-1.0.0.1...
Configuring async-2.0.2...
Configuring base64-bytestring-1.0.0.1...
Downloading blaze-builder-0.4.0.1...
Building async-2.0.2...
Downloading byteable-0.1.1...
<?xml version="1.0"?>
<gpx creator="GPS Visualizer http://www.gpsvisualizer.com/" version="1.1" xmlns="http://www.topografix.com/GPX/1/1" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.topografix.com/GPX/1/1 http://www.topografix.com/GPX/1/1/gpx.xsd">
<trk>
<name>S McClintock Dr &amp; E Apache Blvd, Tempe, AZ 85281 - 7475 W Chandler Blvd, Chandler, AZ 85226</name>
<desc>11.8 mi, 1:02</desc>
<trkseg>
<trkpt lat="33.41484" lon="-111.9091"></trkpt>
<trkpt lat="33.41484" lon="-111.90933"></trkpt>
<trkpt lat="33.41486" lon="-111.91027"></trkpt>
<trkpt lat="33.41487" lon="-111.9109"></trkpt>
in a method in a Content Handler:
my $cart = WebGUI::Shop->Cart->newBySession($session);
my $asset_id = $session->db->quickScalar("select assetId from sku where sku = ?", [ $session->request->param('sku')) ]);
my $product;
if( $asset_id ) {
$product = WebGUI::Asset::Sku::Product->newById($session, $asset_id);
} else {
$product = WebGUI::Asset::Sku::Product->new($session);
sub _autofield_processor {
my $self = shift;
my $cnf = shift || {};
return sub {
my $name = shift;
my $display = shift;
$display = $name unless ($display);
my $Column = $self->AppDV->get_column($name) or return '';
# no strict 'refs';
# use Data::Dumper; warn 'ISA: ' . join ', ', @{ ref($self->AppDV) . '::ISA' }; # ->_virtual_columns();
@scottwalters
scottwalters / gist:9e7eb0242d2c1734283b
Created April 5, 2015 08:40
TBAG filtering Facebook's RSS feed on tags so that Mailchimp only sends out emails on tagged posts
#!/home/biketempe/bin/perl
#!/usr/local/bin/perl
use 5.019;
use strict;
use warnings;
use experimental 'postderef', 'signatures';
use CGI;
Hello,
Per discussion between Cliff and I, I've put all of the raw bike count
data into github:
https://github.com/biketempe/DataAnalysis
Some of the code I've written for this project is in there, such as
the crash rate plot I did for this year, the SQL query used to fetch
the data, and the raw ADOT from that.
# uses https://github.com/mtve/bitcoin-pl for base58.pm, ecdsa.pm
# doesn't work. ecdsa.pm is flakey and usually doesn't create the same signature as the reference implementation.
use strict;
use warnings;
use Carp;
use Data::Dumper;
use Socket;