Skip to content

Instantly share code, notes, and snippets.

View StevenRCE0's full-sized avatar
🛸
Captured by aliens

Yanbo Wong StevenRCE0

🛸
Captured by aliens
View GitHub Profile
@StevenRCE0
StevenRCE0 / LoveStreetVoice.py
Last active February 22, 2023 06:25
I love StreetVoice and Accusefive the band!
import os
import time
import wget
from urllib.error import HTTPError
import re
url = input("URL: ")
url = re.sub(r'(\-[0-9]+)\.ts', '', url)
try:
@upbit
upbit / README.md
Last active February 16, 2025 14:34 — forked from ZipFile/README.md
Pixiv OAuth Flow (with Selenium)

Retrieving Auth Token (with Selenium)

  1. Setup, install Selenium/ChromeDriver
pip install selenium
# download chromedriver from https://chromedriver.storage.googleapis.com/index.html?path=91.0.4472.101/
# eg: wget https://chromedriver.storage.googleapis.com/91.0.4472.101/chromedriver_mac64.zip && unzip chromedriver_mac64.zip
@ZipFile
ZipFile / README.md
Last active April 25, 2025 04:38
Pixiv OAuth Flow

Retrieving Auth Token

  1. Run the command:

    python pixiv_auth.py login

    This will open the browser with Pixiv login page.

@getaaron
getaaron / macos-messages-subject-field.md
Last active March 10, 2025 11:17
Enable iMessage (Messages) Subject Field in macOS Big Sur through Sonoma

Want the Subject field (for bold iMessages) in macOS’ Messages app?

  1. Quit Messages
  2. Open Terminal
  3. Run defaults write com.apple.MobileSMS MMSShowSubject 1
  4. Start Messages

This worked for me on a fresh install of macOS 14.1.1 (23B81) (new Mac mini).

@KyNorthstar
KyNorthstar / LICENSE.txt
Last active April 14, 2022 19:49
Make UIColor Codable
BLUE HUSKY LICENSE 0 - PUBLIC DOMAIN - OPUS 7
0: LAYMAN'S TERMS
This section is meant to explain the purpose of this License in Layman's
terms, and should thusly never be seen as legally binding. This disclaimer does
not apply to further sections of this License.
1. This is no one's product and is in the public domain
2. You're not responsible for any bad things that might happen because someone
used this product
@Amzd
Amzd / PreferenceUIHostingController.swift
Last active November 14, 2024 10:01
PreferenceUIHostingController. Adds hiding home indicator and deferring system edge gestures to SwiftUI. (Don't work at the same time but I think that's normal?)
extension View {
/// Controls the application's preferred home indicator auto-hiding when this view is shown.
func prefersHomeIndicatorAutoHidden(_ value: Bool) -> some View {
preference(key: PreferenceUIHostingController.PrefersHomeIndicatorAutoHiddenPreferenceKey.self, value: value)
}
/// Controls the application's preferred screen edges deferring system gestures when this view is shown. Default is UIRectEdgeNone.
func edgesDeferringSystemGestures(_ edge: UIRectEdge) -> some View {
preference(key: PreferenceUIHostingController.PreferredScreenEdgesDeferringSystemGesturesPreferenceKey.self, value: edge)
}
@masamichiueta
masamichiueta / PageView.swift
Created October 12, 2019 04:19
SwiftUI PageView
import SwiftUI
import UIKit
struct PageViewController: UIViewControllerRepresentable {
var controllers: [UIViewController]
@Binding var currentPage: Int
func makeCoordinator() -> Coordinator {
Coordinator(self)
}
@AveYo
AveYo / .. MediaCreationTool.bat ..md
Last active April 24, 2025 13:43
Universal MediaCreationTool wrapper for all MCT Windows 10 versions - MOVED TO github.com/AveYo/MediaCreationTool.bat
@jbfriedrich
jbfriedrich / nsmb.conf
Last active April 10, 2025 12:48
macOS 11.2 NSMB configuration
# /etc/nsmb.conf - macOS 11.3 - 2021-04-29
#------------------------------------------------------------------------------
# SMB configuration for macOS 11.3 <-> Synology
#------------------------------------------------------------------------------
# Additional information:
# -----------------------
# https://support.apple.com/de-de/HT211927
# https://support.apple.com/en-us/HT208209
# https://apple.stackexchange.com/questions/309016/smb-share-deadlocks-since-high-sierra
# https://photographylife.com/afp-vs-nfs-vs-smb-performance
@masklinn
masklinn / cheatsheet.md
Last active April 17, 2025 02:20
launchctl/launchd cheat sheet

I've never had great understanding of launchctl but the deprecation of the old commands with launchctl 2 (10.10) has been terrible as all resources only cover the old commands, and documentation for Apple utilities is generally disgracefully bad, with launchctl not dissembling.

Mad props to https://babodee.wordpress.com/2016/04/09/launchctl-2-0-syntax/ which contains most details

domains

Internally, launchd has several domains, but launchctl 1 would only ask for service names,