Skip to content

Instantly share code, notes, and snippets.

@w0ng
w0ng / install.sh
Last active August 29, 2015 14:12 — forked from fideloper/install.sh
#!/usr/bin/env bash
echo "========================"
echo "Installing base items..."
echo "========================"
apt-get update
apt-get install -y build-essential curl wget python-software-properties mlocate
echo "======================================"
echo "Presetting MySQL password to 'root'..."
@w0ng
w0ng / le-renew-webroot
Created February 10, 2016 17:11 — forked from thisismitch/le-renew-webroot
Let's Encrypt Auto-Renewal using the Webroot Plugin (Nginx)
#!/bin/bash
web_service='nginx'
config_file="/usr/local/etc/le-renew-webroot.ini"
le_path='/opt/letsencrypt'
exp_limit=30;
if [ ! -f $config_file ]; then
echo "[ERROR] config file does not exist: $config_file"

Folder Structure

Motivations

  • Clear feature ownership
  • Module usage predictibility (refactoring, maintainence, you know what's shared, what's not, prevents accidental regressions, avoids huge directories of not-actually-reusable modules, etc)
@w0ng
w0ng / what-forces-layout.md
Created May 14, 2018 13:42 — forked from paulirish/what-forces-layout.md
What forces layout/reflow. The comprehensive list.

What forces layout / reflow

All of the below properties or methods, when requested/called in JavaScript, will trigger the browser to synchronously calculate the style and layout*. This is also called reflow or layout thrashing, and is common performance bottleneck.

Element

Box metrics
  • elem.offsetLeft, elem.offsetTop, elem.offsetWidth, elem.offsetHeight, elem.offsetParent
  • elem.clientLeft, elem.clientTop, elem.clientWidth, elem.clientHeight
  • elem.getClientRects(), elem.getBoundingClientRect()
This file has been truncated, but you can view the full file.
["A ____ atom in an atomic clock beats 9,192,631,770 times a second", "cesium"]
["A ____ generates temperatures five times hotter than those found on the sun's surface", "lightning bolt"]
["A ____ is a pact between a secular authority & the church", "concordat"]
["A ____ is the blue field behind the stars", "canton"]
["A ____ occurs when all the planets of the our Solar System line up", "sysygy"]
["A ____ razor removed from King Tut's Tomb was still sharp enough to be used", "golden"]
["A ____ takes 33 hours to crawl one mile", "snail"]
["A ____ women can get a divorce if her husband doesn't give her coffee", "saudi arabian"]
["A ____ written to celebrate a wedding is called a epithalamium", "poem"]
["A 'dybbuk' is an evil spirit in which folklore", "jewish"]
This file has been truncated, but you can view the full file.
[
{"question":"A ____ atom in an atomic clock beats 9,192,631,770 times a second","answer":"cesium","money":1000},
{"question":"A ____ generates temperatures five times hotter than those found on the sun's surface","answer":"lightning bolt","money":1000},
{"question":"A ____ is a pact between a secular authority & the church","answer":"concordat","money":1000},
{"question":"A ____ is the blue field behind the stars","answer":"canton","money":1000},
{"question":"A ____ occurs when all the planets of the our Solar System line up","answer":"sysygy","money":1000},
{"question":"A ____ razor removed from King Tut's Tomb was still sharp enough to be used","answer":"golden","money":1000},
{"question":"A ____ takes 33 hours to crawl one mile","answer":"snail","money":1000},
{"question":"A ____ women can get a divorce if her husband doesn't give her coffee","answer":"saudi arabian","money":1000},
{"question":"A ____ written to celebrate a wedding is called a epithalamium","answer":"poem","money":1000},
@w0ng
w0ng / faster-git.md
Last active July 10, 2021 01:19 — forked from thomcc/faster-git.md

Steps to faster git on mac.

  1. Update to git 2.16

  2. Setup file monitoring with hgwatchman

    1. Run
    $ brew install watchman
    $ cd /path/to/mozilla-central
    

$ watchman watch-project .