This file contains 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
// Source: https://devforums.apple.com/message/866487#866487 | |
typedef int (*PYStdWriter)(void *, const char *, int); | |
static PYStdWriter _oldStdWrite; | |
int __pyStderrWrite(void *inFD, const char *buffer, int size) | |
{ | |
if ( strncmp(buffer, "AssertMacros: queueEntry", 24) == 0 ) { | |
return 0; |
This file contains 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 | |
############################################################################### | |
## ## | |
## Build and package OpenSSL static libraries for OSX/iOS ## | |
## ## | |
## This script is in the public domain. ## | |
## Creator : Laurent Etiemble ## | |
## ## | |
############################################################################### |
This file contains 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
// = Requirements: freetype 2.5, libpng, libicu, libz, libzip2 | |
// = How to compile: | |
// % export CXXFLAGS=`pkg-config --cflags freetype2 libpng` | |
// % export LDFLAGS=`pkg-config --libs freetype2 libpng` | |
// % clang++ -o clfontpng -static $(CXXFLAGS) clfontpng.cc $(LDFLAGS) \ | |
// -licuuc -lz -lbz2 | |
#include <cassert> | |
#include <cctype> | |
#include <iostream> | |
#include <memory> |
This file contains 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
import UIKit | |
import QuartzCore | |
class ViewController: UIViewController { | |
@IBOutlet weak var label: UILabel | |
@IBOutlet weak var counter: UILabel | |
override func viewDidLoad() { | |
super.viewDidLoad() |
This file contains 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
import Foundation | |
let argumentCount = Int(C_ARGC) | |
var argumentArray: Array<String> = Array<String>() | |
for index in 0..argumentCount { | |
argumentArray.append(String.fromCString(C_ARGV[index])) | |
} |
This file contains 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
import Foundation | |
extension Array { | |
/** | |
* Get first item in array. | |
* | |
* @return First item in array. | |
*/ | |
This file contains 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
//////////////////////////////////////////////// | |
// | |
// Swift and Objective-C Class Parsing | |
// | |
//////////////////////////////////////////////// | |
import Foundation | |
// Class parsing |
This file contains 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
// | |
// explore.swift | |
// CmdLineTest | |
// | |
// Created by Erica Sadun on 6/25/14. | |
// Copyright (c) 2014 Erica Sadun. All rights reserved. | |
// | |
import Foundation |
This file contains 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
// Here we'll use Swift's IDE-supporting reflect() | |
// function to build a basic JSON serializer. | |
// Per the fine engineers at WWDC, Swift's reflection support | |
// exists purely to support the IDE and the Playground. But | |
// we can have some fun with it anyway. ;) | |
class SerializerBase { | |
} |
This file contains 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
// Playground - noun: a place where people can play | |
// | |
// | |
// By: Hooman Mehr (hooman@mac.com) | |
// Gist: https://gist.github.com/hooman/599e381d5f037b87d20b (The latest version is always here) | |
// | |
// | |
// Update: 07/30/2014 | |
// Added WeaklyOwned & removeOrphans for memory management support, added more generics & basic access control. | |
// 08/06/2014 |