Skip to content

Instantly share code, notes, and snippets.

View nicolasmozo's full-sized avatar

Nicolás nicolasmozo

View GitHub Profile
@zthxxx
zthxxx / Activate Office 2019 for macOS VoL.md
Last active July 19, 2024 11:40
crack activate Office on mac with license file
@ih2502mk
ih2502mk / list.md
Last active July 19, 2024 00:22
Quantopian Lectures Saved
@mike-myers-tob
mike-myers-tob / Working GDB on macOS 11.md
Last active June 13, 2024 15:27
Steps to get GDB actually working in April 2021 on macOS (Intel x86-64 only)

Debug with GDB on macOS 11

The big reason to do this is that LLDB has no ability to "follow-fork-mode child", in other words, a multi-process target that doesn't have a single-process mode (or, a bug that only manifests when in multi-process mode) is going to be difficult or impossible to debug, especially if you have to run the target over and over in order to make the bug manifest. If you have a repeatable bug, no big deal, break on the fork from the parent process and attach to the child in a second lldb instance. Otherwise, read on.

Install GDB

Don't make the mistake of thinking you can just brew install gdb. Currently this is version 10.2 and it's mostly broken, with at least two annoying bugs as of April 29th 2021, but the big one is https://sourceware.org/bugzilla/show_bug.cgi?id=24069

$ xcode-select install  # install the XCode command-line tools
@alxfordy
alxfordy / tinyman.py
Created May 24, 2022 12:51
Async TinyMan Pools Fetch
async def fetch_pool(self, url, session):
resp = await session.request(method="GET", url=url)
json = await resp.json()
self.json_pools.extend(json.get("results"))
async def make_pools_fetch(self, requests_needed: int):
async with ClientSession() as session:
tasks = list()
for request in range(requests_needed):
url = f"https://mainnet.analytics.tinyman.org/api/v1/pools/?limit=10&offset={request * 10}&ordering=-liquidity&verified_only=true&with_statistics=False"