Skip to content

Instantly share code, notes, and snippets.

View imshaiknasir's full-sized avatar
🎯
Being consistent

imshaiknasir

🎯
Being consistent
View GitHub Profile

codes

@imshaiknasir
imshaiknasir / Cursor Ubuntu Desktop App.md
Created November 24, 2024 19:45
Cursor IDE AppImage with --no-sandbox flag

Running Cursor IDE AppImage with --no-sandbox flag

This Gist provides a solution for running the Cursor IDE AppImage on systems where sandboxing issues may occur.

Problem

Some Electron-based AppImages, like Cursor IDE, may encounter sandboxing errors, preventing them from launching correctly.

Solution

[
{
"id": 1,
"bank_name": "ABHYUDAYA CO-OPERATIVE BANK"
},
{
"id": 2,
"bank_name": "AIRTEL PAYMENTS BANK LIMITED"
},
{
@imshaiknasir
imshaiknasir / ConnectingToExistingChrome.md
Created September 27, 2024 12:15
Existing Chrome Session with Playwright

Existing Chrome Session with Playwright

Connecting to an Existing Chrome Session with Playwright: A Comprehensive Guide

In the ever-evolving world of web development, automation is a game-changer. Whether you're a developer, tester, or tech enthusiast, automating browser tasks can significantly enhance productivity. One powerful tool for browser automation is Playwright, a versatile framework that supports multiple browsers and languages. In this guide, we'll delve into how to connect to an existing Chrome session using Playwright and execute some basic tasks.

Step 1: Launch Chrome with Remote Debugging

To connect Playwright to a running Chrome session, you need to start Chrome with remote debugging enabled. This setup allows Playwright to communicate with the browser via a debugging port.

@imshaiknasir
imshaiknasir / Refactored-Calendar-Automation-with-Playwright.js
Created September 22, 2024 18:51
Playwright Test Script for Calendar Validation with Dynamic Year Navigation
const { test, expect } = require('@playwright/test');
test.only('Calendar Validations', async ({ browser, page }) => {
const date = "15";
const monthNumber = "6";
const year = "1690";
const currentYear = new Date().getFullYear();
await page.goto("https://rahulshettyacademy.com/seleniumPractise/#/offers");
await page.locator(".react-date-picker__inputGroup").click();
// ==UserScript==
// @name Twitter Translate Button
// @namespace http://tampermonkey.net/
// @version 0.1
// @description Add a translate button to tweets
// @match https://twitter.com/*
// @grant GM_xmlhttpRequest
// ==/UserScript==
(function() {
@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