Skip to content

Instantly share code, notes, and snippets.

@sn0rk64
sn0rk64 / linux-create-user-ssh.md
Created February 21, 2022 20:40
Creating a new user with an SSH key on Linux

Creating a new user with an SSH key on Linux

First, create a new user with useradd:

sudo useradd -m -d /home/username -s /bin/bash username

Next, set the user’s password:

Output the file sizes in human-readable format.

ls -laSh /var/www/html

And to sort in reverse order, add the -r flag as follows.

ls -laShr /var/www/html
@sn0rk64
sn0rk64 / headless-chrome.sh
Created January 29, 2022 19:56
Install headless chrome on ubuntu
# Uninstall previous chrome
sudo apt-get purge chromium-browser
# Re-install the new stable chrome headless
sudo apt-get update
sudo apt-get install -y libappindicator1 fonts-liberation
wget https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb
sudo dpkg -i google-chrome*.deb
@sn0rk64
sn0rk64 / vscode-fast-coding
Last active August 4, 2019 15:42
vscode fast coding
Duplicate Lines
Shift + Option + Up Down Arrow Keys
Move line up or down
Alt / Option + Up Down Arrow Keys
Write on multiple lines (without mouse)
Shift + Option + Command + Up Down Arrow Keys
Write on multiple lines (with mouse)
@sn0rk64
sn0rk64 / debian9-packages.md
Last active June 27, 2019 17:07
debian installing handy packages

NGINX

Install nginx.

sudo apt-get install nginx

PHP 7.3

@sn0rk64
sn0rk64 / centos-ftp-access.md
Created May 14, 2019 11:24
How to configure centos ftp access

How to configure fpt access on centos 7

Run updates.

yum -y update

Install vsftpd.

yum -y update
@sn0rk64
sn0rk64 / centos-packages.md
Last active May 13, 2019 09:48
centos installing handy packages

NGINX

Create or edit file.

sudo vi /etc/yum.repos.d/nginx.repo

Append follow to the file.

[
{ "keys": ["j", "j"], "command": "exit_insert_mode",
"context":
[
{ "key": "setting.command_mode", "operand": false },
{ "key": "setting.is_widget", "operand": false }
]
}
]