Skip to content

Instantly share code, notes, and snippets.

@Sorix
Sorix / AsynchronousOperation.swift
Last active May 22, 2024 07:15
Subclass of NSOperation (Operation) to make it asynchronous in Swift 3, 4, 5
// Created by Vasily Ulianov on 09.02.17, updated in 2019.
// License: MIT
import Foundation
/// Subclass of `Operation` that adds support of asynchronous operations.
/// 1. Call `super.main()` when override `main` method.
/// 2. When operation is finished or cancelled set `state = .finished` or `finish()`
open class AsynchronousOperation: Operation {
public override var isAsynchronous: Bool {

FWIW: I (@rondy) am not the creator of the content shared here, which is an excerpt from Edmond Lau's book. I simply copied and pasted it from another location and saved it as a personal note, before it gained popularity on news.ycombinator.com. Unfortunately, I cannot recall the exact origin of the original source, nor was I able to find the author's name, so I am can't provide the appropriate credits.


Effective Engineer - Notes

What's an Effective Engineer?

@heroicyang
heroicyang / ios_resources.json
Created October 9, 2013 02:33
GitHub 上的 iOS 开源项目
var githubList = [
{
name:'系统基础库',
list: [
{name:'Category/Util',
list: [
{name:'sstoolkit', owner:'soffes', desc:'一套Category类型的库,附带很多自定义控件 功能不错~'},
{name:'BlocksKit', owner:'pandamonia', desc:'将Block风格带入UIKit和Founcation'},
{name:'cocoa-helpers', owner:'enormego', desc:'一些Cocoa的扩展 2年前的工程'},
@dypsilon
dypsilon / frontendDevlopmentBookmarks.md
Last active June 5, 2024 06:45
A badass list of frontend development resources I collected over time.
@wobbals
wobbals / AvcEncoder.java
Created October 31, 2012 22:46
MediaCodec encoder sample
package com.opentok.media.avc;
import java.io.IOException;
import java.nio.ByteBuffer;
import android.media.MediaCodec;
import android.media.MediaCodecInfo;
import android.media.MediaFormat;
public class AvcEncoder {