Skip to content

Instantly share code, notes, and snippets.

View hstsethi's full-sized avatar
🏆
Achievements Speak Louder Than Words

Harshit Sethi hstsethi

🏆
Achievements Speak Louder Than Words
View GitHub Profile
@hstsethi
hstsethi / insertdate.lua
Created November 30, 2025 01:15
Micro editor plugin to insert current date in ISO861 format.
local buffer = import("micro/buffer")
local micro = import("micro")
local config = import("micro/config")
function init()
config.MakeCommand("insertDate", insertDate, config.NoComplete)
end
function insertDate(bp)
local buf = bp.Buf
@hstsethi
hstsethi / get_anonymized_initials.py
Created July 18, 2025 04:40
Python script to anonymize initials
import random
def genRandomInitial(input_initial: str) -> str:
while True:
rand_initial = chr(random.randint(65, 90))
if rand_initial not in (input_initial, "I"):
return rand_initial
@hstsethi
hstsethi / commentary.md
Last active June 7, 2025 14:20
Dialogues from a Nowhere, a 2007 J2ME game, with character names reverse engineered.

These dialogues are from a 2007 J2ME game Nowhere. They were extracted from a binary file within jar file simply named t.

There were no names, and it only started simply as "@[alphabet]" etc. I have manually replaced that with actual names. I discovered majority of them by searching the names, as many characters introduced themselves through that. For example,

@bI'm Sophia.

This tells us that all occurances of @B are of Sophia.

@a is shared by both Lucas, John, who also share the same sprite hence that is not modified. The modifications I made are as follows:

@hstsethi
hstsethi / termux-sos.sh
Created May 18, 2025 04:05
Shell script for SOS in Termux
for i in {1..3}; do
for j in {1..3}; do
termux-torch on
sleep 0.5
termux-torch off
sleep 0.5
done
sleep 1
done
@hstsethi
hstsethi / unprofitable-high-pe.md
Created May 6, 2025 12:19
Screen for finding unprofitable yet high PE companies

Unprofitable companies with less than 7% 1Y return, which is less than FD, which have PE higher than 20. Doesn't consider market cap.

Everyone screens for good or undervalued stocks, but nobody does the opposite, finding unprofitable yet high PE ratio stocks. It's purely for educational and curiosity purposes, the results might not be good investments.

Why do It?

  • Aids in industry wide analysis
  • Curiosity
  • Differentiate between undervalued and valueless stocks
@hstsethi
hstsethi / bajaj-sbi-fin-commentary.md
Last active May 5, 2025 03:16
My Financial commentary on Q4 2025 results of Bajaj Finance, SBI

Bajaj Finance

The recent Bajaj Twins crash must have left everyone in shambles.

Thankfully not to me. I have been avoiding Bajaj Fin. stock since 6 months due to his high pe ratio, debt.

@hstsethi
hstsethi / crop-sc-status-nav-bar.sh
Created December 19, 2024 04:38
Posix SH Script to bulk crop status and navigation bar from mobile screenshots using ImageMagick/GraphicsMagick
#!/bin/sh
## Date: 2023-05-13
## Author: HstSethi
## Usage: ./crop-sc-status-nav-bar.sh *.png # In my case mobile screenshots are in PNG rest in different
gm mogrify -gravity North -chop 0x50 -gravity South -chop 0x60 "$@"
@hstsethi
hstsethi / get-matrix-messages.sh
Created November 28, 2024 13:46
One Liner To Get Messages From A Matrix Chatroom
#!/bin/sh
# date: 2023-12-17
# author: HstSethi
curl -X GET "https://$client_url/_matrix/client/r0/rooms/$room_id/messages?dir=b&limit=50" -H "Authorization: Bearer $token"
# Replace dir b with f if you want to retrieve events from the start of that chat.
@hstsethi
hstsethi / Tor.md
Created May 30, 2023 02:48
is Tor safe? 26+ reasons(with citations) which proves that it isn't.

Security.

  1. Firefox (Even newer versions) has poor sandboxing capabilities. Even internet explorer have these features.

  2. JavaScript is enabled by default.

  3. Tor browser is based on an old version of Firefox(ESR). It has many known and unknown vulnerabilities.

  4. Most of the Tor exit nodes are hosted by government.