Skip to content

Instantly share code, notes, and snippets.

View ShabbirHasan1's full-sized avatar
:octocat:
Building Things

Shabbir Hasan ShabbirHasan1

:octocat:
Building Things
  • India
View GitHub Profile
@beatzxbt
beatzxbt / ringbuffer.pyx
Created March 6, 2025 20:01
1d f64 ringbuffer.pyx
import numpy as np
cimport numpy as cnp
from libc.stdint cimport uint64_t, int64_t
cdef class RingBufferOneDim:
"""
A 1-dimensional fixed-size circular buffer for floats/doubles.
"""
@beatzxbt
beatzxbt / ratelimiter.pyx
Created March 2, 2025 16:00
basic rate limiter
from libc.stdint cimport uint32_t
from mm_toolbox.time.time cimport time_s
from .engine cimport OrderAction
cdef class RateLimitCounter:
cdef:
uint32_t tokens_per_sec
uint32_t tokens_remaining

g.co, Google's official URL shortcut (update: or Google Workspace's domain verification, see bottom), is compromised. People are actively having their Google accounts stolen.

Someone just tried the most sophisticated phishing attack I've ever seen. I almost fell for it. My mind is a little blown.

  1. Someone named "Chloe" called me from 650-203-0000 with Caller ID saying "Google". She sounded like a real engineer, the connection was super clear, and she had an American accent. Screenshot.

  2. They said that they were from Google Workspace and someone had recently gained access to my account, which they had blocked. They asked me if I had recently logged in from Frankfurt, Germany and I said no.

  3. I asked if they can confirm this is Google calling by emailing me from a Google email and they said sure and sent me this email and told me to look for a case number in it, which I saw in

@hackermondev
hackermondev / research.md
Last active June 19, 2025 13:05
Unique 0-click deanonymization attack targeting Signal, Discord and hundreds of platform

hi, i'm daniel. i'm a 15-year-old high school junior. in my free time, i hack billion dollar companies and build cool stuff.

3 months ago, I discovered a unique 0-click deanonymization attack that allows an attacker to grab the location of any target within a 250 mile radius. With a vulnerable app installed on a target's phone (or as a background application on their laptop), an attacker can send a malicious payload and deanonymize you within seconds--and you wouldn't even know.

I'm publishing this writeup and research as a warning, especially for journalists, activists, and hackers, about this type of undetectable attack. Hundreds of applications are vulnerable, including some of the most popular apps in the world: Signal, Discord, Twitter/X, and others. Here's how it works:

Cloudflare

By the numbers, Cloudflare is easily the most popular CDN on the market. It beats out competitors such as Sucuri, Amazon CloudFront, Akamai, and Fastly. In 2019, a major Cloudflare outage k

@debasishg
debasishg / dod.md
Last active May 7, 2025 14:59
Data oriented design, hardware awareness, cache awareness in data structures & algorithms
@githubdebugger
githubdebugger / clickhouse_install.sh
Last active September 10, 2024 06:41
clickhouse_install.sh
#!/bin/bash
# Function to prompt user for yes/no input
ask_yes_no() {
while true; do
read -p "$1 (y/n): " yn
case $yn in
[Yy]* ) return 0;;
[Nn]* ) return 1;;
* ) echo "Please answer yes or no.";;
// Update 2025-05-22 — ported to rand v0.9, using a struct with Display impl rather than returning a string
struct MarineLine;
impl std::fmt::Display for MarineLine {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
use rand::{Rng, seq::IndexedRandom};
let marine_life = ["🐳", "🐠", "🦈", "🐙", "🐡", "🐬", "🐟", "🦀", "🐋"];
let water = [
@adtac
adtac / README.md
Last active May 29, 2025 12:51
Using your Kindle as an e-ink monitor

3.5 fps, Paperwhite 3
@adtac_

step 1: jailbreak your Kindle

mobileread.com is your best resource here, follow the instructions from the LanguageBreak thread

I didn't really follow the LanguageBreak instructions because I didn't care about most of the features + I was curious to do it myself, but the LanguageBreak github repo was invaluable for debugging

@lewsmith
lewsmith / fix_coverage.rs
Last active July 5, 2024 16:51
Rust `await` coverage temporary fix
/// This is a temporary fix for a bug in coverage reports where awaits show as not covered.
///
/// The idea is that once the bug is fixed, you can easily remove all `.fix_cov()` calls and imports,
/// delete the `fix_coverage.rs` and eveything works as it previouslt did.
///
/// To use it just simply import the `FixCov` trait and add `.fix_cov` to any future, before the `.await`.
///
/// # Example
/// ```
/// use FixCov;
// BENCH
const NEW_TEMPLATE_INPUT: &str = r#"{"e":"depthUpdate","E":1571889248277,"T":1571889248276,"s":"BTCUSDT","U":390497796,"u":390497878,"pu":390497794,"b":[["7403.89","0.002"],["7403.90","3.906"],["7404.00","1.428"],["7404.85","5.239"],["7405.43","2.562"]],"a":[["7405.96","3.340"],["7406.63","4.525"],["7407.08","2.475"],["7407.15","4.800"],["7407.20","0.175"]]}"#;
fn criterion_benchmark(c: &mut Criterion) {
c.bench_function("Deserialize using serde", |b| {
b.iter(|| {
let _: BBO =
serde_json::from_str(NEW_TEMPLATE_INPUT).expect("Failed to deserialize JSON");
})