Skip to content

Instantly share code, notes, and snippets.

Avatar
💻
Coding

流浪大法师 liuliangsir

💻
Coding
View GitHub Profile
View Windows Subsystem for Linux (WSL) - install guide.md

Windows 10 Fall Creators Update - Installing Node.js on Windows Subsystem for Linux (WSL)

Windows just released the windows subsystem for linux feature to the public with its latest windows fall creator update, if you are not familiar with this feature it allows you to run linux binaries natively on windows - F.A.Q.

Enabling WSL

The feature is not enabled by default and you need to activate it, you can do it via powershell (with admin rights):

Enable-WindowsOptionalFeature -Online -FeatureName Microsoft-Windows-Subsystem-Linux
@liuliangsir
liuliangsir / eslint-config.json
Created Apr 23, 2020
A configuration file for ESLint
View eslint-config.json
{
"parserOptions": {
"ecmaVersion": 8,
"ecmaFeatures": {}
},
"env": {
"es6": true,
"es2017": true,
"browser": true
},
@liuliangsir
liuliangsir / .gitlab-ci.yml
Created Apr 13, 2020 — forked from superjose/.gitlab-ci.yml
This is an example of a .gitlab-ci.yml that is required for Continuous Integration on GitLab projects.
View .gitlab-ci.yml
# Reference: https://www.exclamationlabs.com/blog/continuous-deployment-to-npm-using-gitlab-ci/
# GitLab uses docker in the background, so we need to specify the
# image versions. This is useful because we're freely to use
# multiple node versions to work with it. They come from the docker
# repo.
# Uses NodeJS V 9.4.0
image: node:9.4.0
# And to cache them as well.
@liuliangsir
liuliangsir / git-recover-branch.md
Created Jan 10, 2020 — forked from jbgo/git-recover-branch.md
How to recover a git branch you accidentally deleted
View git-recover-branch.md

UPDATE: A better way! (August 2015)

As pointed out by @johntyree in the comments, using git reflog is easier and more reliable. Thanks for the suggestion!

 $ git reflog
1ed7510 HEAD@{1}: checkout: moving from develop to 1ed7510
3970d09 HEAD@{2}: checkout: moving from b-fix-build to develop
1ed7510 HEAD@{3}: commit: got everything working the way I want
70b3696 HEAD@{4}: commit: upgrade rails, do some refactoring
@liuliangsir
liuliangsir / tmux.md
Created Dec 25, 2019 — forked from andreyvit/tmux.md
tmux cheatsheet
View tmux.md

tmux cheat sheet

(C-x means ctrl+x, M-x means alt+x)

Prefix key

The default prefix is C-b. If you (or your muscle memory) prefer C-a, you need to add this to ~/.tmux.conf:

# remap prefix to Control + a
View tmux-cheatsheet.markdown

tmux shortcuts & cheatsheet

start new:

tmux

start new with session name:

tmux new -s myname
@liuliangsir
liuliangsir / cloudSettings
Last active Nov 26, 2019 — forked from okunishinishi/Remove all git tags
Delete all git remote tags
View cloudSettings
{"lastUpload":"2019-11-26T07:42:01.191Z","extensionVersion":"v3.4.3"}
You can’t perform that action at this time.