Skip to content

Instantly share code, notes, and snippets.

View jimclarkuk's full-sized avatar

James Clark jimclarkuk

View GitHub Profile
# My Screen Config
# Borrowed heavily from http://www.pixelbeat.org/lkdb/screen.html
startup_message off
# Window list at the bottom.
hardstatus alwayslastline
hardstatus string "%-w%{= BW}%50>%n %t%{-}%+w%<"
# Allow editors etc. to restore display on exit
@jimclarkuk
jimclarkuk / gist:8832143
Created February 5, 2014 20:17
Configuring Tunnelblick to use config on mounted drive
# Assuming you've configured tunnelblick
cd ~/Library/Application\ Support/Tunnelblick/Configurations
cp -r * /Volumes/<drive>/tblk/
rm -r Configurations
ln -s /Volumes/<drive>/tblk/ Configurations
@jimclarkuk
jimclarkuk / psql_bulk_insert.pl
Last active December 17, 2015 19:39
Generate a psql script to bulk insert csv with additional date field
sub upload_with_date {
my (
$dt,
$file, # Input CSV
$trade_dt, # The key date field
$db, # The DB name
$user, # The DB user (must have permissions configured)
$schema, # The DB schema
$table, # The DB table name
$requiredfieldcount,
@jimclarkuk
jimclarkuk / deploy_from_jekins.pl
Last active December 22, 2021 23:31
Little perl script to deploy an archived zip from a green jenkins build. A port of http://www.supertom.com/code/download_build_artifacts_from_jenkins.html with added auth
use strict;
use warnings;
use JSON qw( decode_json );
use Data::Dumper;
use LWP;
use Term::ReadKey;
#####
# Perl version of http://www.supertom.com/code/download_build_artifacts_from_jenkins.html with added auth
#