Skip to content

Instantly share code, notes, and snippets.

View Godsing's full-sized avatar

Godsing Godsing

View GitHub Profile
@Godsing
Godsing / .tmux.conf
Created May 19, 2021 08:27
Tmux 配置文件(保姆级注释,含部分插件)
# 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 `
@popstas
popstas / docker-logs-localtime
Last active November 14, 2024 06:03
docker-logs-localtime - Replace all UTC dates in docker logs output to local dates in pipe
#!/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);
@pokev25
pokev25 / install-tmux.sh
Last active September 21, 2024 13:46 — forked from rothgar/install-tmux
Install tmux 2.8 on centos 7
# 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
@mmmikael
mmmikael / mnist_siamese.py
Last active January 24, 2021 07:27
Keras example for siamese training on mnist
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