Skip to content

Instantly share code, notes, and snippets.

View roylines's full-sized avatar

Roy Lines roylines

View GitHub Profile

Keybase proof

I hereby claim:

  • I am roylines on github.
  • I am roylines (https://keybase.io/roylines) on keybase.
  • I have a public key whose fingerprint is 0D6E C8A2 9750 F7F1 FC0C 4DBD 731F B64F FE46 56EA

To claim this, I am signing this object:

@roylines
roylines / flickrup.sh
Created March 18, 2012 10:19
Use flickcurl to upload all jpgs in the current directory
#!/bin/bash
set -e
FLICKCURL="/usr/bin/flickcurl"
for image in *.jpg; do flickcurl upload $image; done
@roylines
roylines / dumppics.sh
Created January 5, 2013 19:51
finds mounted DCIM directories and copies all jpgs
#!/bin/bash
set -e
cp -v $(find `mount | grep vfat | cut -d' ' -f3` *.jpg | grep DCIM) .
@roylines
roylines / renamepics.sh
Created January 5, 2013 19:53
renames jpgs using exif info
#!/bin/bash
set -e
exiv2 -v -r'%Y%m%d.%H%M%S' rename $(ls)
@roylines
roylines / github_issues_to_csv
Last active January 21, 2016 14:44
Extract github issues into a csv file. Usage: github_issues_to_csv -u USER -t TOKEN -o ORG -r REPO -l LABELS -h HOST
#!/usr/bin/env bash
while [[ $# > 1 ]]
do
key="$1"
case $key in
-u|--user)
USER="$2"
shift # past argument
@roylines
roylines / remote-terraform-s3-policy
Created September 19, 2015 10:46
IAM policy to allow storing of remote terraform state in S3
{
"Version": "2012-10-17",
"Statement": [
{
"Effect": "Allow",
"Action": [
"s3:*"
],
"Resource": [
"arn:aws:s3:::my.bucket",
@roylines
roylines / terraform.yml
Created September 5, 2021 09:23
github action: terraform
name: terraform
on:
push:
paths:
- 'terraform/**'
- '.github/workflows/terraform.yml'
jobs:
terraform:
runs-on: ubuntu-latest
@roylines
roylines / jekyll.yml
Created September 5, 2021 09:25
github action: jekyll
name: jekyll
on:
push:
paths:
- 'jekyll/**'
- '.github/workflows/jekyll.yml'
jobs:
jekyll:
runs-on: ubuntu-latest
@roylines
roylines / haproxy.cfg
Last active July 4, 2022 11:19
SImple haproxy configuration for microservices. Optional ssl and prerender.io
global
pidfile /var/run/haproxy.pid
log 127.0.0.1 local0
maxconn 4000
# set default parameters to the intermediate configuration
# tune.ssl.default-dh-param 2048
# ssl-default-bind-ciphers ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-AES256-GCM-SHA384:DHE-RSA-AES128-GCM-SHA256:DHE-DSS-AES128-GCM-SHA256:kEDH+AESGCM:ECDHE-RSA-AES128-SHA256:ECDHE-ECDSA-AES128-SHA256:ECDHE-RSA-AES128-SHA:ECDHE-ECDSA-AES128-SHA:ECDHE-RSA-AES256-SHA384:ECDHE-ECDSA-AES256-SHA384:ECDHE-RSA-AES256-SHA:ECDHE-ECDSA-AES256-SHA:DHE-RSA-AES128-SHA256:DHE-RSA-AES128-SHA:DHE-DSS-AES128-SHA256:DHE-RSA-AES256-SHA256:DHE-DSS-AES256-SHA:DHE-RSA-AES256-SHA:AES128-GCM-SHA256:AES256-GCM-SHA384:AES128-SHA256:AES256-SHA256:AES128-SHA:AES256-SHA:AES:CAMELLIA:DES-CBC3-SHA:!aNULL:!eNULL:!EXPORT:!DES:!RC4:!MD5:!PSK:!aECDH:!EDH-DSS-DES-CBC3-SHA:!EDH-RSA-DES-CBC3-SHA:!KRB5-DES-CBC3-SHA
defaults
log global
@roylines
roylines / haproxy.cfg
Last active July 15, 2023 02:45
haproxy configuration for using with prerender.io
# Change YOUR_TOKEN to your prerender token
# Change http://example.com (server_name) to your website url
frontend my-frontend
mode http
bind :80
# prerender.io
acl user-agent-bot hdr_sub(User-Agent) -i baiduspider twitterbot facebookexternalhit rogerbot linkedinbot embedly showyoubot outbrain pinterest slackbot vkShare W3C_Validator
acl url-asset path_end js css xml less png jpg jpeg gif pdf doc txt ico rss zip mp3 rar exe wmv doc avi ppt mpg mpeg tif wav mov psd ai xls mp4 m4a swf dat dmg iso flv m4v torrent ttf woff