Skip to content

Instantly share code, notes, and snippets.

View sirusdas's full-sized avatar
😎
Think Interesting!!!

Suresh sirusdas

😎
Think Interesting!!!
View GitHub Profile
@sirusdas
sirusdas / firefoxScreeshot_readme.md
Created January 13, 2023 02:44
Enable Firefox Screenshot Option
  1. Enter "about:config" text into your address bar.
  2. Accept the Risk on your own
  3. Search for "extensions.screenshots.disabled" and change to false.
username: sshd
@sirusdas
sirusdas / useful_windows_terminal_powershell_commands.md
Last active June 15, 2020 04:56
Windows terminal lifesaver commands

How to verify if nginx is running or not?

tasklist /fi "imagename eq nginx.exe"

Check who is listening to a port?

netstat -aon | findstr '9123'

Check the last reboot?

@sirusdas
sirusdas / walk_gdrive.py
Created March 24, 2020 18:21 — forked from xflr6/walk_gdrive.py
Recursively traverse the directory tree of a Google Drive folder as variation of os.walk()
# walk_gdrive.py - os.walk variation with Google Drive API
import os
from apiclient.discovery import build # pip install google-api-python-client
FOLDER = 'application/vnd.google-apps.folder'
def get_credentials(scopes, secrets='~/client_secrets.json', storage='~/storage.json'):
from oauth2client import file, client, tools
@sirusdas
sirusdas / readMe.md
Last active December 5, 2019 06:18
Android Helpful Doc

App restore after dirty flash

Step-by-step guide

Disable any set-on-boot settings that could be problematic with a new ROM/Kernel (for instance Kernel settings, themes etc).

Backup your apps and data with your backup app (Titanium or the like). This is not strictly necessary as part of the procedure, but acts as a second backup, just in case.

Boot into your custom recovery and make a Nandroid backup of your entire phone. You should do this before every ROM update anyway, and it is especially important here, as you’re later going to restore the data partition from this backup.

> Now while in custom recovery, clean flash your new ROM update (factory reset/cache wipe first) - flash any kernel or Gapps as well.

@sirusdas
sirusdas / excelQueries.md
Created April 26, 2019 14:23
Excel Queries
  =CONCATENATE("insert into cityMaster(cityName,cityCode,stateId,zoneId,status) values('",A2,"','",B2,"','",D2,"','",E2,"',1);")
@sirusdas
sirusdas / sqlQueries.md
Last active April 27, 2019 05:53
Useful SQL queries

Query for LIKE IN together

SELECT *
FROM `pincodeMaster`
WHERE stateName REGEXP '^ANDAMAN|ASSAM|BIHAR|Chattisgarh|DADRA|DAMAN|DELHI|GOA|HIMACHAL PRADESH|JAMMU|JHARKHAND|MADHYA PRADESH|MEGHALAYA|MIZORAM|NAGALAND|PONDICHERRY|RAJASTHAN|SIKKIM|TRIPURA|WEST BENGAL|TAMILNADU|Andhra Pradesh|Kerala|Karnataka|Maharashtra|Gujarat|Haryana|Punjab|Uttar Pradesh|Uttarakhand|Orrisa|Andrapradesh|Telangana (.*)'
GROUP BY stateName 

Will search for all the states that matches similar to like and case-insensitive too.

First letter Capital and rest all small

@sirusdas
sirusdas / mongodb_quries.md
Created September 3, 2018 11:58
Mongo Db queries

Suppose you have a structure like

a: {
  b: [
    {
      c: 1,
      d: 2
    },
    {
      c: 3,
@sirusdas
sirusdas / readMe.md
Created August 5, 2018 15:21
Removed Kali from a Dual Boot with Windows

Procedure

Login to Kali Open Terminal with root access cd /boot/grub/ cp grub.cfg grub.bak.cfg vim grub.cfg Search for ###BEGIN Make sure Kali Linux is listed inside it. Don't delete Windows Data. Remove everthing from it until you reached ###END >type :w! to save the data and :q to quit the editor.

@sirusdas
sirusdas / Magento.md
Last active September 5, 2018 11:12
Magento Technical Doc

Re-index your code!

  php bin/magento indexer:reindex

When in trouble try this code

    rm -rf generated
    php bin/magento setup:upgrade
    php bin/magento setup:di:compile