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
/// A helper struct to construct math text. Just wraps a &str, intended for ui.add() and similar situations.
pub struct MathText<'a>(pub &'a str);
impl<'a> Widget for MathText<'a> {
fn ui(self, ui: &mut Ui) -> Response {
ui.label(math_text(ui, self.0))
}
}
/// Layout a math text using the style from the current ui.
@ShabbirHasan1
ShabbirHasan1 / Cargo.toml
Created April 4, 2025 09:47 — forked from rctlmk/Cargo.toml
SplitPane
[dependencies]
egui = "0.21"
egui_extras = "0.21"
eframe = "0.21"
@ShabbirHasan1
ShabbirHasan1 / Mac OS X: Open in Visual Studio Code
Created March 29, 2025 18:40 — forked from tonysneed/Mac OS X: Open in Visual Studio Code
Add a command to Finder services in Mac OSX to open a folder in VS Code
- Open Automator
- File -> New -> Service
- Change "Service Receives" to "files or folders" in "Finder"
- Add a "Run Shell Script" action
- Change "Pass input" to "as arguments"
- Paste the following in the shell script box: open -n -b "com.microsoft.VSCode" --args "$*"
- Save it as something like "Open in Visual Studio Code"
@ShabbirHasan1
ShabbirHasan1 / ringbuffer.pyx
Created March 7, 2025 09:19 — forked from beatzxbt/ringbuffer.pyx
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.
"""
@ShabbirHasan1
ShabbirHasan1 / markouts.py
Created March 3, 2025 09:15 — forked from databento-bot/markouts.py
Demonstrate adverse selection and market impact of aggressive/passive limit orders in US equities
import databento as db
import matplotlib.pyplot as plt
import numpy as np
import pandas as pd
DATE = pd.Timestamp(year=2023, month=6, day=22, tz='US/Eastern')
NUM_TIME_SAMPLES = 1000
SYMBOL = 'NVDA'
WINDOW_LIMITS_US = 120 * 1e6
@ShabbirHasan1
ShabbirHasan1 / ratelimiter.pyx
Created March 2, 2025 16:11 — forked from beatzxbt/ratelimiter.pyx
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

//! ## Task Description
//!
//! The goal is to develop a backend service for shortening URLs using CQRS
//! (Command Query Responsibility Segregation) and ES (Event Sourcing)
//! approaches. The service should support the following features:
//!
//! ## Functional Requirements
//!
//! ### Creating a short link with a random slug
//!
@ShabbirHasan1
ShabbirHasan1 / research.md
Created January 23, 2025 12:35 — forked from hackermondev/research.md
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