Skip to content

Instantly share code, notes, and snippets.

@icodesign
icodesign / CurrentTimeView.swift
Created Mar 18, 2021
Display Current Time in iOS Widget
View CurrentTimeView.swift
import Foundation
import SwiftUI
public struct CurrentTimeView: View {
public enum Component {
case hour
case minute
case second
}
View translate.toml
basepath = "Cuto"
locales = [
"de",
"en",
"es",
"fr",
"it",
"ja",
"ko",
@icodesign
icodesign / help.js
Last active Jul 23, 2019
iTunes Connect TestFlight Auto Scroll
View help.js
function help() {
var count = 0;
var total = 40;
var id = setInterval(scroll, 10000);
scroll();
function scroll() {
console.log("scrolling to bottom: " + count);
if (count === total) {
clearInterval(id);
} else {
View vpnmanager.log
Aug 2 13:21:16 Lei-iPhone7 OnionNetwork[23856] <Notice>: switch vpn: (null)
Aug 2 13:21:16 Lei-iPhone7 nesessionmanager(NetworkExtension)[130] <Notice>: NESMVPNSession[Onion Knight:CFF87D48-CABA-4FD9-9EB4-1C603E31E1D5]: Received a start command from OnionNetwork[23856]
Aug 2 13:21:16 Lei-iPhone7 nesessionmanager(NetworkExtension)[130] <Notice>: NESMVPNSession[Onion Knight:CFF87D48-CABA-4FD9-9EB4-1C603E31E1D5]: status changed to connecting
Aug 2 13:21:16 Lei-iPhone7 sharingd(CoreUtils)[2251] <Notice>: Linger advertise ended
Aug 2 13:21:16 Lei-iPhone7 sharingd(CoreUtils)[2251] <Notice>: BLE NearbyInfo advertiser stop
Aug 2 13:21:16 Lei-iPhone7 sharingd(CoreUtils)[2251] <Notice>: Invalidating
Aug 2 13:21:16 Lei-iPhone7 sharingd(WirelessProximity)[2251] <Notice>: NearBy stop advertising of type: 16
Aug 2 13:21:16 Lei-iPhone7 sharingd(CoreUtils)[2251] <Notice>: Invalidated
Aug 2 13:21:16 Lei-iPhone7 wirelessproxd[55] <Notice>: Stop advertising for process sharingd (2251) of type 16
Aug 2 13:21:16 Lei-iPh
View VPNManager.m
#import "VPNManager.h"
#import <NetworkExtension/NetworkExtension.h>
NSString * const VPNManagerStatusDidChanged = @"VPNManagerStatusDidChanged";
@interface VPNManager ()
@property (nonatomic) NEVPNStatus status;
@end
@implementation VPNManager
View large_potatso.conf
[RULESET.proxy]
name = "代理规则"
rules = [
"DOMAIN-SUFFIX, 1e100.net, Proxy",
"DOMAIN-SUFFIX, abc.xyz, Proxy",
"DOMAIN-SUFFIX, admob.com, Proxy",
"DOMAIN-SUFFIX, ampproject.org, Proxy",
"DOMAIN-SUFFIX, amazon.com, Proxy",
"DOMAIN-SUFFIX, android.com, Proxy",
"DOMAIN-SUFFIX, androidify.com, Proxy",
View potatso_test.conf
[PROFILE.default]
name = "Sample Profile1"
dns = [
"8.8.8.8",
"223.5.5.5"
]
defaultRoute = "PROXY"
defaultProxy = "ssr"
rulesets = [
"direct",
View tf.py
#coding: utf-8
# Please install [fastlane](https://github.com/fastlane/fastlane) first.
import os
bundle_identifier = "xxx"
itunes_user = "yyy"
emails = """
a@gmail.com
b@gmail.com
View gist:6e0c2fde13e27413e257d2c8d1058dfa
ruleSets:
#
# Potatso Config File [UPlus]
# Last Modified: 2016/07/04
#
- name: UPlus-nogeoip
rules:
# Default
- DOMAIN-SUFFIX,apple.com,DIRECT
- DOMAIN-SUFFIX,icloud.com,DIRECT
View gist:9a16eecbd2679866b9b0
ruleSets:
- name: Tiny Config
rules:
- DOMAIN-SUFFIX,xda-developers.com,Proxy
- DOMAIN-SUFFIX,xeeno.com,Proxy
- DOMAIN-SUFFIX,xiti.com,Proxy
- DOMAIN-SUFFIX,yahoo.com,Proxy
- DOMAIN-SUFFIX,yimg.com,Proxy
- DOMAIN-SUFFIX,ying.com,Proxy
- DOMAIN-SUFFIX,youtu.be,Proxy