All of the following information is based on go version go1.8.3 darwin/amd64
.
(Bold = supported by go
out of the box, ie. without the help of a C compiler, etc.)
android
darwin
#! /usr/bin/env node | |
const mason = require('commander'); | |
const { version } = require('./package.json'); | |
const console = require('console'); | |
// commands | |
const create = require('./commands/create'); | |
const setup = require('./commands/setup'); |
# to generate your dhparam.pem file, run in the terminal | |
openssl dhparam -out /etc/nginx/ssl/dhparam.pem 2048 |
upstream websocket { | |
server localhost:3000; | |
} | |
server { | |
listen 80; | |
server_name localhost; | |
access_log /var/log/nginx/websocket.access.log main; |
Install cask
that extends the brew
command :
brew install phinze/cask/brew-cask
Install calibre
using cask
:
brew cask install calibre
function makePropertyMapper<T>(prototype: any, key: string, mapper: (value: any) => T) { | |
const values = new Map<any, T>(); | |
Object.defineProperty(prototype, key, { | |
set(firstValue: any) { | |
Object.defineProperty(this, key, { | |
get() { | |
return values.get(this); | |
}, | |
set(value: any) { | |
values.set(this, mapper(value)); |
Delete all containers
$ docker ps -q -a | xargs docker rm
-q prints only the container IDs -a prints all containers
Notice that it uses xargs to issue a remove container command for each container ID
# check if `docker-machine` command exists | |
if command -v docker-machine > /dev/null; then | |
# fetch the first running machine name | |
local machine=$(docker-machine ls | grep "Running" | head -n 1 | awk '{ print $1 }') | |
if [ "$machine" != "" ]; then | |
eval "$(docker-machine env $machine)" | |
fi | |
fi |
After Sierra upgrade, all my JDK were removed. So here is how I reinstalled all of them with only brew commands, and manage them with jEnv.
First do all your mac updates (especially XCode), then:
Install Brew:
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"