Skip to content

Instantly share code, notes, and snippets.

View mkwatson's full-sized avatar

Mark Watson mkwatson

View GitHub Profile
send_texts () {
available_number="XXXXXX". # Get this from twilio
mark="XXXXXX"
jennifer="XXXXX"
for number in $mark $jennifer ; do
curl -X POST -d "Body=There's availability at Metreon! https://myturn.ca.gov/" \
-d "From=$available_number" -d "To=$number" \
"https://api.twilio.com/2010-04-01/Accounts/$ACCOUNT_ID/Messages" \
############################
# UNION
############################
WITH t1(v) AS
(VALUES (1), (1), (2)),
t2(v) AS
(VALUES (2), (2), (3))
(SELECT DISTINCT v FROM t1)
UNION
@mkwatson
mkwatson / review-checklist.md
Created July 24, 2020 16:29 — forked from bigsergey/review-checklist.md
Front-end Code Review Checklist

Review checklist

General

  1. Does the code work?
  2. Description of the project status is included.
  3. Code is easily understand.
  4. Code is written following the coding standarts/guidelines (React in our case).
  5. Code is in sync with existing code patterns/technologies.
  6. DRY. Is the same code duplicated more than twice?
@mkwatson
mkwatson / pyenv+virtualenv.md
Last active February 3, 2020 21:42 — forked from tiagoamx/pyenv+virtualenv.md
Cheatsheet: pyenv, virtualenvwrapper, and pip

Cheatsheet: pyenv, virtualenvwrapper, and pip

Installation (for Mac OS)

Install pyenv with brew

brew update
brew install pyenv
@mkwatson
mkwatson / long.sql
Created January 30, 2020 04:13
long ass sql
WITH normalized_match(name, starttime, endtime, youtube_video, twitch_channel) AS
(VALUES
('Jan 24: Academy - C9 vs TL', TIMESTAMP '2020-01-25 01:00', TIMESTAMP '2020-01-25 01:40', '999FdvjJyPY', 'Academy'),
('Jan 24: Academy - DIG vs EG', TIMESTAMP '2020-01-25 01:00', TIMESTAMP '2020-01-25 01:40', '999FdvjJyPY', 'Academy'),
('Jan 24: Academy - TSM vs IMT', TIMESTAMP '2020-01-25 01:00', TIMESTAMP '2020-01-25 01:40', '999FdvjJyPY', 'Academy'),
('Jan 24: Academy - FLY vs CLG', TIMESTAMP '2020-01-25 01:00', TIMESTAMP '2020-01-25 01:40', '999FdvjJyPY', 'Academy'),
('Jan 24: Academy - 100T vs GG', TIMESTAMP '2020-01-25 01:49', TIMESTAMP '2020-01-25 02:20', '999FdvjJyPY', 'Academy'),
('Jan 25: LCS - C9 vs TL', TIMESTAMP '2020-01-25 22:06', TIMESTAMP '2020-01-25 22:32', '3KABoEyHqUM', 'LCS'),
('Jan 25: LCS - CLG vs DIG', TIMESTAMP '2020-01-25 22:58', TIMESTAMP '2020-01-25 23:38', '3KABoEyHqUM', 'LCS'),
('Jan 25: LCS - 100T vs GG', TIMESTAMP '2020-01-26 00:02', TIMESTAMP '2020-01-26 0
(defmulti sell-booze (fn [store person] [(over-21? person) (enough-supply? store) (enough-money? person)])
curl -X GET 'https://api.twitch.tv/helix/users?login=dignitas' \
-H 'Client-ID: kimne78kx3ncx6brgo4mv6wki5h1ko'
@mkwatson
mkwatson / Mod.idr
Last active July 13, 2018 00:33
Hoping to prove some things about modular congruences
%default total
{-
A few notes:
* I think maybe this should be called a Quotient Type
* There's a few fns where I'd ike to pattern match on n=(m ** prf) but instead am using fst and snd
-}
data Mod : (m ** Not (m = Z)) -> Type where
MkMod : (n : Nat) -> Mod m
myReverse : Vect n elem -> Vect n elem
myReverse [] = []
myReverse {n = S k} (x :: xs)
= let result = myReverse xs ++ [x] in
rewrite plusCommutative 1 k in ?myReverse_rhs_2
{- my holes
elem : Type
k : Nat
x : elem
@mkwatson
mkwatson / README.md
Last active September 14, 2017 17:48
Verifying and Decrypting notes

Generate data

This is handled by AT&T, but we can replicate it for development and testing

Generate self-signed key and certificate

Used for signing the data.

Bash command:

> openssl req -x509 -newkey rsa:4096 -keyout key.pem -out cert.pem -days 365