Skip to content

Instantly share code, notes, and snippets.

@caidanw
caidanw / System Design.md
Created April 17, 2023 17:07 — forked from vasanthk/System Design.md
System Design Cheatsheet

System Design Cheatsheet

Picking the right architecture = Picking the right battles + Managing trade-offs

Basic Steps

  1. Clarify and agree on the scope of the system
  • User cases (description of sequences of events that, taken together, lead to a system doing something useful)
    • Who is going to use it?
    • How are they going to use it?

Keybase proof

I hereby claim:

To claim this, I am signing this object:

@caidanw
caidanw / resume.json
Last active April 17, 2023 17:08
My public software engineering resume
{
"meta": {
"theme": "elegant",
"canonical": "https://json.schemastore.org/resume",
"version": "v1.0.0"
},
"basics": {
"name": "Caidan Williams",
"label": "Software Engineer",
"picture": "https://drive.google.com/uc?export=view&id=1DMQe1CyDsSIqzQrHxHfu999p0hbOKsW8",
public class PerfectSquare {
public static void main(String[] args) {
int min = 1;
int max = 10000;
int input = min + (int)(Math.random() * ((max - min) + 1));
if(isPerfectSquare(input)) {
System.out.println(input + " is a perfect square");
}
else {
class LengthOfLastWord {
public static void main(String[] args) {
System.out.println(lengthOfLastWord("The longest word in any of the major English language dictionaries is pneumonoultramicroscopicsilicovolcanoconiosis"));
}
public static int lengthOfLastWord(String sentence) {
String[] words = sentence.split(" ", -1);
String lastWord = words[words.length - 1];
return lastWord.length();
}
@caidanw
caidanw / colors.py
Created November 13, 2019 07:45
Common terminal color codes
class Colors:
PURPLE = '\033[95m'
BLUE = '\033[94m'
GREEN = '\033[92m'
ORANGE = '\033[93m'
RED = '\033[91m'
END = '\033[0m'
BOLD = '\033[1m'
UNDERLINE = '\033[4m'
@caidanw
caidanw / mkscript.sh
Last active September 16, 2021 12:59
This script will create a header for a new bash script providing default values, and open the created script in Vim, NeoVim, or Emacs.
#!/bin/bash
# title : mkscript.sh
# description : This script will make a header for a bash script.
# author : Caidan Williams https://github.com/mildmelon
# date : 2019-06-25
# version : 1.4.7
# usage : ./mkscript.sh
# notes : Install Vim or NeoVim to open the created script.
# bash_version : 5.0.3(1)-release
# ======================================================================================================================