A piggy bank of commands, fixes, succinct reviews, some mini articles and technical opinions from a (mostly) Perl developer.

graphical perl debugger

Devel::ptkdb

requires Tk...which requires X11.

seq on Mac?

Mac doesn't have seq like Redhat does.

instead of: seq 1 10
seq [first] [increment] [last]

try: jot 10 1 10
jot [reps] [start] [finish] [step]

Pass in an extra parameter to perl -n

Use an environment variable

for k in $(cat list_of_ids); do export KK=$k; perl -F"\t" -lane'print if ($F[3] eq $ENV{KK})' data/master_list_of_queries >> new_data_file; done

How big are my MySQL databases?


SELECT TABLE_SCHEMA AS 'Database', TABLE_NAME AS 'Table', CONCAT(ROUND(((DATA_LENGTH + INDEX_LENGTH - DATA_FREE) / 1024 / 1024),2)," MB") AS Size FROM INFORMATION_SCHEMA.TABLES