Skip to content

Instantly share code, notes, and snippets.

View hitesh83's full-sized avatar

Hitesh hitesh83

  • Pune, India
View GitHub Profile
@hitesh83
hitesh83 / source.txt
Created July 31, 2023 06:30
Debian 11.7 source edit
sudo nano /etc/apt/sources.list
deb http://deb.debian.org/debian bullseye main contrib non-free
deb-src http://deb.debian.org/debian bullseye main contrib non-free
deb http://deb.debian.org/debian bullseye-updates main contrib non-free
deb-src http://deb.debian.org/debian bullseye-updates main contrib non-free
deb http://deb.debian.org/debian bullseye-backports main contrib non-free
deb-src http://deb.debian.org/debian bullseye-backports main contrib non-free
@hitesh83
hitesh83 / dog.sh
Last active August 9, 2022 06:24 — forked from murilopontes/dog.sh
Openwrt watchdog script
#!/bin/sh
# save dog.sh in /root/dog.sh.
# You can use winscp with scp protocol to do this.
# Using ssh set executation permission and replace the crontab:
# chmod +x /root/dog.sh
# echo "* * * * * /root/dog.sh" | crontab -
# fix wpad / wpad-mini / hostapd stop working bug
logread -l 100 | grep -n "IEEE 802.11: did not acknowledge authentication response"
@hitesh83
hitesh83 / rate.py
Created December 30, 2021 20:30
NSE rate udpate in python3
GNU nano 4.8 rate.py
# importing nse from nse tools
from nsetools import Nse
# creating a Nse object
nse = Nse()
stock = input("Enter Your Stock short code here ")
# getting quote of the sbin
quote = nse.get_quote(stock)
#t2 = stock
@hitesh83
hitesh83 / pisignage_server_setup.sh
Created October 8, 2020 13:28
pisignage.com server install
#!/bin/bash
echo "Reloading local package database."
sudo apt update
echo "install gnupg for GnuPG key"
sudo apt-get install gnupg
echo "Adding mongo 4.4 pgp key"
wget -qO - https://www.mongodb.org/static/pgp/server-4.4.asc | sudo apt-key add -
echo "getting mongodb-org 4.4 repo"
echo "deb [ arch=amd64,arm64 ] https://repo.mongodb.org/apt/ubuntu focal/mongodb-org/4.4 multiverse" | sudo tee /etc/apt/sources.list.d/mongodb-org-4.4.list
echo "Adding NoteJs 14 Repo in package database"
@hitesh83
hitesh83 / wget-exit-codes.txt
Created September 26, 2018 08:10
wget exit codes
This is the list of exit codes for wget:
0 No problems occurred
1 Generic error code
2 Parse error — for instance, when parsing command-line options, the .wgetrc or .netrc…
3 File I/O error
4 Network failure
5 SSL verification failure
6 Username/password authentication failure
7 Protocol errors
@hitesh83
hitesh83 / FTP.sh
Created April 1, 2018 08:54
FTP mirror local to remote FTP
Finally got the answer!!! Create shell script ftpmirror.sh
#!/bin/bash
path = /local-dir-path
lftp -e "mirror -R $path /$path" -u username,password ftp-server-ip
Path = local directory which we want to copy into ftp server
username = ftp server user name
password = ftp server password
ftp-server-ip = IP address of ftp server
If lftp package is not installed the installed it using yum.
@hitesh83
hitesh83 / php5.6
Created August 3, 2017 10:32
PHP 5.6 on Ubuntu 16
sudo apt-get purge `dpkg -l | grep php| awk '{print $2}' |tr "\n" " "`
sudo add-apt-repository ppa:ondrej/php
sudo apt-get install software-properties-common
sudo apt-get update
sudo apt-get install php5.6
sudo apt-get install php5.6-mbstring php5.6-mcrypt php5.6-mysql php5.6-xml php5.6-cli
@hitesh83
hitesh83 / mongodb c2.txt
Created August 1, 2017 10:41
MongoDB 3.4 on Odroid C2 (ARM64)
sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv 0C49F3730359A14518585931BC711F9BA15703C6
echo "deb [ arch=amd64,arm64 ] http://repo.mongodb.org/apt/ubuntu xenial/mongodb-org/3.4 multiverse" | sudo tee /etc/apt/sources.list.d/mongodb-org-3.4.list
sudo apt-get update
sudo apt-get install -y mongodb-org
@hitesh83
hitesh83 / odroid.sh
Created June 12, 2017 11:45
Odroid info
***set time zone
sudo dpkg-reconfigure tzdata
** update software
sudo apt update && sudo apt upgrade -y
sudo apt install linux-image-c2 -y
and change from <Yes> to <No> in the upcoming dialogue:
*** install mail utils
sudo apt-get install mailutils ssmtp -y && sudo apt-get install dnsutils -y && sudo apt-get install libpng12-dev -y && sudo apt-get install mutt
*** config smtp servers
@hitesh83
hitesh83 / rpi_blank_screen.txt
Created June 12, 2017 10:18
How to Disable the Blank Screen on Raspberry Pi (Raspbian)
1 – Disabling the blank screen once
You can disable the blank screen once with the following command line instructions:
$ sudo xset s off
$ sudo xset -dpms
$ sudo xset s noblank
xset s off disable the screen saver, xset -dpms disables the DPMS (Display Power Management Signaling) and xset s noblank tells to X server to not blank the video device.
2 – Disabling the blank screen forever