Skip to content

Instantly share code, notes, and snippets.

View itsmemattchung's full-sized avatar

Matt Chung itsmemattchung

View GitHub Profile
ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABgQCyBrKe8L4ljqXxEFVt6dGo33ow947r+L2V+rpCIn0vcoBTu57LEXpkL8isrvmGws44fsR3eOJ6ujAcxMmzJLjXMKEw/Ii/4kQefXUr+VBevSXBW5eJPzIaU3UM5P0vBl9dwwDpn99CJ1alRvA3/B2kIuohOZLgdaw6EJ7BpCc54i52Rp1ebYSlGDLWkOtQjI8YW5Zf0OMn1lw/VYGYz959fuqittY+hn+0VdzJcEt2KUz3ES2CuzFdV4DsgMi9qNIcTwGukJgkmiJhsDjtDzbH1oRmTFpOz7DlKieZn/cm31QiWEWmugugITEhYBMPeCCeg6mOUdBr9dbAOBtA2RNG8G8iEZlEBggRKCGzzhDybbY9nKl1Kz0j7HmOC89QZJDxsMhrUBofPzq91kJDgRa8y0h2B1r21jrGJeAaGqti3aixJWEpg7ywGR2jLM1neuT9OntRdNd73Uipfziy4jTlYv4FL0V9ZrRvx6xbjtzRQ0EN934QynGtIlrLLVFDxSE= matthewchung@Matthews-MacBook-Pro.local
@itsmemattchung
itsmemattchung / tap_counter.html
Created May 17, 2022 02:25
tap counter v2.01
<!DOCTYPE html>
<head>
<script>
var isCountingDown = false;
var counter = 20;
function countdown() {
var timer = document.getElementById("countdownTimer");
}
@itsmemattchung
itsmemattchung / gist:70e8a856f5db798ca471af0c24e17011
Created October 27, 2021 14:02
Configuring ADFS on AWS Active DIrectory
[CmdletBinding(SupportsShouldProcess=$true)]
param (
[Parameter(Mandatory=$True)]
[string]$ServiceAccount,
[Parameter(Mandatory=$True)]
[string]$AdfsAdministratorAccount
)
$ServiceAccountSplit = $ServiceAccount.Split("\");
if ($ServiceAccountSplit.Length -ne 2)
ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABgQC0xHvyXsOEydqVZH1AB3QSclKaTd9FfBLFMAZIUlCALfjQVk9epITfz50L88UuzQDiLPNGpujeWibMHFCwO8onXqiUgYuHxOass6sQXtZSVaXPb9/TETxVE/KdenzcPiPWRIXlEXBubTyhjNjwryc6ZrFNEZGWghgVfcFf1vym/26RoxHnvfvrG593BuGUsbb4cDXHFFjMwrGDWh6BcvtvDPUDfK8cuTOOXbAbH/ovUzVuSf/YQlg8KAxNPCq+r5+6Uwnp9K5tLPO+pxryt9xk9kbVFXJK4a5Mg9PfmYCnsLgtvqsWKo8BzNI2HsZ9tSheL9afN7ig7Ig9ShN/llH6T1qoIR+ys4Pd/gFp22UZJs3xu31l/xFjmT+tTx5ba+fxBlO/blnrTaKUFSeZGsjtjfTA9vyCrU5KYdwhX4NMFPMWHUyEGPvlW9FChxEFmGcLqoxyOseXp+6whQGl+rJUGVKAxc6NcnKC07xBn2RXNYBZ6abO3PkAttbWHuGjShc= matthewchung@Matthews-MacBook-Pro.local
@itsmemattchung
itsmemattchung / static-exercise.c
Created April 7, 2017 18:47
What's going on in memory?
#include <stdio.h>
int main(){
printf("a = %d\n", a());
printf("a = %d\n", a());
printf("a = %d\n", a());
printf("b = %d\n", b());
printf("b = %d\n", b());
printf("b = %d\n", b());
@itsmemattchung
itsmemattchung / DMux
Created February 3, 2017 00:21
Dmux implementation
// This file is part of www.nand2tetris.org
// and the book "The Elements of Computing Systems"
// by Nisan and Schocken, MIT Press.
// File name: projects/01/DMux.hdl
/**
* Demultiplexor:
* {a, b} = {in, 0} if sel == 0
* {0, in} if sel == 1
*/
@itsmemattchung
itsmemattchung / Deque.java
Created June 19, 2016 17:56
Deque implementation
package dsandalgs;
public class Deque<E> {
int INIT_QUEUE_SIZE = 8;
int first = 0;
int size = 0;
E[] queue;
public Deque(){
this.queue = (E[]) new Object[this.INIT_QUEUE_SIZE];
@itsmemattchung
itsmemattchung / sample-app.py
Created March 11, 2016 16:15
example package for aws lambda that uses netstorage and requests
main.py
netstorage/
netstorage/__init__.py
...
requests/
requests/__init__.py
...
@itsmemattchung
itsmemattchung / Makefile
Last active December 16, 2019 09:30
Makefile example for aws lambda
PROJECT = sample-python-app
FUNCTION = $(PROJECT)
REGION = us-east-1
.phony: clean
clean:
rm -f -r $(FUNCTION)*
rm -f -r site-packages
# this goes in diplomatico
PROOF_API_BASE_URL = {{ proof_base_url[env] }}
# group_vars/all
proof_base_url:
qa: 'https://proof-qa.whalerockengineering.com'
production: 'https://proof.whalerockengineering.com'