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
class IPCameraView: UIView, NSURLSessionDataDelegate { | |
var imageView:UIImageView | |
var url: NSURL | |
var endMarkerData: NSData | |
var receivedData: NSMutableData | |
var dataTask: NSURLSessionDataTask | |
init(frame: CGRect) { |
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
#include <stdio.h> | |
#include "array_obj.h" | |
int main() | |
{ | |
// Allocate an array of 5 ints. | |
Array_new(xs, int, 5); | |
// Initialize elements using their indices. | |
xs.each_i(^(int x, int i) { xs.set(i, i); }); | |
// Print elements. |
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
#include <assert.h> | |
#include <stdlib.h> | |
#define Array_new(name, type, len) \ | |
typedef void(^name##_each)(type); \ | |
typedef void(^name##_each_i)(type, int); \ | |
\ | |
struct { \ | |
type *data; \ | |
size_t length; \ |
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
#!/usr/bin/env bash | |
# Use this one-liner to produce a JSON literal from the Git log: | |
git log \ | |
--pretty=format:'{%n "commit": "%H",%n "author": "%aN <%aE>",%n "date": "%ad",%n "message": "%f"%n},' \ | |
$@ | \ | |
perl -pe 'BEGIN{print "["}; END{print "]\n"}' | \ | |
perl -pe 's/},]/}]/' |