Skip to content

Instantly share code, notes, and snippets.

@Tapanhaz
Tapanhaz / _deobfuscating-unminifying-obfuscated-web-app-code.md
Created April 21, 2026 16:27 — forked from 0xdevalias/_deobfuscating-unminifying-obfuscated-web-app-code.md
Some notes and tools for reverse engineering / deobfuscating / unminifying obfuscated web app code
@Tapanhaz
Tapanhaz / testws.py
Last active April 6, 2026 19:07
Shoonya ws
from NorenApi import NorenApi
from time import sleep
import logging
import sys
logging.basicConfig(level=logging.DEBUG)
user_id = ""
@Tapanhaz
Tapanhaz / benchmark.py
Last active March 27, 2025 09:23
Compare if-else, match-case, dict lookup
import timeit
import random
def if_elif_else_lookup(n):
if n == 0:
return "zero"
elif n == 1:
return "one"
elif n == 2:
return "two"

Ingredients

  • 250g lentils
  • 1 oinion
  • 3 garlic cloves
  • 1 fat tomatoe
  • 3 tbsp. olive oil
  • 1 tsp. of tomatoe paste
  • 1.5 tsp. of poudered cumin
  • 1 tsp. of poudered curcuma (or turmeric)
@Tapanhaz
Tapanhaz / usleep.c
Created March 9, 2025 20:51 — forked from ngryman/usleep.c
usleep for Windows.
void usleep(DWORD waitTime){
LARGE_INTEGER perfCnt, start, now;
QueryPerformanceFrequency(&perfCnt);
QueryPerformanceCounter(&start);
do {
QueryPerformanceCounter((LARGE_INTEGER*) &now);
} while ((now.QuadPart - start.QuadPart) / float(perfCnt.QuadPart) * 1000 * 1000 < waitTime);
}
@Tapanhaz
Tapanhaz / pthreads_cython.pyx
Last active February 26, 2025 05:08 — forked from jerryvig/pthreads_cython.pyx
Basic demonstration of how to use pthreads (POSIX threads) in Cython.
from cython.operator cimport dereference
from posix.unistd cimport usleep
from libc.stdio cimport printf
from libc.stdint cimport intptr_t
cdef extern from "pthread.h" nogil:
ctypedef int pthread_t
ctypedef struct pthread_attr_t:
pass
cdef int pthread_create(pthread_t *thread, pthread_attr_t *attr, void *(*start_routine) (void *), void *arg)
# https://www.quantopian.com/posts/technical-analysis-indicators-without-talib-code
import numpy
import pandas as pd
import math as m
#Moving Average
def MA(df, n):
MA = pd.Series(pd.rolling_mean(df['Close'], n), name = 'MA_' + str(n))
df = df.join(MA)
@Tapanhaz
Tapanhaz / oracle-cloud-free-tier-guide.md
Created December 31, 2024 06:54 — forked from rssnyder/oracle-cloud-free-tier-guide.md
oracle-cloud-free-tier-guide

how to leverage oracle's temping offers

free tier limits

The limits of the free tier say that you can create up to 4 instances.

  • x2 x86 instances (2core/1g)
  • x2 ampere instances (with 4core/24g spread between them)
  • 200GB total boot volume space across all intances (minimum of 50G per instance)

create your account

@Tapanhaz
Tapanhaz / ioctl.py
Created November 27, 2024 19:10 — forked from santa4nt/ioctl.py
A Python-ctypes script to dispatch IOCTL in Windows
#!C:\Python27\python.exe
# The MIT License (MIT)
#
# Copyright © 2014-2016 Santoso Wijaya <santoso.wijaya@gmail.com>
#
# Permission is hereby granted, free of charge, to any person
# obtaining a copy of this software and associated documentation files
# (the "Software"), to deal in the Software without restriction,
# including without limitation the rights to use, copy, modify, merge,
# publish, distribute, sub-license, and/or sell copies of the Software,
@Tapanhaz
Tapanhaz / JetBrains trial reset.md
Created November 21, 2024 03:25
Reset all JetBrains products trial in Linux

In some cases, only these lines will work

for product in IntelliJIdea WebStorm DataGrip PhpStorm CLion PyCharm GoLand RubyMine; do
    rm -rf ~/.config/$product*/eval 2> /dev/null
    rm -rf ~/.config/JetBrains/$product*/eval 2> /dev/null
done

But if not, try these