no Homebrew required
$ cd /usr/local/src
$ curl -OL http://nginx.org/download/nginx-1.12.2.tar.gz
$ tar -xvzf nginx-1.12.2.tar.gz && rm nginx-1.12.2.tar.gz
function debounce(fn, delay) { | |
let timer; | |
function helper(...args) { | |
clearTimeout(timer); | |
timer = setTimeout(() => { | |
fn.apply(this, args); // keep the original context | |
}, delay); | |
} |
; AutoHotKey: Mac key bindings for IntelliJ/Android Studio for Windows | |
#IfWinActive ahk_exe idea64.exe || ahk_exe studio64.exe | |
; ====== COMMON ======================================== | |
; Find Action (⌘+Shift+A) -> (Ctrl+Shift+A) | |
#+a:: | |
{ | |
Send ^+a |
version: '2.1' | |
services: | |
mysql: | |
container_name: mysql | |
image: mysql:5.7 | |
ports: | |
- "13306:3306" | |
environment: | |
- MYSQL_ROOT_PASSWORD=root | |
healthcheck: |
##################### | |
# | |
# Use this with or without the .gitattributes snippet with this Gist | |
# create a fixle.sh file, paste this in and run it. | |
# Why do you want this ? Because Git will see diffs between files shared between Linux and Windows due to differences in line ending handling ( Windows uses CRLF and Unix LF) | |
# This Gist normalizes handling by forcing everything to use Unix style. | |
##################### | |
# Fix Line Endings - Force All Line Endings to LF and Not Windows Default CR or CRLF |
Short (72 chars or less) summary
More detailed explanatory text. Wrap it to 72 characters. The blank
line separating the summary from the body is critical (unless you omit
the body entirely).
Write your commit message in the imperative: "Fix bug" and not "Fixed
bug" or "Fixes bug." This convention matches up with commit messages
Instructions tested with a Raspberry Pi 2 with an 8GB memory card. Probably also works fine on a Raspberry Pi 3.
Download the latest Raspbian Jessie Light
image. Earlier versions of Raspbian won't work.
Write it to a memory card using Etcher, put the memory card in the RPi and boot it up.
Gist title: "BASH: ISO 8601 Timestamp with Milliseconds" | |
Summary: How to get an ISO 8601 timestamp with milliseconds in BASH |
/** | |
* Get Local IP Address | |
* | |
* @returns Promise Object | |
* | |
* getLocalIP().then((ipAddr) => { | |
* console.log(ipAddr); // 192.168.0.122 | |
* }); | |
*/ | |
function getLocalIP() { |
FWIW: I (@rondy) am not the creator of the content shared here, which is an excerpt from Edmond Lau's book. I simply copied and pasted it from another location and saved it as a personal note, before it gained popularity on news.ycombinator.com. Unfortunately, I cannot recall the exact origin of the original source, nor was I able to find the author's name, so I am can't provide the appropriate credits.