Skip to content

Instantly share code, notes, and snippets.

View JimLiu's full-sized avatar
🐶
Yesterday is history, tomorrow is a mystery, and today is a gift

Jim Liu 宝玉 JimLiu

🐶
Yesterday is history, tomorrow is a mystery, and today is a gift
View GitHub Profile
@vasanthk
vasanthk / System Design.md
Last active May 4, 2024 06:39
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?
@subfuzion
subfuzion / redis-autostart-osx.md
Last active April 26, 2024 21:40
redis auto start OS X

Install with Homebrew

brew install redis

Set up launchctl to auto start redis

$ ln -sfv /usr/local/opt/redis/*.plist ~/Library/LaunchAgents

/usr/local/opt/redis/ is a symlink to /usr/local/Cellar/redis/x.y.z (e.g., 2.8.7)

@CristinaSolana
CristinaSolana / gist:1885435
Created February 22, 2012 14:56
Keeping a fork up to date

1. Clone your fork:

git clone git@github.com:YOUR-USERNAME/YOUR-FORKED-REPO.git

2. Add remote from original repository in your forked repository:

cd into/cloned/fork-repo
git remote add upstream git://github.com/ORIGINAL-DEV-USERNAME/REPO-YOU-FORKED-FROM.git
git fetch upstream
@ninehills
ninehills / chatglm-openai-api.ipynb
Last active April 16, 2024 01:15
chatglm-openai-api.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@necolas
necolas / Composite-Link.js
Created September 19, 2018 23:02
Next.js links with React Native for Web

Make it real

Ideas are cheap. Make a prototype, sketch a CLI session, draw a wireframe. Discuss around concrete examples, not hand-waving abstractions. Don't say you did something, provide a URL that proves it.

Ship it

Nothing is real until it's being used by a real user. This doesn't mean you make a prototype in the morning and blog about it in the evening. It means you find one person you believe your product will help and try to get them to use it.

Do it with style

1. Build GraphQL server using `express-graphql` package.
2. Configure `schema.js` file.
3. Query for data.
@subfuzion
subfuzion / mysql-autostart-osx.md
Created March 18, 2014 22:39
mysql auto start on OS X

Install with Homebrew

brew install mysql

Set up launchctl to auto start mysql

$ ln -sfv /usr/local/opt/mysql/*.plist ~/Library/LaunchAgents

/usr/local/opt/mysql/ is a symlink to /usr/local/Cellar/mysql/x.y.z (e.g., 5.6.16)

@EyMaddis
EyMaddis / hooks_mediaQueries_toString.ts
Created February 20, 2020 12:57
React Native for Web SSR Media Queries
export type DeviceSize = 'mobile' | 'small' | 'medium' | 'large'
export const deviceSize: { [key in DeviceSize]: [number, number] } = {
mobile: [0, 575],
small: [576, 767],
medium: [768, 991],
large: [992, 999999999],
}
@victorferreira
victorferreira / Making it Swift.swift
Last active October 27, 2020 06:52
Updating SQLite Tutorial code to Swift 3. See the tutorial at: https://www.raywenderlich.com/123579/sqlite-tutorial-swift
//: Back to [The C API](@previous)
import SQLite
import Foundation
import PlaygroundSupport
destroyPart2Database()
//: # Making it Swift