Skip to content

Instantly share code, notes, and snippets.

View nmhnmh's full-sized avatar

Minghao Ni nmhnmh

View GitHub Profile
@nmhnmh
nmhnmh / macos-bootstrap.sh
Last active October 15, 2019 08:27
Bootstrap or reconfigure your macOS to make it development-ready.
#!/usr/bin/env bash
# Setup Homebrew
# Setup macOS: hidden files, keyboard press and hold etc
# Make hidden files visible in Finder.app
defaults write com.apple.finder AppleShowAllFiles yes
# When press and hold a key, send repeat key strokes
@nmhnmh
nmhnmh / alfred.json
Created October 16, 2017 06:16
Template for Alfred App Script Filter JSON output
{
"variables": {
"fruit": "banana",
"vegetable": "carrot"
},
"rerun" : 1,
"items": [
{
"uid": "desktop",
"type": "file",
@nmhnmh
nmhnmh / xenial_ns_nodejs.sh
Created March 7, 2017 09:13
Install NodeSource Nodejs on Ubuntu1604
# install build essentials
sudo apt-get update
sudo apt-get install -y build-essential
# install from NodeSource PPA
curl -sL https://deb.nodesource.com/setup_6.x | sudo -E bash -
sudo apt-get install -y nodejs
@nmhnmh
nmhnmh / xenial_mongo.sh
Created March 7, 2017 09:07
Install Lastest MongoDB Server on Ubuntu1604
# import GPG key
sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv 0C49F3730359A14518585931BC711F9BA15703C6
# write APT source list
echo "deb [ arch=amd64,arm64 ] http://repo.mongodb.org/apt/ubuntu xenial/mongodb-org/3.4 multiverse" | sudo tee /etc/apt/sources.list.d/mongodb-org-3.4.list
# Update APT cache
sudo apt update
# Install
sudo apt-get install -y mongodb-org