Skip to content

Instantly share code, notes, and snippets.

Avatar
🍎

ZhgChgLi zhgchgli0718

🍎
View GitHub Profile
View index.js
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
View redirect.py
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'
View call_directory_extension_1.swift
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 {
//未啟用