Skip to content

Instantly share code, notes, and snippets.

View iT-Boyer's full-sized avatar
🎯
Focusing

布衣男儿 iT-Boyer

🎯
Focusing
View GitHub Profile
@xslim
xslim / UIAutomationAddon.js
Created February 22, 2011 22:00
UI Automation sample test file
/*
* Test
*/
function test(title, f, options) {
if (options == null) {
options = {
logTree: true
};
}
@staltz
staltz / introrx.md
Last active June 15, 2024 12:24
The introduction to Reactive Programming you've been missing
@zeitiger
zeitiger / gist:1387f7d996f64b493608
Last active March 30, 2022 08:11
JSExportAs Workaround in Swift (simplified code example)
public typealias myFunctionDefAlias = (@objc_block (String, String, NSNumber) -> Void)
@objc
public protocol MyJSExportProtocol: JSExport {
// JSExportAs alternative in Swift via closure
var myFunction:myFunctionDefAlias? {get}
}
@objc
public class MyJSExportClass: NSObject, MyJSExportProtocol {
@justintanner
justintanner / emacs_hammerspoon.lua
Last active April 29, 2023 23:58
Emacs Hammerspoon Script
--- Emacs Hammerspoon Script
-- Author: Justin Tanner
-- Email: work@jwtanner.com
-- License: MIT
--- What does this thing do?
-- Allows you to have Emacs *like* keybindings in apps other than Emacs.
-- You can use Ctrl-Space to mark and cut text just like Emacs. Also enables Emacs prefix keys such as Ctrl-xs (save).
--- Installation
@mxcl
mxcl / detweet.swift
Last active December 23, 2023 23:22
Delete all tweets and favorites older than two months ago. Instructions in comment.
#!/usr/bin/swift sh
import Foundation
import PromiseKit // @mxcl ~> 6.5
import Swifter // @mattdonnelly == b27a89
let swifter = Swifter(
consumerKey: "FILL",
consumerSecret: "ME",
oauthToken: "IN",
oauthTokenSecret: "https://developer.twitter.com/en/docs/basics/apps/overview.html"
@zhuziyi1989
zhuziyi1989 / URL Schemes.md
Last active June 12, 2024 05:52
常用 URL Schemes 收集。

** 由于此文年事已久,可能某些URL Schemes已失效,可在评论区留言指出!(最后更新于 2024.4.16)

关于 URL Scheme 你知道多少?

iOS系统中

由于苹果的各应用都是在沙盒中,不能够互相之间访问或共享数据。但是苹果还是给出了一个可以在APP之间跳转的方法:URL Scheme。简单的说,URL Scheme就是一个可以让 APP 相互之间可以跳转的协议。每个 APP 的URL Scheme都是不一样的,如果存在一样的URL Scheme,那么系统就会响应先安装那个 APP 的URL Scheme,因为后安装的 APP 的URL Scheme被覆盖掉了,是不能被调用的。

Android系统中

@wzyboy
wzyboy / amortize_over.py
Last active March 20, 2024 16:29 — forked from cdjk/amortize_over.py
amortize_over beancount plugin
# Copyright (c) 2017 Cary Kempston
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
# copies of the Software, and to permit persons to whom the Software is
# furnished to do so, subject to the following conditions:
# The above copyright notice and this permission notice shall be included in all
local clockingLog = hs.logger.new("clocking")
local clockingMenu = hs.menubar.new()
local currentTask = nil
local function trim(s)
return (s:gsub("^%s*(.-)%s*$", "%1"))
end
local function eval(sexp, callback)
hs.task.new(
@oleou
oleou / 美区苹果ID免费分享【含已购APP】
Last active November 3, 2023 09:33
账号不定期解锁,运气好的话随便挑一个就能登上。
.
.
自苹果官方出了新机制之后,分享号基本都是锁定瘫痪状态的,之前很多小伙伴总联系我说id锁定了需要解锁,那时我根本解不过来,现在我增加了多个账号还增加了备用分享通道,每日还安排了专人解锁三次以上,情况有得到一定的缓解,有需要的小伙伴可自行按使用规范取用。
如遇锁定的,可等待统一更新解锁,另外挑个时间上来再试试,苹果官方有个规定不是同一个ID下载的软件是可以更新该软件的,需卸载重下,如果嫌以后更新软件不方便,和不想等待解锁的,也可以购买一个独享ID,自行修改好密保密码可长期稳定使用。
# IOS推荐下载:
Shadowrocket
Quantumult
Quantumult X
@FreddieOliveira
FreddieOliveira / docker.md
Last active June 14, 2024 17:41
This tutorial shows how to run docker natively on Android, without VMs and chroot.

Docker on Android 🐋📱

Edit 🎉

All packages, except for Tini have been added to termux-root. To install them, simply pkg install root-repo && pkg install docker. This will install the whole docker suite, left only Tini to be compiled manually.


Summary