Skip to content

Instantly share code, notes, and snippets.

I may be slow to respond.

fengxing annidy

I may be slow to respond.
View GitHub Profile
nazgob / ctags.setup
Created Jan 6, 2012
ctags setup on mac
View ctags.setup
# you have ctags but it does not work...
$ ctags -R --exclude=.git --exclude=log *
ctags: illegal option -- R
usage: ctags [-BFadtuwvx] [-f tagsfile] file ...
#you need to get new ctags, i recommend homebrew but anything will work
$ brew install ctags
#alias ctags if you used homebrew
$ alias ctags="`brew --prefix`/bin/ctags"
fousa / FairPlayer.swift
Last active Jul 14, 2020
Integrate HLS with FairPlay.
View FairPlayer.swift
class FairPlayer: AVPlayer {
private let queue = DispatchQueue(label: "com.icapps.fairplay.queue")
func play(asset: AVURLAsset) {
// Set the resource loader delegate to this class. The `resourceLoader`'s delegate will be
// triggered when FairPlay handling is required.
asset.resourceLoader.setDelegate(self, queue: queue)
// Load the asset in the player.
niw /
Last active May 4, 2020
How to extract dylib from shared cache

How to extract dylib from shared cache

To understand iOS behaviors, sometimes it’s important to disassemble iOS framework binaries.

Since recent iOS firmware, known as .ipsw file, contains non-encrypted root image, it’s easy to access these binaries. However, each framework binaries, dylib files, are placed in a shared cache file.

Thus, before disassembling it, we need to extract the one from the cache.

roxlu / YUV420PGrabber.cpp
Created Jul 2, 2013
OpenGL RGB > YUV420P shader/class (doesn't do much more. implementation/usage is up to you)
View YUV420PGrabber.cpp
#include <assert.h>
#include <roxlu/core/Utils.h>
#include <roxlu/core/Log.h>
#include "YUV420PGrabber.h"
syzdek / cli-nsrunloop.m
Created Jul 31, 2012
Creating an NSRunLoop for a command line utility.
View cli-nsrunloop.m
#import <Foundation/Foundation.h>
int main(int argc, const char * argv[])
NSRunLoop * runLoop;
CLIMain * main; // replace with desired class
// create run loop
trawor /
Last active May 19, 2019
# 通过对比 ping 响应时间,找到本机最快的上传ip
# 使用方法:
# sh -c "$(curl -sSL"
echo "# 这个脚本理论上可以帮你获取任意域名的最快速的IP"
echo "# 获取IP列表的服务由 提供, 非常感谢有这么好的免费服务!"
You can’t perform that action at this time.