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
# 1. 安装tpm: mkdir -p ~/.tmux/plugins && cd ~/.tmux/plugins && git clone https://github.com/tmux-plugins/tpm | |
# 2. 按 prefix + I(大写) 来安装插件 | |
# 3. 安装 vim-obsession, 用 vundle 安装或: cd ~/.vim/bundle && git clone git://github.com/tpope/vim-obsession.git --depth 1 && vim -u NONE -c "helptags vim-obsession/doc" -c q | |
##### 以上需手工执行 ##### | |
## 修改 tmux-prefix 键: ctrl+b --> ctrl+a | |
set -g prefix C-a | |
unbind C-b | |
bind a send-prefix | |
#set-option -g prefix2 ` |
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
#!/usr/bin/env node | |
// replace all UTC dates to local dates in pipe | |
// usage: docker logs -t container_name | docker-logs-localtime | |
// install: | |
// curl https://gist.githubusercontent.com/popstas/ffcf282492fd78389d1df2ab7f31052a/raw/505cdf97c6a1edbb10c3b2b64e1836e0627b87a0/docker-logs-localtime > /usr/local/bin/docker-logs-localtime && chmod +x /usr/local/bin/docker-logs-localtime | |
// alternative: https://github.com/HuangYingNing/docker-logs-localtime | |
const pad = d => (d > 9 ? d : '0' + d); |
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
# Install tmux 2.8 on Centos | |
# install deps | |
yum install gcc kernel-devel make ncurses-devel | |
# cd src | |
cd /usr/local/src | |
# DOWNLOAD SOURCES FOR LIBEVENT AND MAKE AND INSTALL | |
curl -LO https://github.com/libevent/libevent/releases/download/release-2.1.8-stable/libevent-2.1.8-stable.tar.gz |
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
from __future__ import absolute_import | |
from __future__ import print_function | |
import numpy as np | |
np.random.seed(1337) # for reproducibility | |
import random | |
from keras.datasets import mnist | |
from keras.models import Sequential | |
from keras.layers.core import * | |
from keras.optimizers import SGD, RMSprop |