Skip to content

Instantly share code, notes, and snippets.

View lussier's full-sized avatar
📝
hopefully learning something new

Gregory A. Lussier lussier

📝
hopefully learning something new
View GitHub Profile
@lussier
lussier / keybase.md
Created February 20, 2017 14:37
keybase.md

Keybase proof

I hereby claim:

  • I am lussier on github.
  • I am lussier (https://keybase.io/lussier) on keybase.
  • I have a public key whose fingerprint is B539 4052 4FA7 F95A 6628 53E6 6660 1851 4C58 20E3

To claim this, I am signing this object:

@lussier
lussier / gist:1474a898edff60159cc49f490120b82a
Created August 17, 2016 17:50
Terraform 0.7.0 CloudFront Issue
➜ tf-cloudfront-bug terraform apply
aws_cloudfront_origin_access_identity.super-magic-bucket-for-terraform-bug-report: Creating...
caller_reference: "" => "<computed>"
cloudfront_access_identity_path: "" => "<computed>"
comment: "" => "super-magic-bucket-for-terraform-bug-report"
etag: "" => "<computed>"
iam_arn: "" => "<computed>"
s3_canonical_user_id: "" => "<computed>"
aws_cloudfront_origin_access_identity.super-magic-bucket-for-terraform-bug-report: Creation complete
aws_s3_bucket.super-magic-bucket-for-terraform-bug-report: Creating...
@lussier
lussier / customSplit.sh
Last active December 17, 2015 11:09
Split Scanned PDF
#!/bin/bash
documentPath=$1
numberOfPages=$(pdftk $documentPath dump_data | grep NumberOfPages | tr " " "\n" | grep -o '[0-9]*')
for i in {1..$numberOfPages..4}
do
start=$i;
end=$((i+2));
pdftk $documentPath cat $start-$end output $i.pdf
done
@lussier
lussier / gist:5193791
Last active December 15, 2015 03:19
Send email using MailGun
# 1. API-Key
# 2. Application Name
# 3. From (email address)
# 4. To (email address)
# 5. Subjet line
# 6. Message body
curl -s --user api:key-'$1' \
https://api.mailgun.net/v2/$2.mailgun.org/messages \
-F from='$3'\
@lussier
lussier / gist:5193774
Last active December 15, 2015 03:19
Checks TOU.TV Show's Availability
# Argument 1: show's name (ex. 19-2)
# Argument 2: season (ex. 02)
# Argument 3: episode (ex. 08)
#!/bin/bash
result=$(curl -I http://www.tou.tv/$1/S$2E$3 | grep "302")
if [ "${result:0:12}" = "HTTP/1.1 302" ];
then
echo "Unavailable";
else
@lussier
lussier / Filename Cleaner
Created March 17, 2013 19:16
Renames x_y.ext files in y.ext in a given directory.
#!/bin/bash
for filename in ele116/*; do
newFilename=$(echo $filename | \
sed -ne "s/^[^_]\+_//p")
mv $filename $newFilename
done