Skip to content

Instantly share code, notes, and snippets.

View pagpires's full-sized avatar

pagpires

  • US
View GitHub Profile
#!/bin/sh
# Attach or create tmux session named the same as current directory.
path_name="$(basename "$PWD" | tr . -)"
session_name=${1-$path_name}
not_in_tmux() {
[ -z "$TMUX" ]
}
@pagpires
pagpires / tmux_conf
Last active June 16, 2023 07:25
tmux configuration
unbind C-b
set -g prefix C-s
bind-key r source-file ~/.tmux.conf \; display-message "~/.tmux.conf reloaded"
# set default terminal model to 256 color mode
set -g default-terminal "screen-256color"
bind-key -n C-h select-pane -L
@pagpires
pagpires / terminal_proxy.txt
Last active April 30, 2023 19:11
terminal proxy
client_up(){
gost -L socks5://:1080 -F 'https://USER:PASS@DOMAIN:PORT'
}
SOCKS="socks5://127.0.0.1:1080"
alias proxy_on="export http_proxy=${SOCKS} https_proxy=${SOCKS} all_proxy=${SOCKS}"
alias proxy_off='unset all_proxy http_proxy https_proxy'