Skip to content

Instantly share code, notes, and snippets.

View zhgchgli0718's full-sized avatar
🍎

ZhgChgLi zhgchgli0718

🍎
View GitHub Profile
@zhgchgli0718
zhgchgli0718 / code.gs
Created March 10, 2024 06:49
[POC] Notion Database to Calendar (.ics)
// Constant variables
const notionToken = "XXXXX";
const safeToken = "XXXXX";
function doGet(e) {
const ics = HtmlService.createTemplateFromFile('ics');
if (e.parameter.token != safeToken) {
return ContentService.createTextOutput("Access Denied!");
}
@zhgchgli0718
zhgchgli0718 / Fastfile
Created April 20, 2023 04:29
A simply extend the Fastlane Action to enable downloading the uploaded Universal APK from the Google Play Console.
lane :test do | options |
apk_downloader(json_key: "./xxx@xxx.iam.gserviceaccount.com.json", package_name: "m.zhgchg.li", version_code:1000, export_file_path: "./zhgchgli.apk")
end
const functions = require('firebase-functions');
const admin = require('firebase-admin');
const express = require('express');
const cors = require('cors');
const app = express();
admin.initializeApp();
app.use(cors({ origin: true }));
// Distributed counters Like Post
from mitmproxy import http
def request(flow: http.HTTPFlow) -> None:
# pretty_host takes the "Host" header of the request into account,
# which is useful in transparent mode where we usually only have the IP
# otherwise.
# 請求參數設定 Example:
flow.request.headers['User-Agent'] = 'MitmProxy'
import CallKit
//
//......
//
if #available(iOS 10.0, *) {
CXCallDirectoryManager.sharedInstance.getEnabledStatusForExtension(withIdentifier: "這裡輸入call directory extension的bundle identifier", completionHandler: { (status, error) in
if status == .enabled {
//啟用中
} else if status == .disabled {
//未啟用