Skip to content

Instantly share code, notes, and snippets.

View adamshen's full-sized avatar
👻
haha

adam adamshen

👻
haha
  • vanecloud
  • shanghai
View GitHub Profile
@adamshen
adamshen / mac-commands.md
Last active April 17, 2017 05:47
command

route

route -n add -net 192.168.20.0/24 10.0.0.1
route -n delete x.x.x.x/24 x.x.x.x

kill process by port

@adamshen
adamshen / tmux.md
Created April 7, 2017 05:09 — forked from leommoore/tmux.md
tmux

tmux shortcuts & cheatsheet

start new:

tmux

start new with session name:

tmux new -s myname
docker build -t friendlyname . # Create image using this directory's Dockerfile
docker run -p 4000:80 friendlyname # Run "friendlyname" mapping port 4000 to 80
docker run -d -p 4000:80 friendlyname # Same thing, but in detached mode
docker ps # See a list of all running containers
docker stop <hash> # Gracefully stop the specified container
docker ps -a # See a list of all containers, even the ones not running
docker kill <hash> # Force shutdown of the specified container
docker rm <hash> # Remove the specified container from this machine
docker rm $(docker ps -a -q) # Remove all containers from this machine
docker images -a # Show all images on this machine
@adamshen
adamshen / vue-cli使用方法
Created June 12, 2017 01:56 — forked from wmui/vue-cli使用方法
vue-cli使用方法
###vue-cli使用方法
1. npm install vue-cli -g 安装vue-cli的环境
1.1 vue --verson 查看脚手架版本
2. vue init webpack vue-demo
2.1 vue init webpack-simple vue-webpack-simple-demo简单版的webpack
3. 进入生成目录执行npm install
4. npm run dev启动
5. npm run build 打包
@adamshen
adamshen / vue-cli使用方法
Created June 12, 2017 01:56 — forked from wmui/vue-cli使用方法
vue-cli使用方法
###vue-cli使用方法
1. npm install vue-cli -g 安装vue-cli的环境
1.1 vue --verson 查看脚手架版本
2. vue init webpack vue-demo
2.1 vue init webpack-simple vue-webpack-simple-demo简单版的webpack
3. 进入生成目录执行npm install
4. npm run dev启动
5. npm run build 打包
@adamshen
adamshen / command
Last active June 22, 2018 02:56
mysql-commands
DROP DATABASE IF EXISTS db
mysql -u user --password=password
mysql -u [username] -p [dbname] -e [query]
mysqldump --add-drop-database --databases db -u user -p > filename.sql
mysql -u user -p < filename.sql