Skip to content

Instantly share code, notes, and snippets.

View bryanseah234's full-sized avatar
🍤
hello@hong-yi.me

b bryanseah234

🍤
hello@hong-yi.me
View GitHub Profile
@bryanseah234
bryanseah234 / validatenric.py
Created December 23, 2025 00:15
validate-nric-code (code to validate singapore nrics checksum)
def NRIC_code(NRIC_no_code):
weight = (2,7,6,5,4,3,2) #()this is tuple and cannot be modified
alpha_singaporean = ('J','Z','I','H','G','F','E','D','C','B','A')
alpha_foreigner= ('X','W','U','T','R','Q','P','N','M','L','K')
total_sum = 0
for i in range (len(weight)):
current_product = weight[i] * int(NRIC_no_code[i+1])
total_sum += current_product
@bryanseah234
bryanseah234 / sortchannels.py
Created December 16, 2025 00:05
youtube-channels-code (code to sort your subscription by subscribers)
import json
import re
# you need to find the script nonce that contains channel ID, then copy and save the whole element into "youtube js.txt"
def parse_subscriber_count(count_text):
"""
Parses strings like '1.05M subscribers' or '45K subscribers' into integers.
"""
if not count_text:
@bryanseah234
bryanseah234 / findtext.py
Created December 15, 2025 15:42
find-text-code (code to find text in images)
import pytesseract
import os
import sys
pytesseract.pytesseract.tesseract_cmd = r'C:\Program Files\Tesseract-OCR\tesseract'
directory =input('Where to find text from?\n')
@bryanseah234
bryanseah234 / setnotifications.js
Last active December 16, 2025 00:06
youtube-notifications-code (code to set all notifications to none)
/**
* Automate setting YouTube Subscription Notifications to "None"
* TARGETS:
* Button: ytd-subscription-notification-toggle-button-renderer-next
* Menu Item: ytd-menu-service-item-renderer containing "None"
*/
(async function setNotificationsToNone() {
console.log("--- STARTING FINAL SCRIPT ---");
@bryanseah234
bryanseah234 / sendemail.py
Last active December 15, 2025 15:40
email-client-code (code to send an email using SMTP from Gmail)
import os
import datetime
from datetime import datetime
import smtplib, ssl
from email import encoders
from email.mime.text import MIMEText
from email.mime.base import MIMEBase
from email.mime.multipart import MIMEMultipart
try:
@bryanseah234
bryanseah234 / dinohack.js
Last active December 15, 2025 15:40
chrome-dino-hack (code to auto run chrome dinosaur game)
/// to start:
var original = Runner.prototype.gameOver
Runner.prototype.gameOver = function(){}
/// to stop:
Runner.prototype.gameOver = original
/// to set speed:
Runner.instance_.setSpeed(1000)
@bryanseah234
bryanseah234 / bruteforce.py
Created October 26, 2021 08:44
attack-password-code (code to crack passwords for zip files)
import zipfile
charlist = 'abcdefghijklmnopqrstuvwxyz0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ' #ALPHANUMERICAL ONLY (CAN ADD MORE)
complete = []
for current in range(4): #MAX PASSWORD LENGTH = 4
a = [i for i in charlist]
for x in range(current):
a = [y + i for i in charlist for y in a]
complete = complete + a