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
@kconner
kconner / macOS Internals.md
Last active November 13, 2024 07:51
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 November 17, 2024 04:20
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 August 24, 2023 02:40
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 November 13, 2024 09:24
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
#
@TheRealKeto
TheRealKeto / FuturerestoreGuide.md
Last active July 13, 2024 14:22
A guide fully covering the process of using Futurerestore to upgrade, downgrade, or re-restore to an unsigned iOS firmware.

Futurerestore Guide

Futurerestore is a tool that allows users to upgrade, downgrade, or re-restore their iOS device to an unsigned firmware through the use of SHSH2 blobs. This guide will teach you how to use Futurerestore in order to upgrade, downgrade, or re-restore to an unsigned firmware.

Before continuing, keep in mind that this guide is based off of this one, and contains information that can change your device's behavior or even damage it. With that in mind, please read the guide fully, as no one but YOU will be held responsible for any damage caused to your device.

Notes and Hints

Throughout the entirety of this guide, keep in mind that:

  • iOS 13.1.3's SEP and Baseband are NOT compatible with iOS 12.x for all devices. This means that you're NOT able to upgrade, downgrade, or re-restore A10-A12X devices back to iOS 12.x. Attempting to use an incompatible SEP and Baseband will cause Futureresto