Skip to content

Instantly share code, notes, and snippets.

Matt M. theothermattm

Block or report user

Report or block theothermattm

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
theothermattm /
Created Feb 20, 2020
Using docker compose with overrides

Because I always forget the right order of passing in arguments!

Example up command with background process flag set:

docker-compose -f docker-compose.yml -f docker-compose-override-file.yml up -d myservice name
theothermattm /
Created Oct 7, 2015
Rsync files using .gitignore
# sync everything excluding things in .gitignore
# delete anything on target not in source
# include dotfiles and symlinks, also use compression
rsync -azP --delete --filter=":- .gitignore" . my-target-host:/my/target/directory
theothermattm /
Created Dec 6, 2019
docker-compose command cheatsheet

build everything in the docker-compose.yaml file

docker-compose build

build just one service in docker-compose.yaml file

docker-compose build myservice

run everything in the docker-compose.yaml file

theothermattm /
Last active Oct 8, 2019
Installing Python so it doesn't suck on MacOS

Thanks to @kevlarr for this info... Saving it myself for reference.

The easiest way to get started is via pyenv and virtualenv.

  • Install pyenv via brew install pyenv
  • Add eval "$(pyenv init -)" to your bash, etc. profile if you want to enable autocomplete (hint: you do),
  • Install project Python version via pyenv install 3.6.81

1 If you are running Mojave and are having issues building (looking at you, zlib), you likely need to install C header files

theothermattm / mysql-dummy-data.sql
Created Aug 20, 2019
Create Dummy Data with MySQL Stored Proc
View mysql-dummy-data.sql
/* based on */
CREATE PROCEDURE insert_test_data()
DECLARE i INT default 1;
SET mydate = DATE_ADD('2017-05-01 00:01:00', INTERVAL FLOOR(RAND() * 700) DAY);
WHILE i < 1000000 DO
INSERT INTO `telemetry_test` (`humidity`, `temperature`, `sql_insert`, `sql_update`)
theothermattm /
Created Jul 12, 2019
Sed - remove matched pattern simple script
# this chains them to make the regex easier to follow
sed -n -e 's/^${FIRSTPATTERN}//p' test.txt | sed -n -e 's/${SECONDPATTERN}//p'
theothermattm /
Created Jun 14, 2019
Debugging w/ Node.js and Chrome

Node debugging with chrome

See this article first.

Use node --inspect

Most of the time it should give you a chrome URL. If not, go to about:inspect in chrome and you should see a target to inspect

Using mocha


Some of the greatest info I've seen on creating a healthy engineering courtesy of Spotify:

Spotify Engineering Culture Part 1

TODO make notes on this one

Spotify Engineering Culture Part 2

  • 0:50 - "We aim to make mistakes faster than anyone else" - Fail Fast and Improve Fast.
  • 1:30 - "Fail Friendly Environment" - Encourage sharing of failures so everyone can learn from them. Some teams have "Fail walls" showing off their failures.
You can’t perform that action at this time.