Skip to content

Instantly share code, notes, and snippets.

View imknown's full-sized avatar
🍄
👩🏻‍💻 👩🏻‍💻

Kin Kaku imknown

🍄
👩🏻‍💻 👩🏻‍💻
View GitHub Profile
@unixzii
unixzii / ForceEnablingXcodeLLM.md
Last active July 22, 2024 11:16
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

@Kyle-Ye
Kyle-Ye / XcodeLLM.md
Last active July 22, 2024 03:10
Enable XcodeLLM for ChinaSKU Mac on macOS 15 Beta 1

Warning

The following guide need to disable SIP to work.

Please confirm the risk of disabling the SIP by yourself.

Another solution which does not require disabling SIP is currently under investigation.

Step 0

Reboot into Recovery OS + Disable SIP

@mcxiaoke
mcxiaoke / miui-blotware-apps.md
Last active July 19, 2024 19:31
MIUI 13/14 bloatware apps, updated at 20240816

对于所有应用,不建议直接删除,使用adb shell pm disable-user package-name禁用即可,方便出问题时恢复。

DO NOT UNINSTALL:

  • com.miui.securitycenter
  • com.miui.securityadd
  • com.xiaomi.finddevice

(Don’t uninstall these three apps or services from your Xiaomi device. Otherwise, you may encounter device bricking or bootloop issues.)

@objcode
objcode / ConcurrencyHelpers.kt
Last active July 7, 2024 09:57
Helpers to control concurrency for one shot requests using Kotlin coroutines.
/* Copyright 2019 The Android Open Source Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
@afollestad
afollestad / BroadcastReceiver.kt
Last active January 14, 2024 10:23
A Lifecycle components aware BroadcastReceiver DSL (Kotlin)
import android.content.Context
import android.content.Intent
import android.content.IntentFilter
import androidx.lifecycle.Lifecycle.Event.ON_DESTROY
import androidx.lifecycle.Lifecycle.Event.ON_START
import androidx.lifecycle.LifecycleObserver
import androidx.lifecycle.LifecycleOwner
import androidx.lifecycle.OnLifecycleEvent
import android.content.BroadcastReceiver as StockReceiver
@CaiJingLong
CaiJingLong / overlay_demo.dart
Created November 20, 2018 07:28
overlay_demo.dart
import 'package:flutter/material.dart';
void main() => runApp(MyApp());
class MyApp extends StatelessWidget {
// This widget is the root of your application.
@override
Widget build(BuildContext context) {
return MaterialApp(
title: 'Flutter Demo',
.text
.globl _start
_start:
mov %r0, $1 // file descriptor number 1 (stdout)
ldr %r1, =message
mov %r2, $message_len
mov %r7, $4 // syscall 4 (write)
swi $0
@riyaz
riyaz / installFromAAB.sh
Last active January 14, 2023 19:36 — forked from keyboardsurfer/installFromBundle
Install the app in device from aab
#!/bin/sh
# One step wrapper to install aab to connected device, it downloads bundletool if its missing and signs the app with android debug certifiate.
#
# Usage: installFromAAB install-aab <local-aab-path>
BASENAME="${1##*/}"
KEYSTORE=~/.android/debug.keystore
KS_ALIAS="androiddebugkey"
PASS="pass:android"
@chenshaoju
chenshaoju / script running adb shell
Last active March 25, 2024 04:58
Android 8.x Captive Portal Server for Mainland China
settings put global captive_portal_mode 1
settings put global captive_portal_use_https 1
settings put global captive_portal_http_url http://connect.rom.miui.com/generate_204
settings put global captive_portal_https_url https://connect.rom.miui.com/generate_204
settings put global captive_portal_fallback_url http://captive.v2ex.co/generate_204
settings put global captive_portal_other_fallback_urls http://www.google.cn/generate_204
@xujiaao
xujiaao / android-studio-disable-test-only-mode.md
Last active May 16, 2024 16:16
Disable 'testOnly' mode for Android Studio 3.0
tags
Android
Android Studio

Disable 'testOnly' mode for Android Studio 3.0