Skip to content

Instantly share code, notes, and snippets.

View eldesperado's full-sized avatar
😁
I am busy being happy

Trung Pham eldesperado

😁
I am busy being happy
View GitHub Profile
@eldesperado
eldesperado / !README.md
Created June 8, 2018 09:20 — forked from mayoff/!README.md
Debugging Objective-C blocks in lldb

The attached lldb command pblock command lets you peek inside an Objective-C block. It tries to tell you where to find the source code for the block, and the values captured by the block when it was created.

Consider this example program:

#import <Foundation/Foundation.h>

@interface Foo: NSObject
@end

@implementation Foo

//
// ViewController.m
// AVPlayerCaching
//
// Created by Anurag Mishra on 5/19/14.
// Sample code to demonstrate how to cache a remote audio file while streaming it with AVPlayer
//
#import "ViewController.h"
#import <AVFoundation/AVFoundation.h>
I found a few examples over the internet, enjoy:
http://qthttp.apple.com.edgesuite.net/1010qwoeiuryfg/sl.m3u8
http://devimages.apple.com/iphone/samples/bipbop/bipbopall.m3u8
http://devimages.apple.com/iphone/samples/bipbop/gear1/prog_index.m3u8
http://playertest.longtailvideo.com/adaptive/oceans_aes/oceans_aes.m3u8 (AES encrypted)
http://playertest.longtailvideo.com/adaptive/captions/playlist.m3u8 (HLS stream with CEA-608 captions)
http://playertest.longtailvideo.com/adaptive/wowzaid3/playlist.m3u8 (with metadata)
http://content.jwplatform.com/manifests/vM7nH0Kl.m3u8
http://cdn-fms.rbs.com.br/hls-vod/sample1_1500kbps.f4v.m3u8
@eldesperado
eldesperado / introrx.md
Created August 2, 2016 11:57 — forked from staltz/introrx.md
The introduction to Reactive Programming you've been missing

Keybase proof

I hereby claim:

  • I am eldesperado on github.
  • I am trung (https://keybase.io/trung) on keybase.
  • I have a public key whose fingerprint is B924 9FD7 D8BA 29B5 487E AD1C CDEC B9F5 4D9F 4BB5

To claim this, I am signing this object:

@eldesperado
eldesperado / react_native_bundle_xcode
Created May 9, 2016 05:00
Bundle React Native code and images
if [ "${CONFIGURATION}" = "Release" ]; then
# https://github.com/facebook/react-native/issues/4289
echo "DELETING CACHED DATA FOR RELEASE"
rm -rf $TMPDIR/react-*
fi
./node_modules/react-native/packager/react-native-xcode.sh
@eldesperado
eldesperado / .bash_profile
Created May 5, 2016 03:39 — forked from natelandau/.bash_profile
Mac OSX Bash Profile
# ---------------------------------------------------------------------------
#
# Description: This file holds all my BASH configurations and aliases
#
# Sections:
# 1. Environment Configuration
# 2. Make Terminal Better (remapping defaults and adding functionality)
# 3. File and Folder Management
# 4. Searching
# 5. Process Management
@eldesperado
eldesperado / Results+Rx.swift
Created February 26, 2016 08:21 — forked from fpillet/Results+Rx.swift
turn Realm auto-updating Results into an RxSwift Observable sequence
//
// Results+Rx.swift
//
// Make Realm auto-updating Results observable. Works with Realm 0.98 and later, RxSwift 2.1.0 and later.
//
// Created by Florent Pillet on 12/02/16.
// Copyright (c) 2016 Florent Pillet. All rights reserved.
//
import Foundation
@eldesperado
eldesperado / Breakpoints_v2.xcbkptlist
Created December 25, 2015 07:45 — forked from Ashton-W/Breakpoints_v2.xcbkptlist
My User Breakpoints_v2.xcbkptlist
<?xml version="1.0" encoding="UTF-8"?>
<Bucket
type = "2"
version = "2.0">
<Breakpoints>
<!-- All Exceptions -->
<BreakpointProxy
BreakpointExtensionID = "Xcode.Breakpoint.ExceptionBreakpoint">
<BreakpointContent
@eldesperado
eldesperado / UIView+IBInspectable.swift
Created December 17, 2015 15:27
Set Border + Corner Radius for View
extension UIView {
@IBInspectable
var cornerRadius: CGFloat {
get {
return layer.cornerRadius
}
set {
layer.cornerRadius = newValue
}