Skip to content

Instantly share code, notes, and snippets.

View iRhonin's full-sized avatar
🌱

Arash Fatahzade iRhonin

🌱
  • Nobitex
View GitHub Profile
@iRhonin
iRhonin / ssh-proxy.service
Created January 5, 2019 07:11
Unit file for ssh proxy
[Unit]
Description=nl SSH proxy service
After=network-online.target
Wants=network-online.target
[Service]
ExecStart=/usr/bin/ssh -D 1234 -C -N -F %h/.ssh/config vps-nl -o ServerAliveInterval=1
ExecReload=/bin/kill -s HUP
ExecStop=/bin/kill -s TERM
Type=idle
@iRhonin
iRhonin / ssh-proxy.service
Created January 5, 2019 07:11
Unit file for ssh proxy
[Unit]
Description=nl SSH proxy service
After=network-online.target
Wants=network-online.target
[Service]
ExecStart=/usr/bin/ssh -D 1234 -C -N -F %h/.ssh/config vps-nl -o ServerAliveInterval=1
ExecReload=/bin/kill -s HUP
ExecStop=/bin/kill -s TERM
Type=idle
@iRhonin
iRhonin / cp.py
Created July 20, 2018 12:35
Tiny cp command with -r option in python 3.6
#! /usr/local/bin/python3.7
import sys
import argparse
from pathlib import Path
from os import path, makedirs
def read_file(file_path, chunksize=8192):
with open(file_path, mode='rb') as f:
@iRhonin
iRhonin / disable-caps.sh
Last active July 20, 2018 12:37
Disable Caps Lock key
dconf write /org/gnome/desktop/input-sources/xkb-options "['caps:escape']"