Skip to content

Instantly share code, notes, and snippets.

View danmaas's full-sized avatar

Dan Maas danmaas

View GitHub Profile
@danmaas
danmaas / fetch-ses-email.sh
Created February 15, 2018 22:36
Fetch emails from Amazon S3 and feed to procmail
#!/bin/bash
# Fetch emails from Amazon S3 (deposited by the Amazon SES receiver's S3 action)
# and feed to procmail. In the spirit of fetchmail, but using S3 instead of SMTP.
BUCKET=my-bucket-name
export AWS_PROFILE=my-aws-profile
PROCMAIL="/usr/bin/procmail"
@danmaas
danmaas / alb-ingress-singleton.yaml
Last active October 3, 2019 15:50
Singleton ALB ingress controller fronting Nginx for Amazon EKS
apiVersion: extensions/v1beta1
kind: Ingress
metadata:
name: "myALB"
labels:
app: "myALBApp"
annotations:
# trigger the alb-ingress-controller
kubernetes.io/ingress.class: "alb"
@danmaas
danmaas / DockerScrape.ps1
Last active July 29, 2018 08:20 — forked from cwilhit/DockerScrape.ps1
Scrapes over dockerhub, grabbing the pull counts of all images, the last time "latest" tag was updated, and gets the associated "FROM" image for each container.
#########################################################################################
#
# Copyright (c) Microsoft Corporation. All rights reserved.
#
#########################################################################################
Microsoft.PowerShell.Core\Set-StrictMode -Version Latest
#region variables
Mattermost Server
© 2015-present Mattermost, Inc. All Rights Reserved. See LICENSE.txt for license information.
NOTICES:
--------
This document includes a list of open source components used in Mattermost Server, including those that have been modified.
---
MATTERMOST-WEBAPP NPM DEPENDENCIES:
(first-degree only)
Note: "Missing" means the code is used by mattermost-webapp, but is not mentioned in NOTICE.txt.
- bootstrap-colorpicker: out-of-date copyright info
- bootstrap: removed, but still referenced in NOTICE.txt
- chart.js: out-of-date copyright info
- deep-equal: missing
- exif2css: missing
@danmaas
danmaas / circleci-config.yml
Last active February 8, 2019 20:53
Continuous Deployment to Google Kubernetes Engine with CircleCI (config.yaml)
version: 2
jobs:
build_and_test:
# ... insert your test suite here
docker_push:
# Build app container and push it to the GCR registry
# Note: we want to build and push an image with tags based on both
# the Git commit hash AND the branch name. This way, we can refer to
@danmaas
danmaas / myapp-deployment.yaml
Created December 11, 2018 07:55
Continuous Deployment to Google Kubernetes Engine with CircleCI (Kubernetes Deployment)
apiVersion: extensions/v1beta1
kind: Deployment
metadata:
name: staging-app
labels:
app: myapp
spec:
template:
metadata:
labels:
@danmaas
danmaas / leelaz-remote.sh
Last active December 26, 2018 22:05
Leela Zero remote wrapper script
#!/bin/sh
# this is a wrapper script that runs leelaz via SSH on a fast cloud instance
# suitable as a drop-in replacement for the leelaz command used by the Lizzie GUI
# see general instructions at https://docs.google.com/document/d/1P_c-RbeLKjv1umc4rMEgvIVrUUZSeY0WAtYHjaxjD64/edit
# use p3.2xlarge instance, "Deep Learning Base AMI (Ubuntu) Version 14.0+" (ami-012b19f1736b6aae8)
# login:
# - nvidia-smi (verify GPU exists)
@danmaas
danmaas / alb-ingress-iam-policy.json
Last active December 27, 2018 22:46
AWS IAM policy for alb-ingress-controller (see https://github.com/helm/charts/tree/master/incubator/aws-alb-ingress-controller). This grants the necessary permissions to create and manage ALBs for supporting Kubernetes Ingress resources.
{
"Version": "2012-10-17",
"Statement": [
{
"Effect": "Allow",
"Action": ["acm:DescribeCertificate", "acm:ListCertificates"],
"Resource": "*"
},
{
"Effect": "Allow",
@danmaas
danmaas / expo-notifications+0.8.2.patch
Created December 23, 2020 00:01
Expo-notifications hack patch to fix iOS provisional permissions
diff --git a/node_modules/expo-notifications/ios/EXNotifications/Permissions/EXNotificationPermissionsModule.m b/node_modules/expo-notifications/ios/EXNotifications/Permissions/EXNotificationPermissionsModule.m
index 4b5fcb6..af045f3 100644
--- a/node_modules/expo-notifications/ios/EXNotifications/Permissions/EXNotificationPermissionsModule.m
+++ b/node_modules/expo-notifications/ios/EXNotifications/Permissions/EXNotificationPermissionsModule.m
@@ -45,10 +45,15 @@ - (instancetype)init
requester:(UMPromiseResolveBlock)resolve
rejecter:(UMPromiseRejectBlock)reject)
{
+ // DJM - revert part of this commit: https://github.com/expo/expo/commit/4500a7536a9d21ce4b1c895d6a11b960be10a82a
+ // which drops the requestedPermission parameter: https://github.com/expo/expo/issues/11414