In Files Matching a Given Pattern.
Install Node >= v6 and replem.
/*** Dependencies ************************************************************/ | |
const Promise = require('bluebird'); | |
const jsEnv = Promise.promisify(require('jsdom').env); | |
/*** The Function ************************************************************/ | |
const getLinksByRank = (date, rank) => | |
jsEnv('http://www.pixiv.net/ranking.php?mode=daily&date=' + date) | |
.then(window => window.document.getElementById(rank).getElementsByClassName('work')[0].href) | |
.then(jsEnv) | |
.then(window => window.document.getElementsByClassName('_work')[0].getElementsByTagName('img')[0].src) |
In Files Matching a Given Pattern.
Install Node >= v6 and replem.
/* | |
HtmlAssetsPlugin | |
Require: fs-extra, glob | |
Usage: | |
In webpack.config.js, add this plugin. | |
new HtmlAssetsPlugin('glob/for/all/html/like/*.html') | |
In HTMLs, list all entries (including common if exists). Prefix '@' can be customed. | |
<script type="text/javascript" src="@commons"></script> |
doskey l=dir /Q | |
doskey ls=dir /W |
#!/bin/bash | |
#### Necessary Update ################### | |
sudo apt-get update | |
#### Oh My ZSH ########################## | |
sudo apt-get -y install zsh git-core | |
wget https://github.com/robbyrussell/oh-my-zsh/raw/master/tools/install.sh -O - | zsh | |
chsh -s `which zsh` |
local ret_status="%(?:%{$fg_bold[green]%}➜ :%{$fg_bold[red]%}➜ %s)" | |
local pwd="$fg_bold[cyan]%d$reset_color" | |
local signature="$fg_no_bold[green]$(print "$(whoami)@$(uname -n)")$reset_color" | |
local NEWLINE=$'\n' | |
PROMPT="${ret_status} $signature $pwd\$(git-radar --zsh --fetch 2>&1) $NEWLINE$ " |
# Common | |
alias c='clear' | |
alias rp='cd $(realpath .)' | |
alias clip='xclip -sel clip' | |
alias o='xdg-open' | |
mkd() { mkdir -p $1; cd $1 } | |
mvi() { mv $1 $2; vi $2 } | |
cpi() { cp $1 $2; vi $2 } |
Capslock::Ctrl | |
LCtrl::Capslock | |
; ----------------------- ----------------------- ----------------------- | |
; Chrome | |
; ----------------------- ----------------------- ----------------------- | |
; Switch between tabs | |
LAlt & ,::Send ^+{TAB} | |
LAlt & .::Send ^{TAB} |