Skip to content

Instantly share code, notes, and snippets.

View moeshin's full-sized avatar
💤
zZz...遇到困难摆大烂

MoeShin moeshin

💤
zZz...遇到困难摆大烂
View GitHub Profile
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "https://example.com/product.schema.json",
"title": "sing-box config schema",
"type": "object",
"$defs": {
"listableString": {
"$comments": "ref:https://github.com/SagerNet/sing-box/blob/b0db869b052aa32ec1716e43f7c1f50d7e491057/option/types.go#L77",
"description": "allow not having to be an array when there's single item",
"oneOf": [
@chowder
chowder / README.md
Last active May 6, 2025 08:34
Exporting Microsoft Authenticator TOTP secrets

Background

Workplaces may enforce TOTP 2FA to be enabled Office 365 accounts, which require the Microsoft Authenticator app to be installed.

Regular TOTP applications (such as Aegis, Authy, or LastPass) cannot be used as Microsoft uses a proprietary scheme called phonefactor. Furthermore, the application requires Google Services Framework (GSF) to be installed (likely to provide device notifications), and will refuse to work when it is not present on the device.

Forunately, after the registration is complete, the underlying mechanism the app uses to generate TOTP codes is regular otpauth, and its secrets can be exported with a little bit of effort.

Extracting the keys

@kuasha420
kuasha420 / steam-apfs-case-sensitive.md
Last active April 8, 2025 14:58
Update `brew` command

Steam Client on APFS Case Sensitive Mac OS Drive

If you are using APFS Case Sensitive File system and trying to use Steam, it will flicker & silently fail or show the following error message:

steam requires that '~/library/application support/steam/steam.appbundle/steam/contents/macos' be on a case-insensitive filesystem.

To fix the issue, follow the instruction here.

Run from your user account, NOT ROOT!

@vhxubo
vhxubo / FastGit.user.js
Last active February 2, 2024 16:09
GitHub Clone or download、releases 下载加速
// ==UserScript==
// @name FastGit
// @version 0.8
// @description GitHub Clone or download、Releases 下载加速
// @author Vhxubo
// @license MIT
// @icon https://github.githubassets.com/favicon.ico
// @homepage https://gist.github.com/vhxubo/d67fbd5bb3b7308b2e3690ca58e12c12
// @namespace https://gist.github.com/vhxubo/d67fbd5bb3b7308b2e3690ca58e12c12
// @match https://github.com/*/*
@eagletmt
eagletmt / main.go
Last active August 19, 2024 22:54
List installable Android SDK packages (similar to sdkmanager --verbose --list)
package main
import (
"encoding/xml"
"fmt"
"io/ioutil"
"log"
"net/http"
)
@Otoris
Otoris / autoexec.cfg
Last active April 29, 2022 21:20
Otoris' Counter-Strike: Global Offensive config
exec hacks.cfg
//Steam ID = STEAM_1:1:3380810
// Launch options:
// -novid -tickrate 128 -refresh 144 -nojoy -console +cpu_frequency_monitoring 2
// cpu_frequency_monitoring will help identify if you have CPU overheating/throttling problems
// If it drops below 80%-85% You have a problem with airflow/cooling/fans. If it's 55 or below, you have a MAJOR problem.
cl_cmdrate 128
@benqy
benqy / ie-proxysetting.md
Last active March 3, 2020 18:07
使用程序修改系统(IE)代理设置,骑兵程序员,2014-01-22

使用程序修改系统(IE)代理设置

这是本人在做的一个前端开发调试工具(HttpMock),功能是web服务器+http日记+http代理(类似fiddler),其中的代理功能,需要在web服务启动时,自动去设置各浏览器的代理设置.

我原先是通过写注册表的方式去实现,实现方法很简单,写一个注册表文件,启动的时候自动运行一下这个注册表文件就可以.

修改代理的注册表文件的内容,proxy.reg:

[HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet Settings]  

"MigrateProxy"=dword:00000001