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
// Merged other forks and updated to Swift 2.0.
// Original code:
// https://gist.github.com/haipham/d169cdea2f28222db7f3
// http://stackoverflow.com/questions/24007129/how-does-one-generate-a-random-number-in-apples-swift-language
// https://gist.github.com/pontusarmini/169bc5b3c3fc552a4c3d
import Foundation
import CoreGraphics
// Suppress a warning
@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 / 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 / .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 / introrx.md
Created August 2, 2016 11:57 — forked from staltz/introrx.md
The introduction to Reactive Programming you've been missing
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
//
// 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>
@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