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
// gcc test.m -o test -framework Foundation | |
#import <Foundation/Foundation.h> | |
#define safeblock(block) ((typeof(block))(block ? ((id)block) : ((id)^{}))) | |
int main() { | |
void (^block)(NSString *) = ^(NSString *anArgument){ | |
NSLog(@"Hello %@", anArgument); | |
}; | |
safeblock(block)(@"world"); |
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
// clang -o test test.m -framework Foundation | |
#import <Foundation/Foundation.h> | |
@interface Forwarder : NSObject { | |
@package; | |
id destination; | |
} | |
@end |
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 FRLog(format,...) \ | |
NSLog(@"%@:%i:%s" format, \ | |
[[NSString stringWithUTF8String:__FILE__] lastPathComponent], \ | |
__LINE__, __PRETTY_FUNCTION__, ##__VA_ARGS__) |
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
{ | |
"url":"/some/url/", | |
"type":"POST", | |
"isLocal":false, | |
"global":true, | |
"processData":true, | |
"async":true, | |
"contentType":"application/x-www-form-urlencoded; charset=UTF-8", | |
"accepts":{ | |
"*":"*/*", |
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
{ | |
"rooms": [ | |
{ | |
"name": "Z", | |
"north": "D", | |
"east": "B", | |
"south": null, | |
"west": null | |
}, | |
{ |
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
{ | |
"rooms": [ | |
{ | |
"name": "C", | |
"north": null, | |
"east": null, | |
"south": null, | |
"west": "B" | |
}, | |
{ |
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
{ | |
"rooms": [ | |
{ | |
"name": "A", | |
"north": "DD", | |
"east": "BB", | |
"south": null, | |
"west": null | |
}, | |
{ |
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
RSA="${HOME}/.ssh/id_rsa" | |
PUB="${RSA}.pub" | |
if ! [ -f "${RSA}" ] && ! [ -f "${PUB}" ]; then | |
/usr/bin/ssh-keygen -q -t rsa -N "" -f "${RSA}" | |
fi | |
/bin/cat "${PUB}" | /usr/bin/pbcopy |
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
'use strict'; | |
var gulp = require('gulp'); | |
var path = require('path'); | |
var es = require('event-stream'); | |
var $ = require('gulp-load-plugins')(); | |
var _ = require('lodash'); | |
var SERVER_PORT = process.env.PORT || 9000; | |
var LIVERELOAD_PORT = process.env.LIVERELOAD_PORT || 35729; |
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
/** | |
* Copyright (c) 2014 Petka Antonov | |
* | |
* Permission is hereby granted, free of charge, to any person obtaining a copy | |
* of this software and associated documentation files (the "Software"), to deal | |
* in the Software without restriction, including without limitation the rights | |
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | |
* copies of the Software, and to permit persons to whom the Software is | |
* furnished to do so, subject to the following conditions:</p> | |
* |
OlderNewer