Skip to content

Instantly share code, notes, and snippets.

View jacoby's full-sized avatar
🌮
I ❤️ Tacos

Dave Jacoby jacoby

🌮
I ❤️ Tacos
View GitHub Profile
@jacoby
jacoby / test_unicode.pl
Created March 6, 2014 14:23
Test Unicode -- seeing if you can use unicode characters for variable names in Perl. You can.
#!/usr/bin/perl
use 5.010 ;
use utf8 ;
use strict ;
use warnings ;
binmode STDOUT , ':utf8' ;
my $π = 'pi' ;
say $π ;
@jacoby
jacoby / promise_test.pl
Created March 27, 2014 17:33
Test of the Perl module Promise, pulled from https://github.com/stevan/promises-perl
#!/home/jacoby/perl-5.18.0/bin/perl
use feature qw'say' ;
use strict ;
use warnings ;
use utf8 ;
use AnyEvent::HTTP;
use JSON::XS qw[ decode_json ];
use Promises qw[ collect deferred ];
@jacoby
jacoby / mydb.py
Created April 21, 2014 20:09
Module for simplifying database access in Python
#!/usr/bin/env python
import sys
import yaml
import MySQLdb as db
class Database:
config = ''
def __init__( self , client="default" ):
@jacoby
jacoby / Cheerlights_Ethernet.ino
Created April 24, 2014 05:32
Cheerlights Ethernet So Far
/*
* Cheerlights Ethernet - Dave Jacoby
*
* Using an Ethernet Shield to connect to Cheerlights and set the RGB LED light
*
* http://api.thingspeak.com/channels/1417/field/1/last.txt
*
* Sketch to set control of an RGB LED
*
* Black wire connecting 5v to LED pin 2
### Keybase proof
I hereby claim:
* I am jacoby on github.
* I am jacoby (https://keybase.io/jacoby) on keybase.
* I have a public key whose fingerprint is A20F 1E73 1FD6 3D3C 323D DB74 3B7A 6F26 69E7 F820
To claim this, I am signing this object:
#!/usr/bin/env perl
use feature qw'say state' ;
use strict ;
use utf8 ;
use warnings ;
use Data::Dumper ;
# https://plus.google.com/u/0/+PaulBennett/posts/EvLLxiAMjKR
@jacoby
jacoby / output.txt
Created February 13, 2015 15:29
Working through UTF8 issues with MySQL
jacoby@oz:~$ my_oz -e 'select * from utf8_test '
+----+-----------------------------------------------------------------------------------------------------------------------+
| id | string |
+----+-----------------------------------------------------------------------------------------------------------------------+
| 1 | Begin |
| 2 | ♈ ♉ ♊ ♋ ♌ ♍ ♎ ♏ ♐ ♑ ♒ ♓ ⛎ |
| 3 | End |
| 4 | 0 — 1 — 10 — 2 — 3 — 4 — 5 — 6 — 7 — 8 — 9 — ♈ — ♉ — ♊ — ♋ — ♌ |
| 5 | 0 ???? 1 ???? 10 ???? 2 ???? 3 ???? 4 ???? 5 ???? 6 ???? 7 ???? 8 ???? 9 ???? ♈
@jacoby
jacoby / Spirograph.pm
Last active August 29, 2015 14:16
Code to create SVG images of periodic functions for my amusement
package Spirograph ;
use feature qw{ state say } ;
use strict ;
use warnings ;
use CGI ;
use Data::Dumper ;
use Exporter 'import' ;
use Math::Trig ;
@jacoby
jacoby / calendar.pl
Created March 3, 2015 22:13
Calendar, Because
#!/usr/bin/env perl
use feature qw'say state unicode_strings' ;
use strict ;
use utf8 ;
use warnings ;
use open ':std', ':encoding(UTF-8)' ;
use Template ;
use DateTime ;
@jacoby
jacoby / LTLmail.pm
Last active August 29, 2015 14:17
Help Me Write Tests
package LTLmail ;
# sends mail for our lab
=pod
=head1 NAME
LTLmail - Simplify the automated sending of mail for the Genomics Core Lab