Skip to content

Instantly share code, notes, and snippets.

View markthomas93's full-sized avatar
:shipit:
Working from home

Mark Thomas markthomas93

:shipit:
Working from home
  • freelance
  • California
View GitHub Profile
@markthomas93
markthomas93 / gitpod.profile
Created June 21, 2022 18:18
gitpod.profile
### --- Start Of GitPod Default --- ###
# ~/.profile: executed by the command interpreter for login shells.
# This file is not read by bash(1), if ~/.bash_profile or ~/.bash_login
# exists.
# see /usr/share/doc/bash/examples/startup-files for examples.
# the files are located in the bash-doc package.
# the default umask is set in /etc/profile; for setting the umask
# for ssh logins, install and configure the libpam-umask package.
#umask 022
@markthomas93
markthomas93 / crystal-disk-mark-fio-bench.sh
Created June 18, 2022 04:08 — forked from O1ahmad/crystal-disk-mark-fio-bench.sh
CrystalDiskMark-esque Disk Benchmark (using fio)
#!/bin/bash
LOOPS=5 #How many times to run each test
SIZE=1024 #Size of each test, multiples of 32 recommended for Q32 tests to give the most accurate results.
WRITEZERO=0 #Set whether to write zeroes or randoms to testfile (random is the default for both fio and crystaldiskmark); dd benchmarks typically only write zeroes which is why there can be a speed difference.
QSIZE=$(($SIZE / 32)) #Size of Q32Seq tests
SIZE+=m
QSIZE+=m
@markthomas93
markthomas93 / cdm_fio.sh
Created June 18, 2022 04:08 — forked from Lykos153/cdm_fio.sh
Reproducing CrystalDiskMark tests with fio - fixes for https://unix.stackexchange.com/revisions/480191/9
#!/bin/bash
# This script is based on https://unix.stackexchange.com/revisions/480191/9 .
# The following changes proved to be necessary to make it work on CentOS 7:
# * removed disk info (model, size) - not very useful, might not work in many cases.
# * using "bw" instead of "bw_bytes" to support fio version 3.1 (those availible through yum @base)
# * escaping exclamation mark in sed command
# * the ".fiomark.txt" is not auto-removed
LOOPS=5 #How many times to run each test
@markthomas93
markthomas93 / fio.crystal.disk.speed.test.script.sh
Created June 18, 2022 03:47
fio.crystal.disk.speed.test.script.sh
#!/bin/bash
if [ -f /usr/bin/fio ] && [ -f /usr/bin/df ]; then #Dependency check
:
else
echo -e "\033[1;31mError: This script requires fio and df to run, please make sure both are installed."
exit
fi
echo "What drive do you want to test? (Default: $HOME on /dev/$(df $HOME | grep /dev | cut -d/ -f3 | cut -d" " -f1) )"
@markthomas93
markthomas93 / cdm_fio.sh
Created June 18, 2022 03:37 — forked from snizovtsev/cdm_fio.sh
Reproducing CrystalDiskMark tests with fio - fixes for https://unix.stackexchange.com/revisions/480191/9
#!/bin/bash
# This script is based on https://unix.stackexchange.com/revisions/480191/9 .
# The following changes proved to be necessary to make it work on CentOS 7:
# * removed disk info (model, size) - not very useful, might not work in many cases.
# * using "bw" instead of "bw_bytes" to support fio version 3.1 (those availible through yum @base)
# * escaping exclamation mark in sed command
# * the ".fiomark.txt" is not auto-removed
LOOPS=5 #How many times to run each test
@markthomas93
markthomas93 / github-actions-notes.md
Created June 16, 2022 20:37 — forked from br3ndonland/github-actions-notes.md
Getting the Gist of GitHub Actions
@markthomas93
markthomas93 / PostgreSQL-EXTENSIONs.md
Created June 16, 2022 20:36 — forked from joelonsql/PostgreSQL-EXTENSIONs.md
1000+ PostgreSQL EXTENSIONs

🗺🐘 1000+ PostgreSQL EXTENSIONs

This is a list of URLs to PostgreSQL EXTENSION repos, listed in alphabetical order of parent repo, with active forks listed under each parent.

⭐️ >= 10 stars
⭐️⭐️ >= 100 stars
⭐️⭐️⭐️ >= 1000 stars
Numbers of stars might not be up-to-date.

@markthomas93
markthomas93 / demo_business_records.json
Created June 9, 2022 21:58 — forked from seanstory/demo_business_records.json
A json listing of fake businesses
[
{
"business_id": "b72ed9bb-d74d-44f6-bb23-83ed7e51121d",
"business_name": "Jane",
"city": "New York",
"street_address": "100 W Houston St",
"phone_number": "(212) 254-7000",
"tags": [
"Breakfast & Brunch",
"American (New)",
@markthomas93
markthomas93 / career-advice.md
Created June 9, 2022 21:54 — forked from Riizade/career-advice.md
A compilation of my career advice for students, new grads, and to some degree even experienced individuals in the software development field.

Optimize for happiness.

Not for salary, not for status, not for "career growth". All of those things are just proxies for things people think will make them happy. Sometimes the best job you can have is a "rest and vest" position working 5 hours a week (not exaggerating, I've been there).

Always think about a job (and anything else) in terms of tradeoffs. How good is the food in the area? Can you enjoy your favorite hobbies in the area (skiing, camping, sports, esports, scuba, surfing, etc)? Will you have time for your hobbies? Can you walk to work? Do you have friends at the company/in the area?

Trying to tie a dollar amount to the above is usually a fool's errand, but generally once you're making $100k+/yr even a substantial pay increase is not worth a noticeable decrease in quality of life elsewhere.

Negotiation is more important than you think.

Read this wonderful blog post by patio11. https://www.kalzumeus.com/2012/01/23/salary-negotiation/