Skip to content

Instantly share code, notes, and snippets.

View jschnare's full-sized avatar

John Schnare jschnare

  • Kano/Apps
  • Victoria, BC
View GitHub Profile
# from: http://stackoverflow.com/questions/59895/can-a-bash-script-tell-what-directory-its-in
# credits: 3bcdnlklvc04a, e-satis
# Works for all versions,including when called via multple depth soft link,
# when script called by command "source" aka . (dot) operator. when arg $0 is
# modified from caller. "./script" "/full/path/to/script"
# "/some/path/../../another/path/script" "./some/folder/script" SCRIPT_PATH is
# given in full path, no matter how it is called. Just make sure you locate
# this at start of the script.
@jschnare
jschnare / aws-header-filter.pl
Created November 11, 2011 08:18 — forked from evandhoffman/aws-header-filter.pl
aws-header-filter.pl
#!/usr/bin/perl
use strict;
use warnings;
my @legal_headers = qw( Accept-Language Bcc Cc Comments Content-Type Content-Transfer-Encoding Content-ID Content-Description Content-Disposition Content-Language Date DKIM-Signature DomainKey-Signature From In-Reply-To Keywords List-Archive List-Help List-Id List-Owner List-Post List-Subscribe List-Unsubscribe Message-Id MIME-Version Received References Reply-To Return-Path Sender Subject Thread-Index Thread-Topic To User-Agent );
my %legal_headers;
@legal_headers{@legal_headers} = (1) x @legal_headers;
#!/bin/bash
. /opt/elasticbeanstalk/hooks/common.sh
# Load ElasticBeanstalk environment variables
touch /tmp/env.sh
chmod 600 /tmp/env.sh
jq .docker.env[] $EB_CONFIG_FILE | tr -d \" > /tmp/env.sh
@jschnare
jschnare / keybase.md
Created February 20, 2019 01:45
keybase

Keybase proof

I hereby claim:

  • I am jschnare on github.
  • I am jschnare_kano (https://keybase.io/jschnare_kano) on keybase.
  • I have a public key ASDDVl9xweGnL8vAlxRVRr1-77Re4xXelLVTp0F1SmbAZgo

To claim this, I am signing this object:

Keybase proof

I hereby claim:

  • I am jschnare on github.
  • I am jschnare (https://keybase.io/jschnare) on keybase.
  • I have a public key ASDf163gc0_nQjTYNTcnRMVXL13XbWqu0XWcjphP11xbmgo

To claim this, I am signing this object: