##Given Apache 2 and MySQL are already installed.
#Update MacPorts sudo port selfupdate;sudo port -u upgrade outdated
#Install PHP 5.4.* sudo port install php54 php54-apache2handler ##Activate Apache Module cd /opt/local/apache2/modules
data:text/html, <style type="text/css">#e{position:absolute;top:0;right:0;bottom:0;left:0;}</style><div id="e"></div><script src="http://d1n0x3qji82z53.cloudfront.net/src-min-noconflict/ace.js" type="text/javascript" charset="utf-8"></script><script>var e=ace.edit("e");e.setTheme("ace/theme/monokai");e.getSession().setMode("ace/mode/ruby");</script> |
expr -- (void)printf("[%s, %s]\n",(char *) object_getClassName(*(long*)($esp+4)), (char *) *(long *)($esp+8) ) |
// http://cocoawithlove.com/2009/10/ugly-side-of-blocks-explicit.html has a nice breakdown of the syntax--it helps to think of the ^ as similar to a pointer dereference symbol * | |
// block typedef: | |
typedef void(^Block)(); | |
typedef void(^ConditionalBlock)(BOOL); | |
typedef NSString*(^BlockThatReturnsString)(); | |
typedef NSString*(^ConditionalBlockThatReturnsString)(BOOL); | |
// block property with typedef: |
// | |
// UIImage+H568.m | |
// | |
// Created by Angel Garcia on 9/28/12. | |
// Copyright (c) 2012 angelolloqui.com. All rights reserved. | |
// | |
#import <objc/runtime.h> | |
@implementation UIImage (H568) |
-- Thirty minute timeout | |
with timeout of 108000 seconds | |
repeat while true | |
delay 5 | |
set baseurl to "https://developer.apple.com/devcenter/ios/index.action" | |
set curlshellcode to "curl " & baseurl | |
set theshellresult to do shell script curlshellcode | |
if theshellresult does not contain "maintenance" then | |
##Given Apache 2 and MySQL are already installed.
#Update MacPorts sudo port selfupdate;sudo port -u upgrade outdated
#Install PHP 5.4.* sudo port install php54 php54-apache2handler ##Activate Apache Module cd /opt/local/apache2/modules
@implementation NSURLConnection (Timeout) | |
+ (dispatch_queue_t)timeoutLockQueue { | |
static dispatch_queue_t queue; | |
static dispatch_once_t onceToken; | |
dispatch_once(&onceToken, ^{ | |
queue = dispatch_queue_create("timeout lock queue", DISPATCH_QUEUE_SERIAL); | |
}); | |
return queue; | |
} |
This gist assumes:
Awesome PHP has been relocated permanently to its own Github repository. No further updates will made to this gist.
Please open an issue for any new suggestions.
<?php | |
class BootstrapFormHelper extends AppHelper { | |
public $helpers = array('Html', 'Form'); | |
public function input($name, $options = array()) { | |
$default = array( | |
'type' => null, | |
'label' => null, | |
'before' => null, // to convert .input-prepend |