Skip to content

Instantly share code, notes, and snippets.

View imshaiknasir's full-sized avatar
🎯
Being consistent

imshaiknasir

🎯
Being consistent
View GitHub Profile
@imshaiknasir
imshaiknasir / README.md
Last active October 25, 2023 18:36
this script is a simple and effective way to block ads on a Linux system

Script to auto-update and block ads on a Linux system

HOW TO AUTORUN THIS SCRIPT ON SYSTEM LOGIN.

  • Create a script file nano autoUpdateHostsOnSystemRestart.sh and save it in your desired directory. (Here, I've saved it in my /home/user directory)

  • Paste the below script content in the file.

  • Remember to make your script executable using the command chmod +x autoUpdateHostsOnSystemRestart.sh. Then you can run your script with ./autoUpdateHostsOnSystemRestart.sh.

  • Create a new service file in /etc/systemd/system/ with a .service extension, for example myscript.service. You can use sudo nano /etc/systemd/system/updateHosts.service to open a new file in the nano text editor.

@imshaiknasir
imshaiknasir / README.md
Last active October 25, 2023 18:34
Script and setup procedure to move mouse cursor every minute.

Script and setup procedure to move mouse cursor every minute.

1. Setting up the script.

Prerequisite: xdotool

To install xdotool : sudo apt-get install xdotool

Create a script file nano moveCustor.sh and save it in your desired directory. (Here, I've saved it in my /home/user directory)

#!/bin/bash
# Stop the mongod process
sudo systemctl stop mongod
# Remove any MongoDB packages that you had previously installed.
sudo apt-get purge mongodb*
# Remove MongoDB databases and log files.
sudo rm -r /var/log/mongodb
@imshaiknasir
imshaiknasir / toMongo6-(ubuntu 20.04).sh
Last active August 2, 2022 10:23
Install Mongo 6.0, Upgrade to Mongo 6.0, Mongo, MongoDB, Compass, mongodb, mongo, mongod.
#!/bin/bash
# Stop the mongod process
sudo systemctl stop mongod
# Remove any MongoDB packages that you had previously installed.
sudo apt-get purge mongodb*
# Remove MongoDB databases and log files.
sudo rm -r /var/log/mongodb
// XPath CheatSheet
// To test XPath in your Chrome Debugger: $x('/html/body')
// http://www.jittuu.com/2012/2/14/Testing-XPath-In-Chrome/
// 0. XPath Examples.
// More: http://xpath.alephzarro.com/content/cheatsheet.html
'//hr[@class="edge" and position()=1]' // every first hr of 'edge' class

Downloading Videos from Pluralsight

Disclaimer

Pluralsight do not permit users to download their videos.
If you are an user of pluralsight you have agreed with their ToS,
and are thusly refrained from doing so.
Use this knowledge at your own risk.

youtube-dl for Windows

@imshaiknasir
imshaiknasir / Procfile
Last active December 25, 2020 20:35
Bot to check PUBGm version from "uptodown" site. Deploy on Heroku. #puppeteer #pubgm #pubg #heroku
worker: node index.js

😍 The beginners note for OSINT 📚


The number of OSINT tools and services is constantly growing (image via osintframework.com)

Definition:
(intentionally left blank)

// This file was initially generated by Windows Terminal 1.0.1401.0
// It should still be usable in newer versions, but newer versions might have additional
// settings, help text, or changes that you will not see unless you clear this file
// and let us generate a new one for you.
// To view the default settings, hold "alt" while clicking on the "Settings" button.
// For documentation on these settings, see: https://aka.ms/terminal-documentation
{
"$schema": "https://aka.ms/terminal-profiles-schema",
@imshaiknasir
imshaiknasir / Sign an Apk file.md
Last active June 30, 2022 19:30
How to Sign an APK

Create a key using

keytool -genkey -v -keystore whateverName.keystore -alias alias_name -keyalg RSA -keysize 2048 -validity 10000

Sign the apk

jarsigner -verbose -sigalg SHA1withRSA -digestalg SHA1 -keystore whateverName.keystore my_application.apk alias_name