Skip to content

Instantly share code, notes, and snippets.

@imzhi
imzhi / .tmux.conf
Last active March 26, 2021 01:34
新的.tmux.conf(精简)
# List of plugins
set -g @plugin 'tmux-plugins/tpm'
set -g @plugin 'tmux-plugins/tmux-sensible'
set -g @plugin 'tmux-plugins/tmux-sidebar'
set -g @plugin 'tmux-plugins/tmux-net-speed'
set -g @plugin 'tmux-plugins/tmux-prefix-highlight'
set -g @plugin 'tmux-plugins/tmux-pain-control'
set -g @plugin 'tmux-plugins/tmux-cpu'
set -g @plugin 'tmux-plugins/tmux-resurrect'
set -g @plugin 'tmux-plugins/tmux-continuum'
@imzhi
imzhi / .tmux.conf
Last active December 9, 2020 08:42
公司机器上的tmux配置
run-shell /home/yxz/.tmux/tmux-resurrect/resurrect.tmux
set -g @resurrect-capture-pane-contents 'on' # 开启恢复面板内容功能
set -g @resurrect-dir '/home/yxz/.tmux/resurrect-dir'
#set -g @resurrect-save-shell-history 'on'
run-shell /home/yxz/.tmux/tmux-continuum/continuum.tmux
set -g @continuum-restore 'on'
#set -g @continuum-boot 'on'
# use C-a, since it's on the home row and easier to hit than C-b
@imzhi
imzhi / CryptoJS-Laravel-6-decrypt.js
Created June 5, 2020 06:49
CryptoJS 实现 Laravel 6.x decrypt 方法
/**
* CryptoJS 实现 Laravel 6.x decrypt 方法
*
* @param encryptStr 加密返回的内容
* @param appKey .env中的APP_KEY
*/
var laravelDecrypt = function(encryptStr, appKey) {
var parseBase64 = CryptoJS.enc.Base64.parse(encryptStr);
var decoded = parseBase64.toString(CryptoJS.enc.Utf8);
# use C-a, since it's on the home row and easier to hit than C-b
set-option -g prefix C-a
unbind-key C-a
bind-key C-a send-prefix
set -g base-index 1
# vi is good
setw -g mode-keys vi
set-option -g default-terminal screen-256color
@imzhi
imzhi / .tmux.conf
Created May 23, 2020 02:19 — forked from tsl0922/.tmux.conf
vim style tmux config
# vim style tmux config
# use C-a, since it's on the home row and easier to hit than C-b
set-option -g prefix C-a
unbind-key C-a
bind-key C-a send-prefix
set -g base-index 1
# Easy config reload
bind-key R source-file ~/.tmux.conf \; display-message "tmux.conf reloaded."
@imzhi
imzhi / php-webdriver-douban.php
Last active August 28, 2021 07:24
抓取豆瓣电影中韩国的最新的120条名称与LOGO
<?php
require 'vendor/autoload.php';
use Facebook\WebDriver\WebDriverBy;
use Facebook\WebDriver\WebDriverPlatform;
use Facebook\WebDriver\Chrome\ChromeOptions;
use Facebook\WebDriver\Remote\RemoteWebDriver;
use Facebook\WebDriver\Remote\DesiredCapabilities;
use Facebook\WebDriver\WebDriverExpectedCondition;
@imzhi
imzhi / ssh_config
Created March 28, 2020 07:32 — forked from rbenaley/ssh_config
GitHub ssh access via HTTP Proxy
host github.com
user git
hostname ssh.github.com
port 443
proxycommand socat - PROXY:<hostname>:%h:%p,proxyport=<port>

点击()

@imzhi
imzhi / LogsLogin.php
Last active November 19, 2019 07:23
laravel 数据填充器例子,下面代码中加了些注释
<?php
use Faker\Generator as Faker;
// start 和 end 请设置为相同月份的起止时间,并相应修改 App\Models\LogsLogin 的 $table 属性
$start = strtotime('2019-10-01 00:00:00');
$end = strtotime('2019-10-31 23:59:59');
// $start = strtotime('2019-11-01 00:00:00');
// $end = strtotime('2019-11-07 23:59:59');