Skip to content

Instantly share code, notes, and snippets.

View nanpuhaha's full-sized avatar
๐ŸŒด
On vacation

Seo, Jang-won nanpuhaha

๐ŸŒด
On vacation
  • Seoul, South Korea
View GitHub Profile
@jlia0
jlia0 / agent loop
Last active April 28, 2025 16:14
Manus tools and prompts
You are Manus, an AI agent created by the Manus team.
You excel at the following tasks:
1. Information gathering, fact-checking, and documentation
2. Data processing, analysis, and visualization
3. Writing multi-chapter articles and in-depth research reports
4. Creating websites, applications, and tools
5. Using programming to solve various problems beyond development
6. Various tasks that can be accomplished using computers and the internet
@kconner
kconner / macOS Internals.md
Last active April 24, 2025 10:08
macOS Internals

macOS Internals

Understand your Mac and iPhone more deeply by tracing the evolution of Mac OS X from prelease to Swift. John Siracusa delivers the details.

Starting Points

How to use this gist

You've got two main options:

@mezhgano
mezhgano / playwright_save_mhtml.py
Created May 1, 2023 14:58
Save .mhtml web archive using playwright
from playwright.sync_api import sync_playwright
def save_mhtml(path: str, text: str):
with open(path, mode='w', encoding='UTF-8', newline='\n') as file:
file.write(text)
def save_page(url: str, path: str):
with sync_playwright() as playwright:
browser = playwright.chromium.launch(headless=False)
@miticollo
miticollo / How-to-build-frida-server-for-ios.md
Last active February 3, 2025 16:44
How to build frida server for iOS jailbroken devices

Here, I'll show you how to compile Frida for both rootfull and rootless jailbreaks.

TL;DR

On Dopamine/Fugu15 Max or palera1n you can add my repo (open the link in your favorite browser on your jailbroken iDevice).

The DEBs you will install are build using the following instructions.

Update 2024-02-29

@ncalm
ncalm / excel-lambda-LEV.txt
Last active September 18, 2024 11:06
This Excel LAMBDA function calculates the Levenshtein distance between two strings
/*
LEV
Calculates the Levenshtein distance between two strings
Inputs
- a: a string to compare with b
- b: a string to compare with a
- [ii]: the [ii]th position in string a
- [jj]: the [jj]th position in string b
@shaykalyan
shaykalyan / lily58_keymap.json
Last active April 1, 2025 13:13
QMK keymap for the Lily58 split keyboard. To use with https://config.qmk.fm/
{
"version": 1,
"notes": "",
"documentation": "\"This file is a QMK Configurator export. You can import this at <https://config.qmk.fm>. It can also be used directly with QMK's source code.\n\nTo setup your QMK environment check out the tutorial: <https://docs.qmk.fm/#/newbs>\n\nYou can convert this file to a keymap.c using this command: `qmk json2c {keymap}`\n\nYou can compile this keymap using this command: `qmk compile {keymap}`\"\n",
"keyboard": "lily58/rev1",
"keymap": "shaykalyan",
"layout": "LAYOUT",
"layers": [
[
"QK_GESC",
@RhetTbull
RhetTbull / vision.py
Last active April 19, 2025 13:11
Use Apple's Vision framework from Python to detect text in images
""" Use Apple's Vision Framework via PyObjC to detect text in images
To use:
python3 -m pip install pyobjc-core pyobjc-framework-Quartz pyobjc-framework-Vision wurlitzer
"""
import pathlib
@Nosskirneh
Nosskirneh / README.md
Created February 13, 2020 15:02
Logging without syslog โ€“ย Tweak development

The iOS syslog was removed in iOS 13.3. Prior to that, you could still view the deprecated syslog if you compiled your tweaks using an iOS 9 or lower SDK. Apple introduced oslog in iOS 10.

  1. Clone https://github.com/theos/theos/ to $THEOS/sdks.
  2. Change $THEOS/vendor/logos/bin/lib/Logos/Generator/Base/Method.pm:73 from HBLogDebug(... or NSLog(..., depending on theos version, to log(... .
  3. Add the following to $THEOS/include/HBLog.h:
    • #define log(...) HBLogWarn(@"<NOSS>: %@", [NSString stringWithFormat:__VA_ARGS__]); on line 19, ie if you're running os_log / iOS 10+ SDK.

    • #define log(...) HBLogDebug(__VA_ARGS__); on line 41, ie when not running an iOS 10+ SDK.

  4. On your iDevice, add alias debug="oslog | awk 'f; /\)/{f=0} /:/{print; f=/\(/}'" to /etc/profile.d/profile.sh and source it afterwards. You may need to create the file if you haven't already.
@curioustorvald
curioustorvald / my-little-streamer-bot.md
Last active September 29, 2024 13:45
How to record twitch live streaming PROPERLY

์†ก์ถœ์ด ๋ถˆ์•ˆ์ •ํ•œ ์ŠคํŠธ๋ฆฌ๋จธ์˜ ๋ฐฉ์†ก์„ ์ตœ์†Œํ•œ์˜ ๋”œ๋ ˆ์ด๋กœ ๋…นํ™”ํ•˜๋„๋ก ๋งŒ๋“ค์–ด์ง„ ๋…นํ™” ์Šคํฌ๋ฆฝํŠธ์ž…๋‹ˆ๋‹ค. ํ˜ธ์ŠคํŒ… ์ฑ„๋„์„ ๋…นํ™”ํ•˜์ง€ ์•Š๊ณ , TSํŒŒ์ผ์„ ์ง์ ‘ ์ €์žฅํ•ฉ๋‹ˆ๋‹ค.

์ด ์Šคํฌ๋ฆฝํŠธ๋Š” 24/7 ์ƒ์‹œ๊ฐ์‹œ ๋ฐ ๋…นํ™”๋ฅผ ์œ„ํ•ด ์ค€๋น„๋œ ์Šคํฌ๋ฆฝํŠธ์ด๊ณ  ์„ค์ • ๊ณผ์ •์—์„œ ์•ฝ๊ฐ„์˜ ํ”„๋กœ๊ทธ๋ž˜๋ฐ์  ์ง€์‹์ด ํ•„์š”ํ•ฉ๋‹ˆ๋‹ค. ๋‹จํƒ€์„ฑ ๋…นํ™”๋ฅผ ์›ํ•œ๋‹ค๋ฉด ๋” ๋‹จ์ˆœํ•œ ๊ฑฐ ์ฐพ์•„๋‹ค ์“ฐ์‹ญ์‡ผ.

์น˜์ง€์ง์šฉ ์Šคํฌ๋ฆฝํŠธ๋ฅผ ํ…Œ์ŠคํŠธํ•˜๊ณ  ์žˆ์Šต๋‹ˆ๋‹ค. ์—ฌ๋Ÿฌ๋ถ„์˜ ๋งŽ์€ ๊ธฐ์—ฌ๊ฐ€ ํ•„์š”ํ•ฉ๋‹ˆ๋‹ค ๐Ÿ™๐Ÿ™

์„ธํŒ…ํ•˜๊ธฐ ์ „์—

์œˆ๋„์—์„œ๋„ ์ž‘๋™์€ ํ•˜๊ฒ ์ง€๋งŒ, ์ง„์งœ ๋ด‡์„ ๊ตฌ์ถ•ํ•˜๋ ค๋ฉด ์ด ๊ธ€์˜ ์ž‘์„ฑ์ž๋Š” ๋ฆฌ๋ˆ…์Šค๋ฅผ ์‚ฌ์šฉํ•˜๋Š” ๊ฑธ ์ถ”์ฒœํ•ฉ๋‹ˆ๋‹ค. ๋ฆฌ๋ˆ…์Šค๋ฅผ ์“ฐ๋Š” ์ด์œ ๋Š”, ์ ์–ด๋„ ์–˜๋Š” ์—…๋ฐ์ดํŠธ ์žˆ๋‹ค๊ณ  ์ง€๋ฉ‹๋Œ€๋กœ ์žฌ๋ถ€ํŒ…ํ•˜์ง€๋Š” ์•Š์œผ๋‹ˆ๊นŒ์š” (๋Œ€์ถฉ ํŠธ์œ„์น˜ ์นดํŒŒ ์ฝ˜)

#!/usr/bin/env python3
# This code is based on tutorial by slicktechies modified as needed to use oauth token from Twitch.
# You can read more details at: https://www.junian.net/2017/01/how-to-record-twitch-streams.html
# original code is from https://slicktechies.com/how-to-watchrecord-twitch-streams-using-livestreamer/
# 24/7/365 NAS adaptation by CuriousTorvald (https://gist.github.com/curioustorvald/f7d1eefe1310efb8d41bee2f48a8e681)
# Twitch Helix API integration by Krepe.Z (https://gist.github.com/krepe90/22a0a6159b024ccf8f67ee034f94c1cc)
# Copyright (c) 2017, 2019, 2020, 2022 Junian, CuriousTorvald and Krepe.Z
#