Skip to content

Instantly share code, notes, and snippets.

View WillieYang's full-sized avatar
🎧
Focusing

Willie Yang WillieYang

🎧
Focusing
View GitHub Profile
@WillieYang
WillieYang / .eslintrc
Created June 14, 2019 03:40
ESLint Rules Updated
{
"env": {
"browser": true,
"es6": true
},
"globals": {
"_": true
},
"parser": "babel-eslint",
"extends": [
@WillieYang
WillieYang / gulpfile.js
Created March 14, 2019 08:53
Using gulp to execute different tasks
// gulpfile.js
let path = require('path')
let gulp = require('gulp')
let cleanCSS = require('gulp-clean-css')
let cssWrap = require('gulp-css-wrap')
let replace = require('gulp-replace');
let cn = require('./i18n/src/cn');
gulp.task('css-wrap', function () {
return gulp.src(path.resolve('./theme/default/index.css'))
@WillieYang
WillieYang / conf.md
Created February 7, 2018 07:41
How to integrate "bootstrap-vue" to "vue-cli webpack template"
@WillieYang
WillieYang / conf.md
Last active November 30, 2017 09:21
How to kill a port on linux?
fuser -n tcp -k <port number>
@WillieYang
WillieYang / configure.md
Created November 12, 2017 11:15
Template for using MD file syntax

Userful Links

https://gist.github.com/PurpleBooth/109311bb0361f32d87a2
@WillieYang
WillieYang / configure.md
Last active November 12, 2017 11:18
How to hide the virtual navigation of Google Pixel.

Configuration

Both Navigation and Status

adb shell settings put global policy_control immersive.full=*

Only Navigation

adb shell settings put global policy_control immersive.navigation=*
@WillieYang
WillieYang / configure.md
Created November 3, 2017 14:58
How to use brevent in Android devices
  • How to use it?
  1. Open the terminal from the adb tool directory.
  2. Input .\adb devices command to check whether the decice is connected.
  3. Input .\adb -d shell sh /data/data/me.piebridge.brevent/brevent.sh to authorize the brevent.
@WillieYang
WillieYang / use.js
Created October 10, 2017 15:12
Whether it is necessary to use a web server when loading the external file (CSS, JavaScript)
// It is available for user to load external file when lacking a web server.
// By using a command line: allow-file-access-from-files
@WillieYang
WillieYang / use.js
Last active September 16, 2017 09:32
How to use virtualenv as a portable environment for python
// 1. Create a env:
virtualenv [Directory Name for placing the new virtal environment]
// 2. Activate the env:
source bin/activate
// 3. Deactivate:
deactivate
// 4. Check the package use of environment:
@WillieYang
WillieYang / setup.js
Last active September 26, 2017 12:12
How to ssh login to the instance from GCP VM
// 1. Create a ssh key file with private and public key:
ssh-keygen -t rsa -f ~/.ssh/[key_value name] -C [username]
// 2. Restrict access to the private key so that only myself can read it and nobody can write to it:
chmod 400 ~/.ssh/ssh-vm-key
// 3. Add the public key to the instance metadata
// 4. Remote login to the linux server using ssh:
ssh -i ~/.ssh/[key_value_name] [username]@[external address]