Skip to content

Instantly share code, notes, and snippets.

@anyboo
anyboo / fix-homebrew-npm.md
Created January 30, 2018 06:39 — forked from DanHerbert/fix-homebrew-npm.md
Instructions on how to fix npm if you've installed Node through Homebrew on Mac OS X or Linuxbrew

Fixing npm On Mac OS X for Homebrew Users

Installing node through Homebrew can cause problems with npm for globally installed packages. To fix it quickly, use the solution below. An explanation is also included at the end of this document.

Solution

This solution fixes the error caused by trying to run npm update npm -g. Once you're finished, you also won't need to use sudo to install npm modules globally.

Before you start, make a note of any globally installed npm packages. These instructions will have you remove all of those packages. After you're finished you'll need to re-install them.

@anyboo
anyboo / atom-user-guide.md
Last active March 12, 2018 07:25
Open file using atom editor from Unix Terminal

The atom user manual

Introduce atom

@anyboo
anyboo / use-pm2-readme.md
Last active March 21, 2018 02:00
How to use PM2

Commands Install : cnpm install pm2 -g

npm & package.json

eg : npm run [script].

"scripts": {
"dev": "node build/dev-server.js",
@anyboo
anyboo / how-to-npm-command.md
Created March 9, 2018 02:33
Npm command manual

npm command manual

npm ls
npm update
npm run [script]

@anyboo
anyboo / docker-guide.md
Last active March 10, 2018 09:35
docker newbie manual

docker bug

Terminal 中的 docker login : 使用id,不是email;否则 docker run hello-world 就会出现

Get https://registry-1.docker.io/v2/library/hello-world/manifests/latest: unauthorized: incorrect username or password.

Kaisir 提供了参考

@anyboo
anyboo / brew-guide.md
Last active June 21, 2018 11:09
Homebrew manual

brew & brew cask command

introduce brew & brew cask

Unix Command Manual

collect unix common command for macOS

netstat -a | grep ssh
pkg-config --list-all
source ~/.bash_profile
sudo tail -f /var/log/system.log
:w !sudo tee %
@anyboo
anyboo / iTunes-add-tone-guide.md
Created March 15, 2018 08:41
How to import music to iPhone's tones by iTunes
@anyboo
anyboo / sshd_config.sh
Created March 15, 2018 10:44 — forked from MarioRicalde/sshd_config.sh
SSH config that is password less – the file for OSX is located in `/private/etc/sshd_config` – then restart ssh with `sudo killall ssh-agent`.
# $OpenBSD: sshd_config,v 1.89 2013/02/06 00:20:42 dtucker Exp $
# This is the sshd server system-wide configuration file. See
# sshd_config(5) for more information.
# This sshd was compiled with PATH=/usr/bin:/bin:/usr/sbin:/sbin
# The strategy used for options in the default sshd_config shipped with
# OpenSSH is to specify options with their default value where
# possible, but leave them commented. Uncommented options override the
@anyboo
anyboo / mind-set.md
Created March 15, 2018 14:50
record personal minds

效率

  1. 能坚持
  2. 有记录的好习惯