Skip to content

Instantly share code, notes, and snippets.

@4ft35t
4ft35t / gettoken.py
Last active June 12, 2026 00:45
Update access_token for rclone mount no-admin sharepoint. 自动更新 rclone 挂载的无管理员 sharepoint 配置中的 access_token。 rclone 完整配置见 https://www.nodeseek.com/post-743495-1
'''
修改 url、email 、passwd 三个参数后,运行脚本,自动登陆然后输出 rclone 需要的三个参数
'''
import json
from playwright.sync_api import sync_playwright
url = "https://xx-my.sharepoint.com/my"
email ='xx@xx'
passwd = 'xx'

Preface

Genymotion recently moved root access behind a paywall, making it a premium feature. However, if you're using Genymotion for Android development, testing, or educational purposes, having root access can be essential. Root access allows developers to access deeper functionality, test root-only features, and explore Android's internals without restrictions.

The good news is that with a bit of work, you can still enable root on a Genymotion emulator if you have access to its disk image and platform keys. This guide walks you through the process of adding a custom system app, RootToggle, which will allow you to switch root access on and off without needing Genymotion's paid root access feature.

This Gist details the steps to compile, sign, and install RootToggle as a system app in a Genymotion emulator by directly modifying the emulator's disk image IN LINUX (use a virtual machine on Windows to do that).


@4ft35t
4ft35t / simyo-esim.sh
Created August 19, 2024 08:41
get simyo esim code
#!/bin/bash
# get eSim LPA profile
# https://blog.ugoearn.com/simyo_5ber/
# https://shuzijumin.com/thread-479-1-1.html
phone_number="06..."
password="..."
simyo_curl() {
#!/usr/bin/env python3
# coding: utf-8
# @2024-07-25 22:54:41
# vim: set expandtab tabstop=4 shiftwidth=4 softtabstop=4:
'''
resolve sudoku
'''
from copy import deepcopy
@4ft35t
4ft35t / ForceEnablingXcodeLLM.md
Created June 17, 2024 07:52 — 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

@4ft35t
4ft35t / log
Created December 18, 2023 06:09
clash-jegotrip.log.txt
# Capture on 2023-12-18 13:49:46.768
13:49:46.774 Info: [APP] Logcat level: info
13:49:56.220 Info: [UDP] 172.19.0.1:16403 --> comm-main.ess.apple.com:3481 doesn't match any rule using DIRECT
13:49:57.500 Info: [TCP] 172.19.0.1:62898 --> cl4-cn.apple.com:443 match GeoIP(CN) using DIRECT
13:49:57.506 Info: [TCP] 172.19.0.1:62897 --> cl3.apple.com:443 match GeoIP(CN) using DIRECT
13:49:57.507 Info: [TCP] 172.19.0.1:62896 --> iphone-ld.apple.com:443 match GeoIP(CN) using DIRECT
13:49:57.507 Info: [TCP] 172.19.0.1:62895 --> iphone-ld.apple.com:443 match GeoIP(CN) using DIRECT
13:49:57.522 Info: [TCP] 172.19.0.1:62899 --> gs-loc-cn.apple.com:443 match GeoIP(CN) using DIRECT
13:49:57.874 Info: [TCP] 172.19.0.1:62900 --> gsp85-cn-ssl.ls.apple.com:443 match GeoIP(CN) using DIRECT
13:49:57.879 Info: [TCP] 172.19.0.1:62902 --> ocsp2.apple.com:443 match GeoIP(CN) using DIRECT
sum(a): 10656
sum(b): 10656
a = 1776 , len(b) = 83, sum(b) = 10656
588
504
280
224
180
a = 2667 , len(b) = 78, sum(b) = 8880
364
@4ft35t
4ft35t / AndroidManifest.xml
Last active April 14, 2022 02:49 — forked from burinov/1commands.sh
Example on how to use adb to start an Activity,BroadcastReceiver or Service from adb and include intent extras too.for Activity: adb shell am start -n "com.peirr.test/com.peirr.test.MyActivity" --es name "John" --ei age 30for BroadcastReceiver adb shell am broadcast -n "com.peirr.test/com.peirr.test.MyReceiver" --es name "John" --ei age 30for Se…
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.peirr.test">
<application
android:allowBackup="true"
android:icon="@mipmap/ic_launcher"
android:label="@string/app_name"
android:theme="@style/AppTheme">
@4ft35t
4ft35t / google-photo-free-up-space.js
Last active March 25, 2022 13:36
Upload Synology photos to FTP. eg: FTP server on Pixel one(2016) to get unlimited Google Photos backup.
auto();
console.show()
var utils = require('utils.js');
pkgName='com.google.android.apps.photos'
// 直接启动
app.startActivity({
packageName: pkgName,
@4ft35t
4ft35t / result.md
Last active December 30, 2019 09:24
cat test.txt | sed  -n '/^start/,/^end/{/^start/,/i hate you/{/i hate you/p;};}'
i hate you 2
i hate you 4
i hate you 6
cat test.txt| awk '/start /{in_block=1; next} in_block && /i hate you/{t=$0; in_block=0; next} t && /end/{print t; t=""}'
i hate you 2