Skip to content

Instantly share code, notes, and snippets.

View wkei's full-sized avatar
📷
"click"

Kei wkei

📷
"click"
View GitHub Profile
@wkei
wkei / gulpfile.js
Last active September 16, 2017 03:38
Base config for gulpfile #note
var gulp = require('gulp')
var sass = require('gulp-sass')
var concat = require('gulp-concat')
var uglify = require('gulp-uglify')
var cleanCss = require('gulp-clean-css')
var gutil = require('gulp-util')
var env = require('gulp-environments')
var htmlmin = require('gulp-htmlmin')
var connect = require('gulp-connect')
@wkei
wkei / .bash_profile
Last active October 15, 2018 03:43
bash
# Git branch in prompt.
parse_git_branch() {
git branch 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/ (\1)/'
}
export PS1="\W\[\033[32m\]\$(parse_git_branch)\[\033[00m\] $ "
# nvm
export NVM_DIR="$HOME/.nvm"
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" # This loads nvm
@wkei
wkei / .vimrc
Last active January 16, 2019 04:23
.vimrc
execute pathogen#infect()
set nocompatible
filetype off
filetype plugin indent on
" color
syntax on
set nu
@wkei
wkei / Things to do after installing macOS.md
Last active September 19, 2017 03:20
Things to do after installing macOS

Things to do after installing macOS

System Preferences:

  • Tap to click
  • Disable smart quotes
  • Use three finger to drag&drop
@wkei
wkei / Things to do after installing Ubuntu server.md
Last active August 23, 2024 08:24
Things to do after installing Ubuntu server

has to type javascript: manually... (

copy to pc browser's address bar

javascript:f=function(){x=window.innerWidth*Math.random();y=window.innerWidth*Math.random();$('canvas').trigger(jQuery.Event("mousedown",{clientX:x,clientY:y})).trigger(jQuery.Event("mouseup", {clientX:x,clientY:y}))};setInterval(f,1500*Math.random());setInterval(f,1500*Math.random())

copy to mobile browser's address bar (a little bit difficult...

@wkei
wkei / env
Last active January 26, 2018 10:25
Basic PM2 Configuration
export SERVER_USER=xxyy
export SERVER_IP=xxx.yyy.xxx.yyy
export PROJECT_PATH=/home/user/xxyy
export PORT=4321
@wkei
wkei / package.json
Created January 26, 2018 10:26
React SSR npm scripts
{
"scripts": {
"start": "node scripts/start.js",
"dev": "NODE_ENV=development SERVER_ENV=development nodemon --exec 'babel-node' server/index.js",
"pre": "npm install -g npm-run-all pm2",
"build:install": "npm install",
"build:client": "node scripts/build.js",
"build:server": "babel server -d build-server",
"build:serverassets": "NODE_ENV=production webpack --config ./config/webpack.server.assets.config.js",
"serve": "node build-server/index",

Find running puma

ps aux | grep puma

Find running port

lsof -i :3000
@wkei
wkei / fonts.md
Last active March 8, 2018 10:18
Safe Fonts

Sans-serif

-apple-system,		/* ios/mac */
BlinkMacSystemFont,	/* ios/mac */
"Segoe UI",			/* win */
Noto,					/* android */
Roboto,				/* android */
Oxygen-Sans,			/* linux */
Ubuntu,				/* linux */
Cantarell, /* linux */