Skip to content

Instantly share code, notes, and snippets.

View imneonizer's full-sized avatar
:octocat:
Developing for the python community!

Nitin Rai imneonizer

:octocat:
Developing for the python community!
  • SmartCow.ai
  • Delhi, India
  • 18:22 (UTC +05:30)
  • X @imneonizer
View GitHub Profile
@imneonizer
imneonizer / nmap.md
Created January 5, 2021 09:38
Useful Nmap commands

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
@imneonizer
imneonizer / create-vod-hls.sh
Created November 25, 2020 09:44 — forked from maitrungduc1410/create-vod-hls.sh
Bash scripts to create VOD HLS stream with ffmpeg (Extended version)
#!/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 November 16, 2020 10:37
script for installing nfs server and client
#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"
#!/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

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
# 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
# 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

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

1. Stop the docker daemon

sudo service docker stop

2. Add a configuration file to tell the docker daemon what is the location of the data directory Using your preferred text editor add a file named daemon.json under the directory /etc/docker.

sudo vim /etc/docker/daemon.json

Block people from accessing internet on your network

Install below package

sudo apt-get install dsniff

Find your interface and router's IP address using ifconfig command
if you are on wifi it is usualy wlan0 and for ethernet eth0. Find the IP address of the device you wish to block internet for and fill in place of CHILD_ADRS below.
Do the same for ROUTER_ADRS.