Skip to content

Instantly share code, notes, and snippets.

View acrossoffwest's full-sized avatar
🎯
Focusing

Yurij Karpov acrossoffwest

🎯
Focusing
View GitHub Profile
@acrossoffwest
acrossoffwest / create-user-with-sudo.sh
Last active March 20, 2021 16:08 — forked from ivanrad/install-user-to-sudoersd.sh
Create user with sudoers (ALL NOPASSWD)
#!/bin/bash
[ $UID -eq 0 ] ||
{ echo "This script needs to be run with sudo -- \"sudo `basename $0`\"."; exit 1; }
SUDOERS_USERNAME=$1
[ -z $SUDOERS_USERNAME ] && { echo "error SUDO_USER env variable is not set."; exit 1; }
adduser $SUDOERS_USERNAME
@acrossoffwest
acrossoffwest / multiple_ssh_setting.md
Created March 5, 2018 07:24 — forked from jexchan/multiple_ssh_setting.md
Multiple SSH keys for different github accounts

Multiple SSH Keys settings for different github account

create different public key

create different ssh key according the article Mac Set-Up Git

$ ssh-keygen -t rsa -C "[email protected]"
@acrossoffwest
acrossoffwest / gist:853f50ccea541f5e4bc9c34108c1632a
Created October 13, 2016 04:14 — forked from sgergely/gist:3793166
Midnight Commander Keyboard Shortcuts for Mac OSX
----- Esc -----
Quick change directory: Esc + c
Quick change directory history: Esc + c and then Esc + h
Quick change directory previous entry: Esc + c and then Esc + p
Command line history: Esc + h
Command line previous command: Esc + p
View change: Esc + t (each time you do this shortcut a new directory view will appear)
Print current working directory in command line: Esc + a
Switch between background command line and MC: Ctrl + o
Search/Go to directory in active panel: Esc + s / Ctrl + s then start typing directory name