Skip to content

Instantly share code, notes, and snippets.

View EyreFree's full-sized avatar
🔞
PornHub now...

EyreFree EyreFree

🔞
PornHub now...
View GitHub Profile
@EyreFree
EyreFree / github.css
Created August 25, 2017 04:31 — forked from tuzz/github.css
Github Markdown Stylesheet
body {
font-family: Helvetica, arial, sans-serif;
font-size: 14px;
line-height: 1.6;
padding-top: 10px;
padding-bottom: 10px;
background-color: white;
padding: 30px;
color: #333;
}
@EyreFree
EyreFree / GCDCancelableDelayCall.swift
Created July 19, 2017 06:58
GCDCancelableDelayCall
import Foundation
class GCDDelayTask: NSObject {
typealias DelayTask = (_ cancel: Bool) -> Void
var pendingTask: DelayTask?
/// 延时执行
func delay(time: TimeInterval, task: @escaping () -> ()) {
@EyreFree
EyreFree / printLog
Last active July 19, 2017 06:59
printLog.swift
import Foundation
func printLog<T>(_ message: T,
file: String = #file,
method: String = #function,
line: Int = #line)
{
#if DEBUG
print("\((file as NSString).lastPathComponent)[\(line)], \(method): \(message)")
#endif
@EyreFree
EyreFree / CIImage+.swift
Last active April 27, 2020 04:47
iOS CIImage Replace color with another one in Swift 3.1
import Foundation
struct EFUIntPixel {
var red: UInt8 = 0
var green: UInt8 = 0
var blue: UInt8 = 0
var alpha: UInt8 = 0
}
extension CIImage {