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
static inline void dispatchOncePersistent(NSString *prefsKey, void (^aBlock)()) | |
{ | |
if (![[NSUserDefaults standardUserDefaults] boolForKey:prefsKey]) { | |
[[NSUserDefaults standardUserDefaults] setBool:YES forKey:prefsKey]; | |
[[NSUserDefaults standardUserDefaults] synchronize]; | |
aBlock(); | |
} | |
} |
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
Thanks guys, with a little help from a friend I ended up fixing it by | |
setting on the pods project "Build active architechtures only" to no. and | |
then the standard architechtures for both the targets and the project. | |
Hope this helps someone. |
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
@interface LocalContact : NSObject | |
@property (nonatomic, copy) NSString *firstName; | |
@property (nonatomic, copy) NSString *lastName; | |
@property (nonatomic, copy, readonly) NSString *fullName; | |
@property (nonatomic, copy) NSString *mobileNumber; | |
@property (nonatomic, copy) NSString *normalizedMobileNumber; | |
@property (nonatomic, copy) NSString *facebookID; |
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
Please do not ACK my ACKs! | |
I already have stacks and stacks! | |
If you would be so kind, offer me some pork rind. | |
You see, I prefer snacks, not ACKs! | |
I have a yak. His name is Jack. | |
And when he walks, Jack makes tracks. | |
I follow his tracks to stacks of snacks. | |
But when you ACK my ACKs, all I see are stacks of ACKs. | |
I cannot see Jack's yak tracks! |
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 python | |
from os.path import getmtime | |
import sys, subprocess, time | |
import signal | |
usage = 'usage: autoreload "/bin/foo --bar" *.py' | |
try: | |
cmd = sys.argv[1] |
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
var scene, camera, renderer; | |
$(function () { | |
renderer = new THREE.WebGLRenderer(); | |
renderer.setPixelRatio(window.devicePixelRatio); | |
renderer.setSize(window.innerWidth, window.innerHeight); | |
renderer.shadowMapEnabled = true; | |
document.body.appendChild(renderer.domElement); |
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
/* | |
* This is a simple program to run Node.js as the | |
* specified user and in a chroot. | |
* | |
* BUILD: | |
* gcc -o chrooted-node chrooted-node.c | |
* | |
* USE: | |
* sudo chrooted-node <as-user> <chroot-dir> <file.js> | |
* |
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
/** | |
* Tries to create the directories of the given path | |
* if they do not exist already. | |
*/ | |
this.mkpath = function(path, mode) { | |
var parts = path.split('/'); | |
if (!parts || parts.length == 0) | |
return; | |
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
// Process files in optimally-sized chunks without | |
// reading the entire file into memory. | |
var posix = require("posix"); | |
this.FileOpenError = function (path, message) { | |
this.message = message || "failed to open file"; | |
this.path = path; | |
}; |
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
GLOBAL.import_package = function(name) { | |
var package = {}; | |
require("posix").readdir(name).wait() | |
.filter(function (filename) { | |
return filename.match(/^(.+)\.js$/); | |
}) | |
.forEach(function (filename) { | |
var basename = filename.split(/^(.+)\.js$/)[1]; | |
package[basename] = require("./" + name + "/" + basename); | |
}); |
OlderNewer