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 / GoogleGeo.pm
Last active October 27, 2018 20:17
My Google API-interfacing code
package GoogleGeo;
# interfaces with Google Geolcation API
# https://developers.google.com/maps/documentation/geolocation/intro
use strict;
use warnings;
use utf8;
use feature qw{ postderef say signatures state };
@jacoby
jacoby / match
Created August 31, 2018 20:51
command line program that takes a regex and return what it matches
#!/usr/bin/env perl
use strict ;
use warnings ;
use utf8 ;
use feature qw{ postderef say signatures state } ;
no warnings qw{ experimental::postderef experimental::signatures } ;
use Getopt::Long ;
if [ $should_ignore ] ; then BLOCK ; fi
is consistently accepting 0 as true.
WTF? FFS! FTW!
I do not understand if this is behavior I should accept or count as a bug.
<?xml version="1.0" encoding="utf-8"?>
<ImageAnalysis xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<Run Name="Intensities">
<Cycles First="1" Last="518" Number="518" />
<ImageParameters>
<AutoOffsetFlag>0</AutoOffsetFlag>
<AutoSizeFlag>0</AutoSizeFlag>
<Fwhm>0</Fwhm>
<RemappingDistance>0</RemappingDistance>
<Threshold>0</Threshold>
@jacoby
jacoby / error.log (excerpt)
Created July 13, 2018 14:37
Why I hate Python today
[Fri Jul 13 10:21:33 2018] [error] [client 10.163.25.234] Traceback (most recent call last):
[Fri Jul 13 10:21:33 2018] [error] [client 10.163.25.234] File "/apps/rhel6/globus/miniconda/bin/globus", line 11, in <module>
[Fri Jul 13 10:21:33 2018] [error] [client 10.163.25.234] sys.exit(main())
[Fri Jul 13 10:21:33 2018] [error] [client 10.163.25.234] File "/apps/rhel6/globus/miniconda/lib/python3.6/site-packages/click/core.py", line 722, in __call__
[Fri Jul 13 10:21:33 2018] [error] [client 10.163.25.234] return self.main(*args, **kwargs)
[Fri Jul 13 10:21:33 2018] [error] [client 10.163.25.234] File "/apps/rhel6/globus/miniconda/lib/python3.6/site-packages/click/core.py", line 676, in main
[Fri Jul 13 10:21:33 2018] [error] [client 10.163.25.234] _verify_python3_env()
[Fri Jul 13 10:21:33 2018] [error] [client 10.163.25.234] File "/apps/rhel6/globus/miniconda/lib/python3.6/site-packages/click/_unicodefun.py", line 118, in _verify_python3_env
[Fri Jul 13 10:21:33 2018] [error] [client 10.
@jacoby
jacoby / sudoku_clever.pl
Created July 2, 2018 14:35
Clever solver of Sudoku, that uses the most likely choices first.
#!/usr/bin/env perl
# Program that is first-pass more clever than brute force for solving
# sudokup problems.
# Also useful in showing how I like to organize programs.
# Administrivia boilerplate. I use strict and warnings, which tell me
# when things are bad.
@jacoby
jacoby / cliFilelocker.py help
Created June 14, 2018 15:56
when you run ./cliFilelocker.py -h you get
Usage: cliFilelocker.py [-mqs] [-a action] [-c config] [-d directory]
[-f file] [-i file_id1,file_id2...]
[-t target_id1,target_id2...] [-u user_id]
Filelocker is a web based secure file sharing application which facilitates
easy file sharing between users at an organization and promotes secure data
sharing habits. The command line interface to Filelocker offers advanced users
a way to script standard Filelocker actions in a headless environment.
Options:
#!/usr/bin/env perl
use strict ;
use warnings ;
use utf8 ;
use feature qw{ postderef say signatures state } ;
no warnings qw{ experimental::postderef experimental::signatures } ;
use Getopt::Long ;
@jacoby
jacoby / calendar.pl
Created February 15, 2018 20:42
Probably the long way around for a command-line calendar showing a specific month and year.
#!/usr/bin/env perl
# uses DateTime and Template to make a calendar page
use feature qw{say} ;
use strict ;
use warnings ;
use DateTime ;
use Getopt::Long ;
@jacoby
jacoby / rot.pl
Last active January 17, 2018 00:36
General Caesar Cypher Tool
#!/usr/bin/env perl
use strict ;
use warnings ;
use utf8 ;
use feature qw{ postderef say signatures state } ;
no warnings qw{ experimental::postderef experimental::signatures } ;
use Getopt::Long ;
my $n = 13 ;