Skip to content

Instantly share code, notes, and snippets.

View landon9720's full-sized avatar

Landon Kuhn landon9720

View GitHub Profile
@landon9720
landon9720 / datadog-role.yaml
Created February 1, 2019 17:19
DataDog AWS integration role defined by CloudFormation YAML
AWSTemplateFormatVersion: "2010-09-09"
Description: Role for DataDog integration
Parameters:
DataDogExternalId:
Type: "String"
Description: "See https://app.datadoghq.com/account/settings#integrations/amazon_web_services"
NoEcho: "true"
Resources:
DatadogAWSIntegrationRole:
Type: "AWS::IAM::Role"
@landon9720
landon9720 / kinesis-alarms.yaml
Created February 1, 2019 17:16
CloudFront YAML configuration for CloudWatch alarms on Kinesis streams
AWSTemplateFormatVersion: "2010-09-09"
Description: Alarms for Kinesis streams
Parameters:
KinesisStreamName:
Description: name of stream to monitor
Type: String
Resources:
IteratorAgeMilliseconds:
Type: AWS::CloudWatch::Alarm
Properties:
openssl rsa -aes256 -in in.pem -out out.pem
@landon9720
landon9720 / git-branches-by-commit-date.sh
Created April 15, 2016 16:33 — forked from jasonrudolph/git-branches-by-commit-date.sh
List remote Git branches and the last commit date for each branch. Sort by most recent commit date.
# Credit http://stackoverflow.com/a/2514279
for branch in `git branch -r | grep -v HEAD`;do echo -e `git show --format="%ci %cr" $branch | head -n 1` \\t$branch; done | sort -r
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
19:54 ~ $ gzip -l tmp/afile
compressed uncompressed ratio uncompressed_name
30164590 435675317 93.0% tmp/afile
Yarn-client
-XX:OnOutOfMemoryError='kill -9 %p'
set -e exit immediately if a command exits with a non-zero status
@landon9720
landon9720 / copy-csv.sh
Created February 2, 2016 19:39
copy compressed csv file from s3 to psql
aws s3 cp s3://your_bucket/your_key - | gzcat | pv | psql your_db -c "copy your_table from stdin delimiter ',' csv;"