Skip to content

Instantly share code, notes, and snippets.

View nsleejian's full-sized avatar

Lee nsleejian

  • ShenZhen,GuangDong,China
View GitHub Profile
@nsleejian
nsleejian / gist:dcb7157c68c96d85618c8da1d9f7cd97
Last active December 15, 2017 01:46
How do I connect to ssh with a different public key?

=======1=======

Assuming you're on a Unix/Linux environment, you can create or edit the file ~/.ssh/config.

That config file allows you to establish the parameters to use for each host; so, for example:

Host host1
  HostName <hostname_or_ip>
  IdentityFile ~/.ssh/identity_file1
@nsleejian
nsleejian / README.md
Created January 17, 2017 05:35 — forked from cyrilis/README.md
Take a selfie every time you git commit

Take a selfie every time you git commit

本文仅写了 macOS 下的实践, 其他系统可参照修改。

通过 homebrew 安装 imagesnap:

brew install imagesnap
@nsleejian
nsleejian / surge.conf
Created July 4, 2016 01:34
📦 Surge 安装步骤导览 | http://bit.ly/292EJz3
# 规则配置仅供参考,适用于 Surge iOS & Mac;
# 包含 Reject 规则,用于拦截广告、行为分析、数据统计
# 屏蔽部分运营商劫持网页弹出流量统计
# 部分特性可能仅适用于最新的 TestFlight 版本
[General]
# warning, notify, info, verbose
loglevel = notify
ipv6 = true
skip-proxy = 127.0.0.1, 192.168.0.0/16, 10.0.0.0/8, 172.16.0.0/12, 100.64.0.0/10, localhost, *.local
@nsleejian
nsleejian / iOS 技能图谱.md
Created January 12, 2016 03:30 — forked from tangqiaoboy/iOS 技能图谱.md
iOS 技能图谱

编程语言

  • Swift
  • Objective-C
  • C++/C
  • JavaScript

操作系统

  • Mac OSX
  • iOS
@nsleejian
nsleejian / fix-homebrew-npm.md
Created January 12, 2016 02:46 — 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

If you just want to fix the issue quickly, scroll down to the "solution" section below.

Explanation of the issue

If you're a Homebrew user and you installed node via Homebrew, there is a major philosophical issue with the way Homebrew and NPM work together. If you install node with Homebrew and then try to do npm update npm -g, you may see an error like this:

$ npm update npm -g