Skip to content

Instantly share code, notes, and snippets.

View SunsetMkt's full-sized avatar
💭
I may be slow to respond.

Sunset Mikoto SunsetMkt

💭
I may be slow to respond.
View GitHub Profile
@SunsetMkt
SunsetMkt / ForceEnablingXcodeLLM.md
Created June 17, 2024 07:08 — forked from unixzii/ForceEnablingXcodeLLM.md
A guide to force enabling Xcode LLM feature on China-SKU Macs.

Introduction

Apple restricted the access to Xcode LLM (Predictive code completion) feature on China models of Mac. This guide provides a way to bypass that restriction. It's verified on macOS 15.0 Beta (24A5264n), but there is no guarentee that it will always work on later macOS versions.

Prerequisites

  • Xcode is installed and run at least once.
  • SIP debugging restrictions are disabled (via csrutil enable --without debug command in recovery mode).

Disclaimer

@SunsetMkt
SunsetMkt / hidetidio.js
Created May 7, 2024 23:42 — forked from arafathusayn/hidetidio.js
Hide TidioChat Branding (for new theme)
function hideTdo() {
var timer = null;
var target = document.querySelector('#tidio-chat iframe');
if(!target) {
if(timer !== null) {
clearTimeout(timer);
}
timer = setTimeout(hideTdo, 500);
return;
} else {
@SunsetMkt
SunsetMkt / InstallZeroTier.ps1
Created April 11, 2024 13:49 — forked from wise-io/InstallZeroTier.ps1
Installs Latest ZeroTier One Client
<#
.SYNOPSIS
Installs ZeroTier
.DESCRIPTION
Install ZeroTier and join/configure ZeroTier network
.EXAMPLE
./ios-InstallZeroTier.ps1
.NOTES
This script will install PowerShell 7 if it is not present.
A UAC prompt will appear during install if -UI is used.
@SunsetMkt
SunsetMkt / xz-backdoor.md
Created March 30, 2024 15:08 — forked from thesamesam/xz-backdoor.md
xz-utils backdoor situation

FAQ on the xz-utils backdoor

Background

On March 29th, 2024, a backdoor was discovered in xz-utils, a suite of software that gives developers lossless compression. This package is commonly used for compressing release tarballs, software packages, kernel images, and initramfs images. It is very widely distributed, statistically your average Linux or macOS system will have it installed for

@SunsetMkt
SunsetMkt / web-servers.md
Created March 25, 2024 13:53 — forked from willurd/web-servers.md
Big list of http static server one-liners

Each of these commands will run an ad hoc http static server in your current (or specified) directory, available at http://localhost:8000. Use this power wisely.

Discussion on reddit.

Python 2.x

$ python -m SimpleHTTPServer 8000
@SunsetMkt
SunsetMkt / ipv6-regex-test.sh
Created February 28, 2024 13:57 — forked from syzdek/ipv6-regex-test.sh
Simple script to test my IPv6 regular expression.
#!/bin/sh
#
# Use posixregex CLI tool from: https://github.com/syzdek/dmstools/blob/master/src/posixregex.c
RE_IPV4="((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])"
posixregex -r "^(${RE_IPV4})$" \
127.0.0.1 \
10.0.0.1 \
192.168.1.1 \
@SunsetMkt
SunsetMkt / bootloader_miui.java
Created November 23, 2023 10:33 — forked from sopanatx/bootloader_miui.java
Xiaomi Bootloader Bind API
package com.android.settings.bootloader;
import android.content.Context;
import android.database.Cursor;
import android.net.Uri;
import android.os.Build;
import android.text.TextUtils;
import android.util.Log;
import com.android.settings.AESUtil;
import com.android.settings.bootloader.Utils;
@SunsetMkt
SunsetMkt / emeditor.key
Created November 21, 2023 04:01
emeditor v22 lifetime key
DEMZF-UCKEE-HB222-DJDDH-594U5
DMAZF-UCKEE-A6222-8CADP-HQZ7H
DPAZF-UCKEE-FH222-ET546-DLRGT
DRNZF-UCKEE-UK222-RWNLU-XVZH7
DSBZF-UCKEE-BF222-K24JB-S9JLC
DSHZF-UCKEE-D3222-NMB93-UKSQF
DTHZF-UCKEE-BW222-Q2BKZ-NXPU8
DVAZF-UCKEE-J7222-5UHCT-QSRFE
DVEZF-UCKEE-PR222-ZAPFE-4C49Q
@SunsetMkt
SunsetMkt / Genshin Impact.yaml
Created November 17, 2023 14:29 — forked from yushum/Genshin Impact.yaml
Config for Clash.Meta
- GEOSITE,hoyoverse,Genshin Impact
- DOMAIN,overseauspider.yuanshen.com,Genshin Impact
- DOMAIN,dispatchosglobal.yuanshen.com,Genshin Impact
- DOMAIN,osasiadispatch.yuanshen.com,Genshin Impact
- DOMAIN,oseurodispatch.yuanshen.com,Genshin Impact
- DOMAIN,osusadispatch.yuanshen.com,Genshin Impact
- AND,((DST-PORT,22101-22102),(NETWORK,UDP)),Genshin Impact
# Update
- DOMAIN,autopatchhk.yuanshen.com,Genshin Impact
$code = @"
using System;
using System.Runtime.InteropServices;
using System.Text;
public class ClipboardGetter
{
#region Win32 Native PInvoke
[DllImport("User32.dll", SetLastError = true)]