Skip to content

Instantly share code, notes, and snippets.

View FrizzleFur's full-sized avatar
🎨

MichaelMao FrizzleFur

🎨
View GitHub Profile
import Foundation
import Combine
protocol Resumable {
func resume()
}
extension Subscribers {
class ResumableSink<Input, Failure: Error>: Subscriber, Cancellable, Resumable {
let receiveCompletion: (Subscribers.Completion<Failure>) -> Void
@CaiJingLong
CaiJingLong / app.dart
Last active December 28, 2021 13:09
不随系统字体大小发生变化
import 'package:flutter/material.dart';
import 'scale_text_widget.dart';
class MyApp extends StatefulWidget {
@override
_MyAppState createState() => _MyAppState();
}
class _MyAppState extends State<MyApp> {
@override
@ian-mcdowell
ian-mcdowell / DebuggingOverlay.m
Last active February 27, 2021 19:04
UIDebuggingInformationOverlay for iOS 10, 11, and 12
#import <objc/runtime.h>
@interface DebuggingOverlay: NSObject
@end
@implementation DebuggingOverlay
+ (void)toggleOverlay {
id debugInfoClass = NSClassFromString(@"UIDebuggingInformationOverlay");
@mcxiaoke
mcxiaoke / StringExtensions.swift
Created August 24, 2016 06:27
replace for Swift String (include replaceFirst and replaceAll), in Swift 3
import Foundation
extension String {
public func replaceFirst(of pattern:String,
with replacement:String) -> String {
if let range = self.range(of: pattern){
return self.replacingCharacters(in: range, with: replacement)
}else{
return self
@lopspower
lopspower / README.md
Last active January 7, 2026 17:41
Hexadecimal color code for transparency

Hexadecimal color code for transparency

Twitter

How to set transparency with hex value ?

For example, you want to set 40% alpha transparence to #000000 (black color), you need to add 66 like this #66000000.

All hex value from 100% to 0% alpha: