This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//: Playground - noun: a place where people can play | |
import Cocoa | |
import CoreGraphics | |
//: Sample input: `100, 100, 200, 200, 300, 300` | |
let inputFilepath = "/Users/unixzii/Desktop/test.csv" | |
let outputFilepath = "/Users/unixzii/Desktop/test.png" | |
func pointsFromSequence(sequence: String) -> [CGPoint]? { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//: 理解 Debouncing 与 Throttling 的区别 | |
import Cocoa | |
import PlaygroundSupport | |
typealias Action = () -> () | |
func debounce(threshold: TimeInterval, action: @escaping Action) -> Action { | |
var timer: DispatchSourceTimer? | |
return { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
import ( | |
"flag" | |
"fmt" | |
"io/ioutil" | |
"net/http" | |
"strconv" | |
"strings" | |
"sync/atomic" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#import <Foundation/Foundation.h> | |
void strrev(char *str) { | |
size_t start = 0; | |
size_t end = start + strlen(str) - 1; | |
while (start < end) { | |
char ch = str[start]; | |
str[start++] = str[end]; | |
str[end--] = ch; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
__asm__( | |
".code16gcc\n" | |
"jmpl $0, $main\n" | |
); | |
static const char * const msg = "Hello, world!"; | |
void char_out(const char ch) { | |
__asm__( | |
"mov $0x0e, %%ah\n" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{"app_name":"SpringBoard","timestamp":"2019-09-07 00:26:01.40 +0800","app_version":"1.0","slice_uuid":"b1aecb6e-b0b1-352a-8400-d3ce659bcfa3","adam_id":0,"build_version":"50","bundleID":"com.apple.springboard","share_with_app_devs":false,"is_first_party":true,"bug_type":"109","os_version":"iPhone OS 13.1 (17A5821e)","incident_id":"1F205275-658C-4890-8E53-3433F5E2EAAE","name":"SpringBoard"} | |
Incident Identifier: 1F205275-658C-4890-8E53-3433F5E2EAAE | |
CrashReporter Key: 3b413ac1ea415b52a66c713dc330c82e87bddb37 | |
Hardware Model: iPhone11,2 | |
Process: SpringBoard [2939] | |
Path: /System/Library/CoreServices/SpringBoard.app/SpringBoard | |
Identifier: com.apple.springboard | |
Version: 50 (1.0) | |
Code Type: ARM-64 (Native) | |
Role: Foreground |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[custom] | |
enable_rule_generator=true | |
overwrite_original_rules=true | |
# 白名单模式 PROXY,黑名单模式 DIRECT | |
custom_proxy_group=🧭Final`select`[]🌑Proxy`[]🌐Direct | |
# 节点选项 | |
custom_proxy_group=🌑Proxy`select`[]🧯Fallback`[]🕹AutoTest`.* | |
# 国际流媒体服务 | |
custom_proxy_group=🎞Streaming`select`[]🌑Proxy`[]🕹AutoTest`.* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// | |
// HackingTextTransition.swift | |
// Copyright (c) 2022 Cyandev<[email protected]>. | |
// | |
import Foundation | |
import DequeModule | |
class HackingTextTransition { | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#import <dlfcn.h> | |
void sendMessageToDock(NSString *message) { | |
static dispatch_once_t onceToken; | |
static void (*ptrCoreDockSendNotification)(CFStringRef, int) = NULL; | |
dispatch_once(&onceToken, ^{ | |
void *handle = dlopen("/System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/HIServices.framework/Versions/A/HIServices", RTLD_LAZY); | |
if (!handle) { | |
return; | |
} |
OlderNewer