Skip to content

Instantly share code, notes, and snippets.

View sreejithbnaick's full-sized avatar

Sreejith B Naick sreejithbnaick

  • HealthifyMe
  • Bangalore
View GitHub Profile
@sreejithbnaick
sreejithbnaick / check-axios-compromise.sh
Created April 2, 2026 16:33
Check axios compromise on your system or local workspace folders
#!/usr/bin/env bash
# =============================================================================
# check-axios-compromise.sh
# Detects systems/projects affected by the axios npm supply chain attack
# (axios@1.14.1 / axios@0.30.4 — published 2026-03-31, malicious versions
# injecting plain-crypto-js@4.2.1 which drops a cross-platform RAT)
#
# Reference: https://www.stepsecurity.io/blog/axios-compromised-on-npm-malicious-versions-drop-remote-access-trojan
#
# Usage:
@sreejithbnaick
sreejithbnaick / check_litellm_compromise.sh
Last active March 27, 2026 16:54
Shell script to check litellm 1.82.7/1.82.8 malware compromise on your machine
#!/usr/bin/env bash
# =============================================================================
# check_litellm_compromise.sh
# Detects compromised litellm versions (1.82.7 & 1.82.8) across:
# - System Python / pip / pyenv / conda / pipx / uv
# - Malware persistence artifacts (sysmon backdoor, litellm_init.pth)
# - [Optional] All venvs and PyPI modules under a given workspace directory
#
# Incident: TeamPCP supply-chain attack — March 24 2026
#
mysql> DROP DATABASE [dbName];
mysql> CREATE DATABASE [dbName];
mysql> USE [dbName];
mysql> SOURCE [pathToSQLDump];
@sreejithbnaick
sreejithbnaick / parallel-url-check.sh
Created July 25, 2021 13:52
Parallely check list of URLs are accessible using parallel and curl command
cat urls.txt | parallel 'x=`curl -I -s -o response.txt -w "%{http_code}" {}`; if [[ "$x" == "200" ]];then echo "{} OK";else echo "{} NOT OK";fi >> output.txt'
@sreejithbnaick
sreejithbnaick / git-fetch-shallow-clone
Created July 24, 2021 08:34
Fetch all remote branches after shallow clone
git clone <remote-url> --branch <branch-name> --depth 1
git config remote.origin.fetch
git config remote.origin.fetch "+refs/heads/*:refs/remotes/origin/*"
git remote update
git fetch --unshallow
or
git fetch --depth 10
@sreejithbnaick
sreejithbnaick / Google App script - Automatically add Today Date column to all sheets on sheet open. Also UI options for the same
Created July 28, 2018 08:26
Google App script - Automatically add Today Date column to all sheets on sheet open. Also UI options for the same
function onOpen() {
var ui = SpreadsheetApp.getUi();
checkAndAddTodayColumnForAllSheets();
ui.createMenu('Actions')
.addItem('Add Today Column - All sheets', 'checkAndAddTodayColumnForAllSheets')
.addItem('Delete Today Column - All sheets', 'deleteTodayColumnForAllSheets')
.addItem('Add Today Column', 'checkAndAddTodayColumnForActiveSheet')
.addItem('Delete Today Column', 'deleteTodayColumnForActiveSheet')
.addToUi();
}
@sreejithbnaick
sreejithbnaick / Default Ubuntu locales
Created February 5, 2018 11:29
Default Ubuntu locales
/var/lib/locales/supported.d/en
en_HK.UTF-8 UTF-8
en_DK.UTF-8 UTF-8
en_IN UTF-8
en_ZM UTF-8
en_ZW.UTF-8 UTF-8
en_NZ.UTF-8 UTF-8
en_PH.UTF-8 UTF-8
en_NG UTF-8
@sreejithbnaick
sreejithbnaick / gist:7f86bc43f9f3bd2a2a274f3e261997af
Last active February 5, 2018 11:13
Optmizing Laptop for Development
1. Optimizing SSD: https://haydenjames.io/increase-performance-lifespan-ssds-sd-cards/
2. If you have less RAM enable SWAP, else use tmpfs.
3. Save battery turning off all services using `systemctl` (from startup/init).
4. Use powertop command to find out which process taking power.
5. Use iotop -oPa to find disk usage.
@sreejithbnaick
sreejithbnaick / Disablling OneConf
Created February 5, 2018 11:05
Disablling OneConf
sudo chmod a-x /usr/share/oneconf/oneconf-service
sudo chmod a-x /usr/share/oneconf/oneconf-query
sudo chmod a-x /usr/share/oneconf/oneconf-update
@sreejithbnaick
sreejithbnaick / Kotlin Class With Annotation
Last active September 2, 2017 12:53
Kotlin Class With Annotation
@JsonIgnoreProperties(ignoreUnknown = true)
open class Comment {
var user: User? = null
var msg: String? = ""
var date: String? = null
var likeCount: Int = 0
var isDeleted: Boolean = false
var isReported: Boolean = false
constructor()