See how a minor change to your commit message style can make you a better programmer.
Format: <type>(<scope>): <subject>
<scope> is optional
| "use strict"; | |
| /** | |
| * Hypertext Transfer Protocol (HTTP) response status codes. | |
| * @see {@link https://en.wikipedia.org/wiki/List_of_HTTP_status_codes} | |
| */ | |
| enum HttpStatusCode { | |
| /** | |
| * The server has received the request headers and the client should proceed to send the request body |
| <!doctype html> | |
| <html> | |
| <head><title>Log-In</title></head> | |
| <script> | |
| if (window.opener) { | |
| window.opener.postMessage("popup-done", "*"); | |
| setTimeout(function() { window.close() }, 0); | |
| } | |
| </script> | |
| </head> |
| docker logs nginx 2>&1 | grep "127." | |
| # ref: http://stackoverflow.com/questions/34724980/finding-a-string-in-docker-logs-of-container |
This procedure explains how to install MySQL using Homebrew on macOS Sierra 10.12
$ /usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"At this time of writing, Homebrew has MySQL version 5.7.15 as default formulae in its main repository :
| case class RemoteIteratorWrapper[T](underlying: org.apache.hadoop.fs.RemoteIterator[T]) extends scala.collection.AbstractIterator[T] with scala.collection.Iterator[T] { | |
| def hasNext = underlying.hasNext | |
| def next() = underlying.next() | |
| } | |
| object Conversions { | |
| implicit def remoteIterator2ScalaIterator[T](underlying: org.apache.hadoop.fs.RemoteIterator[T]) : scala.collection.Iterator[T] = RemoteIteratorWrapper[T](underlying) | |
| } |
| // the main app file | |
| import express from "express"; | |
| import loadDb from "./loadDb"; // dummy middleware to load db (sets request.db) | |
| import authenticate from "./authentication"; // middleware for doing authentication | |
| import permit from "./authorization"; // middleware for checking if user's role is permitted to make request | |
| const app = express(), | |
| api = express.Router(); | |
| // first middleware will setup db connection |
| package org.team2168.PID.sensors; | |
| import java.nio.ByteBuffer; | |
| import java.nio.ByteOrder; | |
| import java.util.BitSet; | |
| import java.util.TimerTask; | |
| import edu.wpi.first.wpilibj.SPI; | |
| import edu.wpi.first.wpilibj.SPI.Port; | |
| import edu.wpi.first.wpilibj.Timer; |
| /** | |
| * Fancy ID generator that creates 20-character string identifiers with the following properties: | |
| * | |
| * 1. They're based on timestamp so that they sort *after* any existing ids. | |
| * 2. They contain 72-bits of random data after the timestamp so that IDs won't collide with other clients' IDs. | |
| * 3. They sort *lexicographically* (so the timestamp is converted to characters that will sort properly). | |
| * 4. They're monotonically increasing. Even if you generate more than one in the same timestamp, the | |
| * latter ones will sort after the former ones. We do this by using the previous random bits | |
| * but "incrementing" them by 1 (only in the case of a timestamp collision). | |
| */ |