Skip to content

Instantly share code, notes, and snippets.

Avatar

Zhenyu Song sunnyszy

View GitHub Profile
@sunnyszy
sunnyszy / toggle_keybindings.tmux.conf
Created Aug 18, 2020 — forked from samoshkin/toggle_keybindings.tmux.conf
tmux.conf excerpt to toggle on/off session keybindings and prefix handling
View toggle_keybindings.tmux.conf
bind -T root F12 \
set prefix None \;\
set key-table off \;\
set status-style "fg=$color_status_text,bg=$color_window_off_status_bg" \;\
set window-status-current-format "#[fg=$color_window_off_status_bg,bg=$color_window_off_status_current_bg]$separator_powerline_right#[default] #I:#W# #[fg=$color_window_off_status_current_bg,bg=$color_window_off_status_bg]$separator_powerline_right#[default]" \;\
set window-status-current-style "fg=$color_dark,bold,bg=$color_window_off_status_current_bg" \;\
if -F '#{pane_in_mode}' 'send-keys -X cancel' \;\
refresh-client -S \;\
bind -T off F12 \
@sunnyszy
sunnyszy / README-setup-tunnel-as-systemd-service.md
Last active Nov 16, 2018 — forked from drmalex07/README-setup-tunnel-as-systemd-service.md
Setup a secure (SSH) tunnel as a systemd service. #systemd #ssh #ssh-tunnel #ssh-forward
View README-setup-tunnel-as-systemd-service.md

README

Create a template service file at /etc/systemd/system/secure-tunnel@.service. The template parameter will correspond to the name of target host:

[Unit]
Description=Setup a secure tunnel to %I
After=network.target
@sunnyszy
sunnyszy / jupyter.service
Created Jul 5, 2018 — forked from r-darwish/jupyter.service
Jupyterlab as a systemd service
View jupyter.service
[Unit]
Description=Jupyter Notebook
[Service]
Type=simple
ExecStart=/home/roeyd/Notebook/.env/bin/jupyter lab --port 9090
WorkingDirectory=/home/roeyd/Notebook
[Install]
WantedBy=default.target
View local.automount.fat.plist
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>AbandonProcessGroup</key>
<true/>
<key>Label</key>
<string>local.automount.fat</string>
<key>StandardOutPath</key>
<string>/tmp/local.automount.fat.outlog</string>
View gist:0bb3f0a22308f2fbf20f9c3002c16b0a
Verifying that "zhenyus.id" is my Blockstack ID. https://explorer.blockstack.org/name/zhenyus.id
View gist:b3af77c1cfea9c0309ece6733411f7eb
Verifying my Blockstack ID is secured with the address 16W61fPqp14VpZKr9xg1AsivhcBnDmJ6hg https://explorer.blockstack.org/address/16W61fPqp14VpZKr9xg1AsivhcBnDmJ6hg
You can’t perform that action at this time.