Skip to content

Instantly share code, notes, and snippets.

View joer14's full-sized avatar

Joe Rowley joer14

View GitHub Profile

Keybase proof

I hereby claim:

  • I am joer14 on github.
  • I am joer (https://keybase.io/joer) on keybase.
  • I have a public key whose fingerprint is 15D1 9049 CB27 AFD7 1541 7290 4C61 B722 3314 B1B4

To claim this, I am signing this object:

@joer14
joer14 / package.json
Last active October 11, 2016 23:12
Boilerplate NPM Install Issue
{
"name": "TCPI",
"version": "0.1.0",
"license": "IHA",
"description": "",
"repository": {
"type": "git",
"url": "ssh://phabricator.iha.org/diffusion/1/dh_frontend.git"
},
"engines": {
@joer14
joer14 / gist:ee512a454fb41205cc82be386a0e9fe7
Last active September 14, 2017 18:02
zappa_static_s3_frontend.py
#!/usr/bin/env python
import os
import boto3
import botocore
import json
import mimetypes
'''
--- this does not work yet! I still need to add stuff for configuring api gateway correctly.
Currently just creates buckets and configures them for website hosting, and sets a public policy to the buckets.
import requests
import json
import datetime
import time
from datetime import timedelta, date
import pandas as pd
'''
@joer14
joer14 / -
Created December 8, 2017 18:28
#!/usr/local/bin/python
import requests
import json
import datetime
import time
import emoji
import random
#
key = 'MW9S-E7SL-26DU-VV8V'
url = 'http://api.bart.gov/api/etd.aspx?json=y&cmd=etd&orig=12th&dir=n&key='+key
@joer14
joer14 / rds_download_log.py
Last active March 8, 2024 08:34
workaround for downloading rds logs via the AWS REST interface. This uses the IAM credentials for the session so should 'just work' on a lambda without needing to hardcode credentials/pass them in via environmental variables etc.
"""
Craft a web request to the AWS rest API and hit an endpoint that actually works but isn't supported in the CLI or in Boto3.
Based on this: https://github.com/aws/aws-cli/issues/2268#issuecomment-373803942
"""
import boto3
import os
import sys, os, base64, datetime, hashlib, hmac, urllib
import requests
@joer14
joer14 / pdf-form-fill.js
Created September 11, 2019 23:15
I hacked pdf-form-fill to support multiline text. Only works if you explicitly specify `defaultTextOptions` when calling `fillForm`
var hummus = require('hummus'),
_ = require('lodash');
/**
* toText function. should get this into hummus proper sometimes
*/
function toText(item) {
if(item.getType() === hummus.ePDFObjectLiteralString) {
return item.toPDFLiteralString().toText();
}
@joer14
joer14 / cb.yml
Created June 19, 2020 19:08
teamocil Curebase config
name: curebase
windows:
- name: curebase
root: ~/work/Curebase/server
focus: true
# layout: main-vertical
layout: b51c,258x58,0,0{103x58,0,0,1,154x58,104,0[154x21,104,0,2,154x17,104,22,33,154x18,104,40,3]}
panes:
- commands:
- export NODE_ENV='development'
name: curebase
windows:
- name: curebase
root: ~/work/Curebase/server
focus: true
# layout: main-vertical
layout: b51c,258x58,0,0{103x58,0,0,1,154x58,104,0[154x21,104,0,2,154x17,104,22,33,154x18,104,40,3]}
panes:
- commands:
- export NODE_ENV='development'