Skip to content

Instantly share code, notes, and snippets.

View congliu0704's full-sized avatar

(George) Cong Liu congliu0704

View GitHub Profile
@saoudrizwan
saoudrizwan / Storage.swift
Last active October 27, 2021 01:51
Helper class to easily store and retrieve Codable structs from/to disk. https://medium.com/@sdrzn/swift-4-codable-lets-make-things-even-easier-c793b6cf29e1
import Foundation
public class Storage {
fileprivate init() { }
enum Directory {
// Only documents and other data that is user-generated, or that cannot otherwise be recreated by your application, should be stored in the <Application_Home>/Documents directory and will be automatically backed up by iCloud.
case documents
@jpalala
jpalala / nginx-php-fpm-mysql-and-phpmyadmin-on-mavericks.md
Last active September 9, 2022 14:52
How to get nginx php-fpm on your mac machine
@dtomasi
dtomasi / default
Last active December 8, 2023 04:20
Brew Nginx PHP7
server {
listen 80;
server_name localhost;
root /Users/YOUR_USERNAME/Sites;
access_log /Library/Logs/default.access.log main;
location / {
include /usr/local/etc/nginx/conf.d/php-fpm;
}
@vasanthk
vasanthk / System Design.md
Last active May 2, 2024 17:45
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?
@Grayson
Grayson / crayons.tsv
Created December 13, 2015 19:42
Color values from OSX's "Crayon" color picker pane
Name CSS Hex R G B
Licorice #000000 0x000000 0 0 0
Lead #191919 0x191919 25 25 25
Tungsten #333333 0x333333 51 51 51
Iron #4C4C4C 0x4C4C4C 76 76 76
Steel #666666 0x666666 102 102 102
Tin #7F7F7F 0x7F7F7F 127 127 127
Nickel #808080 0x808080 128 128 128
Aluminum #999999 0x999999 153 153 153
Magnesium #B3B3B3 0xB3B3B3 179 179 179
@staltz
staltz / introrx.md
Last active May 2, 2024 12:31
The introduction to Reactive Programming you've been missing
@tsiege
tsiege / The Technical Interview Cheat Sheet.md
Last active April 20, 2024 16:52
This is my technical interview cheat sheet. Feel free to fork it or do whatever you want with it. PLEASE let me know if there are any errors or if anything crucial is missing. I will add more links soon.

ANNOUNCEMENT

I have moved this over to the Tech Interview Cheat Sheet Repo and has been expanded and even has code challenges you can run and practice against!






\

@un33k
un33k / sed cheatsheet
Created August 22, 2011 13:28
magic of sed -- find and replace "text" in a string or a file
FILE SPACING:
# double space a file
sed G
# double space a file which already has blank lines in it. Output file
# should contain no more than one blank line between lines of text.
sed '/^$/d;G'