with mysql pgsql intl support
$ brew install php --with-apache --with-mysql --with-pgsql --with-intl
date.timezone = Europe/Vienna
if ($request_uri = /) { | |
set $test A; | |
} | |
if ($host ~* teambox.com) { | |
set $test "${test}B"; | |
} | |
if ($http_cookie !~* "auth_token") { | |
set $test "${test}C"; |
$ ./executable-with-subcommands-using-thor.rb | |
Tasks: | |
executable-with-subcommands-using-thor.rb help [TASK] # Describe available tasks or one specific task | |
executable-with-subcommands-using-thor.rb subA [TASK] # Execute a task in namespace subA | |
executable-with-subcommands-using-thor.rb subB [TASK] # Execute a task in namespace subB | |
executable-with-subcommands-using-thor.rb test # test in CLI | |
$ ./executable-with-subcommands-using-thor.rb help | |
Tasks: | |
executable-with-subcommands-using-thor.rb help [TASK] # Describe available tasks or one specific task |
<?php | |
$p = proc_open("/bin/nc -l -p 11111", array (STDIN, array("pipe", "w"), array("file", "/dev/null", 'w')), $pipes); | |
while (1) { | |
$read = array($pipes[1]); | |
$write = $except = null; | |
stream_select($read, $write, $except, 2); | |
echo fgets($pipes[1]); | |
} |
- (void)viewDidLoad | |
{ | |
[super viewDidLoad]; | |
UIScrollView* sv = nil; | |
for(UIView* v in self.webView.subviews){ | |
if([v isKindOfClass:[UIScrollView class] ]){ | |
sv = (UIScrollView*) v; | |
sv.bounces = NO; | |
} | |
} |
# Quick and dirty script to read unique IDs from NFC tags using the ACR122U USB | |
# reader. | |
# | |
# PC/SC-based API details for the ACR122U available at | |
# http://acs.com.hk/drivers/eng/API_ACR122U_v2.01.pdf | |
# | |
# Assumes ruby >= 1.9.2 | |
# `gem install smartcard` first | |
# |
// set-up a connection between the client and the server | |
var socket = io.connect(); | |
// let's assume that the client page, once rendered, knows what room it wants to join | |
var room = "abc123"; | |
socket.on('connect', function() { | |
// Connected, let's sign-up for to receive messages for this room | |
socket.emit('room', room); | |
}); |
Locate the section for your github remote in the .git/config
file. It looks like this:
[remote "origin"]
fetch = +refs/heads/*:refs/remotes/origin/*
url = git@github.com:joyent/node.git
Now add the line fetch = +refs/pull/*/head:refs/remotes/origin/pr/*
to this section. Obviously, change the github url to match your project's URL. It ends up looking like this:
<?php | |
if ($this['debug']) { | |
$logger = new DebugStack(); | |
$this->extend('doctrine_orm.configuration', function(Configuration $configuration) use ($logger) { | |
$configuration->setSQLLogger($logger); | |
return $configuration; | |
}); |
<?php | |
// Acme\DemoBundle\Twig\GravatarExtension | |
namespace Acme\DemoBundle\Twig; | |
class GravatarExtension extends \Twig_Extension | |
{ | |
private $secure_request = false; |