# 使用 Homebrew 安装 aria2
brew install aria2
# 创建配置文件aria2.conf和空对话文件aria2.session
mkdir ~/.aria2 && cd ~/.aria2
touch aria2.conf
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
:set background=dark | |
:set t_Co=256 | |
" :set number | |
:set relativenumber | |
:set rnu | |
" default tab settings | |
:set expandtab | |
:set shiftwidth=4 | |
:set tabstop=4 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# ========================================================== | |
# NPM | |
# ========================================================== | |
npm set registry https://registry.npmmirror.com # 注册模块镜像 | |
npm set disturl https://npmmirror.com/mirrors/node # node-gyp 编译依赖的 node 源码镜像 | |
## 以下选择添加 | |
npm set sass_binary_site https://registry.npmmirror.com/mirrors/node-sass # node-sass 二进制包镜像 | |
npm set electron_mirror https://registry.npmmirror.com/mirrors/electron/ # electron 二进制包镜像 |
This is a simple utility script for cleaning up Firebase Hosting versions, leaving a specified number of versions remaining. This is primarily done to conserve storage usage, but may have other uses.
USE AT YOUR OWN RISK. NO WARRANTY IS PROVIDED. THIS SCRIPT DOES DELETE STUFF PERMANENTLY
node cleanupVersions.js [commit]
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# save as /root/del_user.sh | |
USERNAME=$1 | |
if [[ -z "$USERNAME" ]]; then | |
echo "Please give me a username" | |
exit 1 | |
fi | |
echo "This script will" |
With this wiki2html.sh bash script and pandoc program, you can convert markdown to html.
Usage: In the vim list section of the .vimrcfile, include options:
let g:vimwiki_list = [{'path': ‘your_wiki_place',
\ 'path_html': ‘wiki_html_location’,
\ 'syntax': 'markdown',
\ 'ext': '.md',
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# tmux requires unrecognized OSC sequences to be wrapped with DCS tmux; | |
# <sequence> ST, and for all ESCs in <sequence> to be replaced with ESC ESC. It | |
# only accepts ESC backslash for ST. | |
function print_osc() { | |
if [[ -n $TERM ]] ; then | |
printf "\033Ptmux;\033\033]" | |
else | |
printf "\033]" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* Refrences: | |
1. http://notes.iissnan.com/2016/publishing-github-pages-with-travis-ci | |
2. https://github.com/chrisjlee/hexo-theme-zurb-foundation/blob/e82f45a82bbaaee063bcb1298cd9793575afb142/gulpfile.js | |
3. https://github.com/gulpjs/gulp/blob/master/docs/recipes/delete-files-folder.md | |
4. https://hexo.io/api/ | |
5. https://github.com/iissnan/theme-next-docs/blob/master/.travis.yml | |
*/ | |
var gulp = require('gulp'); | |
var minifycss = require('gulp-clean-css'); |
NewerOlder