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 / mac_os_helpers.md
Created September 28, 2024 09:14
Mac OS stuffs

Python installation and version change:

Below command helps to check the path variable where python might be installed.

grep -H 'PATH=' ~/.zshrc ~/.bash_profile ~/.bashrc ~/.profile ~/.zprofile ~/.zlogin /etc/profile /etc/bashrc /etc/zshrc

MAC Setup

This was used to install node 14.19.1 using nvm install 14.19.1

arch -x86_64 zsh

@sirusdas
sirusdas / enterprise_token.rb
Created June 23, 2024 17:17 — forked from CC1119/enterprise_token.rb
OpenProject Enterprise mode for free
############ REPLACE app/models/enterprise_token.rb in the source code with this file! ################
############ also be sure to RESTART OpenProject after replacing the file. ################
############ it doesn't show that enterprise mode is enabled in the settings, but all ################
############ enterprise mode features, such as KanBan boards, are enabled. ################
#-- copyright
# OpenProject is an open source project management software.
# Copyright (C) 2012-2024 the OpenProject GmbH
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License version 3.
@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,