Skip to content

Instantly share code, notes, and snippets.

View chavda-bhavik's full-sized avatar
📈
Growing

Bhavik Chavda chavda-bhavik

📈
Growing
View GitHub Profile
@iamdeepakram
iamdeepakram / System Design.md
Created February 2, 2021 11:46 — 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?
@prevwong
prevwong / example-grid-craft.js
Created January 4, 2020 18:54
A simple Grid layout system with Craft.js
// Get total `width` of all children
const getAccumulatedChildrenWidth = (helper, parentId) => {
return helper(self.id).decendants().map(id => helper(id).get())
.reduce((a, b) => a.data.props.width + b.data.props.width, 0);
}
const Grid = () => {
return (
<div>
{children}
#!/bin/bash -e
# ubuntu-install-flux.sh
# installs [f.lux](https://justgetflux.com/)
# usage: wget https://gist.githubusercontent.com/deanrather/b547e486d58612c87c6a2e2a0bc876b8/raw/ubuntu-install-flux.sh -O - | sh
sudo apt-get update
apt-cache pkgnames | grep -Fx python-pip || sudo apt-get install -y python-pip
apt-cache pkgnames | grep -Fx python-gconf || sudo apt-get install -y python-gconf
apt-cache pkgnames | grep -Fx python-glade2 || sudo apt-get install -y python-glade2
apt-cache pkgnames | grep -Fx python-appindicator || sudo apt-get install -y python-appindicator