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 / graph_paper.pl
Created January 2, 2018 20:22
Code to generate graph paper in SVG with Perl
#!/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 Carp ;
use Getopt::Long ;
@jacoby
jacoby / ytmarkdown.pl
Created December 7, 2017 22:09
Perl program that takes a list of YouTube URLs and makes markdown links with the video's thumbnail as the link and the video title as the alt text.
#!/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 Mojo::UserAgent ;
@jacoby
jacoby / .vimrc
Created November 8, 2017 17:56
my .vimrc for review
" Dave Jacoby - 2016-06-23
"
" A key to .vimrc happiness is to have an alias like
" alias vimrc="vi ~/.vimrc"
" in your .alias file or .bashrc or whatever, so, should you have
" a tweak to add or disable, you just go in and tweak it. Just
" a little pessimization removal
"
" Also, it is good to have the long version of settings in your
" configuration, so you have the best chance of reading and
#!/home/djacoby/webserver/perl/bin/perl
# replacement of the shell-based ltl-backup.sh, using Expect.pm, both for me
# to gain experience with Expect and to keep control over output so I do not
# get mail on successful operation.
use strict ;
use warnings ;
use feature qw{ postderef say signatures state } ;
no warnings qw{ experimental::postderef experimental::signatures } ;
@jacoby
jacoby / .vimrc
Created September 6, 2017 15:34
My current VIMRC
" Dave Jacoby - 2016-06-23
"
" A key to .vimrc happiness is to have an alias like
" alias vimrc="vi ~/.vimrc"
" in your .alias file or .bashrc or whatever, so, should you have
" a tweak to add or disable, you just go in and tweak it. Just
" a little pessimization removal
"
" Also, it is good to have the long version of settings in your
" configuration, so you have the best chance of reading and
@jacoby
jacoby / record.pl
Created August 2, 2017 14:26
Stores a record of my daily activities
#!/usr/bin/env perl
use strict ;
use warnings ;
use feature qw{ postderef say signatures state } ;
no warnings qw{ experimental::postderef experimental::signatures } ;
use Carp ;
use Getopt::Long ;
use IO::Interactive qw{ interactive } ;
@jacoby
jacoby / only_positive_tweets.pl
Created July 25, 2017 15:42
Tool I'm creating that uses sentiment analysis to only send positive tweets, because it only sends the tweet if SA >= 0.5
#!/usr/bin/env perl
use feature qw{ postderef say signatures } ;
use strict ;
use warnings ;
use utf8 ;
no warnings qw{ experimental::postderef experimental::signatures } ;
use Carp ;
@jacoby
jacoby / githubio.pl
Created July 13, 2017 15:12
Pulls my Github repos and puts them into a web page
#!/usr/bin/env perl
## ## ## ## ## ##
## ## ## ## ##
## #### ## #### ## # ## ## #### ## ### # ## ##
## ## ## ## ## ##### ## ## ## ## ## ## ## ## ## ##
## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ##
## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ##
## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ##
## #### ## ## ## ## ## # #### ## ### ## #### ##
@jacoby
jacoby / gist:1e7d01a9edd681ef46e58eb88e050d71
Created July 3, 2017 18:52
errors trying to get workable IO::Pty installed in WSL
cpan[1]> upgrade IO::Pty
Reading '/home/jacoby/.local/share/.cpan/Metadata'
Database was generated on Mon, 03 Jul 2017 16:41:02 GMT
Package namespace installed latest in CPAN file
IO::Pty 1.08 1.12 TODDR/IO-Tty-1.12.tar.gz
Running install for module 'IO::Pty'
Checksum for /home/jacoby/.local/share/.cpan/sources/authors/id/T/TO/TODDR/IO-Tty-1.12.tar.gz ok
Scanning cache /home/jacoby/.local/share/.cpan/build for sizes
@jacoby
jacoby / bash_prompt
Created June 27, 2017 21:10
Fun with Bash, giving color-coordination by host, user and host name, current temperature, coffee intake, path and git branch
# DEFAULT
prompt='\033[1;38;5;242m'
revert='\033[00m'
# CARTER
if [ $HOST = 'carter-fe00' ]; then
prompt='\033[1;38;5;210m\033[1;48;5;88m' # pink on dark red background
fi
if [ $HOST = 'carter-fe01' ]; then
prompt='\033[1;38;5;211m\033[1;48;5;88m' # pink on dark red background