This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// | |
// SmartPointer.h | |
// MemoryDemo | |
// | |
// Created by HangChen on 5/5/15. | |
// Copyright (c) 2015 HangChen. All rights reserved. | |
// | |
#ifndef __MemoryDemo__SmartPointer__ | |
#define __MemoryDemo__SmartPointer__ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/// Dart is built around a timer, which basically schedules functions in a queue. | |
/// The Future class is essentially just sugar on top of the event loop. | |
/// To help people understand what the event loop actually does, I have written code which implements the event loop. | |
/// See https://www.dartlang.org/articles/event-loop/ for more information. | |
import "dart:async"; | |
class EventLoop { | |
/// Function Queue. | |
static final List<Function> queue = []; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
from Foundation import NSData, NSPropertyListSerialization | |
import fnmatch | |
import sys | |
from zipfile import ZipFile | |
# TODO: Add error checking. | |
def parse_plist(info_plist_string): |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var readline = require('readline'), | |
fs = require('fs'); | |
var LinkMap = function(filePath) { | |
this.files = [] | |
this.filePath = filePath | |
} | |
LinkMap.prototype = { | |
start: function(cb) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/// Observes a run loop to detect any stalling or blocking that occurs. | |
/// | |
/// This class is thread-safe. | |
@interface GHRunLoopWatchdog : NSObject | |
/// Initializes the receiver to watch the specified run loop, using a default | |
/// stalling threshold. | |
- (id)initWithRunLoop:(CFRunLoopRef)runLoop; | |
/// Initializes the receiver to detect when the specified run loop blocks for |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#pragma mark - Magic | |
// Need for supporting orientation when not supported in host app plist. | |
// Swizzle original -application:supportedInterfaceOrientationsForWindow: to change supported orientation in runtime. | |
-(void) swizzleSupportedInterfaceOrientationsForWindow | |
{ | |
Class applicationDelegateClass = [[UIApplication sharedApplication].delegate class]; | |
Class sdkClass = [self class]; | |
SEL originalSelector = @selector(application:supportedInterfaceOrientationsForWindow:); | |
SEL swizzledSelector = @selector(las_application:supportedInterfaceOrientationsForWindow:); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
NEW_VER="0.33.1" | |
POD_VER=`pod --version 2>/dev/null`|| POD_VER=`~/.rbenv/shims/pod --version 2>/dev/null` | |
if [[ "$POD_VER" != *$NEW_VER ]]; then | |
echo "error: WTF! You MUST upgrade cocoapods!!!" | |
exit 1 | |
fi |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#define NSNullObjects @[@"",@0,@{},@[]] | |
@interface NSNull (InternalNullExtention) | |
@end | |
@implementation NSNull (InternalNullExtention) | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
################################################################################ | |
# | |
# Script name: MultiMedia Concat Script (mmcat) | |
# Author: burek ([email protected]) | |
# License: GNU/GPL, see http://www.gnu.org/copyleft/gpl.html | |
# Date: 2012-07-14 | |
# | |
# This script concatenates (joins, merges) several audio/video inputs into one |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
########################################################################### | |
# Choose your ffmpeg version and your currently-installed iOS SDK version: | |
# | |
VERSION="2.0.2" | |
SDKVERSION="7.0" | |
ARCHS="armv7 armv7s i386" | |
# | |
# |
NewerOlder