Skip to content

Instantly share code, notes, and snippets.

Avatar
:octocat:
Developing for the python community!

Nitin Rai imneonizer

:octocat:
Developing for the python community!
View GitHub Profile
View ssh_cheatsheet.md

1. Automatic authentication to remote machine

Note:- with this you don't need to type password every time to do the ssh connection.

Step One—Create the RSA Key Pair (your machine)

ssh-keygen -t rsa

Step Two—Store the Keys and Passphrase (your machine)

@imneonizer
imneonizer / nmap.md
Created Jan 5, 2021
Useful Nmap commands
View nmap.md

Scan network for open ports and list their IP address

nmap -p 80 192.168.0.179/24 | grep -B 4 -i open | grep -i report
View install docker-compose on jetson.md

Install Docker Compose via Python PIP

These are all commands you need to install Docker Compose on a freshly installed NVIDIA Jetson.

# step 1, install Python PIP
$ sudo apt-get update -y
$ sudo apt-get install python3-pip

# step 2, install Docker Compose build dependencies for Ubuntu 18.04 on aarch64
$ sudo apt-get install -y libffi-dev libssl-dev python-openssl
@imneonizer
imneonizer / create-vod-hls.sh
Created Nov 25, 2020 — forked from maitrungduc1410/create-vod-hls.sh
Bash scripts to create VOD HLS stream with ffmpeg (Extended version)
View create-vod-hls.sh
#!/usr/bin/env bash
START_TIME=$SECONDS
set -e
echo "-----START GENERATING HLS STREAM-----"
# Usage create-vod-hls.sh SOURCE_FILE [OUTPUT_NAME]
[[ ! "${1}" ]] && echo "Usage: create-vod-hls.sh SOURCE_FILE [OUTPUT_NAME]" && exit 1
# comment/add lines here to control which renditions would be created
renditions=(
@imneonizer
imneonizer / install_nfs_client.sh
Created Nov 16, 2020
script for installing nfs server and client
View install_nfs_client.sh
#https://vitux.com/install-nfs-server-and-client-on-ubuntu/
#Step 1: Install NFS Common
sudo apt-get update -y
sudo apt-get install nfs-common -y
#Step 2: Create a mount point for the NFS host’s shared folder
#Your client’s system needs a directory where all the content shared by the host server in the export folder can be accessed.
#You can create this folder anywhere on your system. We are creating a mount folder in the mnt directory of our client’s machine.
CLIENT_NFS_DIR="/media/NFS"
View change_hostname.sh
# Check if sudo permission is available, else exit
if [ `id -u` != "0" ]
then
echo '[ERROR] please run with sudo'
exit
fi
# Retrieve new hostname from args
if [ -z "$1" ]
then
View mount_safely.sh
#!/bin/bash
mount_safely (){
PARTITION=$1; MOUNTPOINT=$2
if [ `whoami` == root ];then
# create mount point dir if doesn't exists
[ -d $MOUNTPOINT ] || mkdir -p $MOUNTPOINT
# mount the partition to mountpoint
mount $PARTITION $MOUNTPOINT
View open-vpn-alias.md

install OpenVPN-3 client for Ubuntu 18.04

sudo apt-get install apt-transport-https -y
wget https://swupdate.openvpn.net/repos/openvpn-repo-pkg-key.pub
sudo apt-key add openvpn-repo-pkg-key.pub

export DISTRO='bionic'
wget -O /etc/apt/sources.list.d/openvpn3.list https://swupdate.openvpn.net/community/openvpn3/repos/openvpn3-$DISTRO.list
sudo apt-get update -y
sudo apt-get install openvpn3 -y
@imneonizer
imneonizer / cv2_multi_line_texts.py
Last active Oct 16, 2020
how to write multi line texts with opencv
View cv2_multi_line_texts.py
import numpy as np
import cv2
import textwrap
img = np.zeros((500,500,3), dtype='uint8')
print(img.shape)
height, width, channel = img.shape
text_img = np.ones((height, width))
View clean_jetson.sh
# warning run every command one by one with precautions
# remove nvidia-docker
sudo apt-get purge -y docker-engine docker docker.io docker-ce -y
sudo apt-get autoremove -y --purge docker-engine docker docker.io docker-ce -y
## remove unsed programs
sudo apt-get remove --purge libreoffice* -y
sudo apt-get remove libreoffice-core -y
sudo apt-get remove snapd lightdm cups chromium* -y