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
<?php | |
/** | |
* | |
*/ | |
$dt0 = '2010-02-01 00:02:33'; | |
$dt1 = '2011-02-01 00:02:33'; | |
$dt2 = '2012-02-01 00:02:33'; | |
var_dump($dt1 - $dt0); // int(1) | |
var_dump($dt1 - $dt2); // int(-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
$ phpdoc -s on -i "$(echo Ethna-2.6.0beta2011102522/test/**/*(:t) Ethna-2.6.0beta2011102522/skel/**/*(:t) | tr ' ' ',' )" -t doc -d Ethna-2.6.0beta2011102522 -o HTML:frames:earthli.utf8 -ti Ethna |
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
<?php | |
/** | |
* | |
* @forked https://gist.github.com/1298503 | |
*/ | |
require_once 'behat/autoload.php'; | |
use Symfony\Component\Console\Input\ArrayInput; | |
use Symfony\Component\Console\Output\ConsoleOutput; |
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
{# | |
# ref: PaginatorBudnel:Pagination:sliding.html.twig | |
# with twitter bootstrap | |
#} | |
{% if pageCount > 1 %} | |
<div class="pagination"> | |
<ul> | |
{% if first is defined and current != first %} |
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
<?php | |
/** | |
* Usage: | |
* | |
* $ php t.php 1324393200 | |
* => 2011-12-20 15:00:00 | |
* $ php t.php 1324393200 'Asia/Tokyo' | |
* => 2011-12-21 00:00:00 | |
* $ php t.php '2011-12-21 00:00:00' | |
* => 1324393200 |
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
#!/bin/bash | |
PID=$(ps ax | grep Growl.app | grep -v grep | awk '{print $1};') | |
test -z "$PID" && open -j -a Growl && echo "Growl restarted on $(date) :: pid not found ($PID)" >> /tmp/growl_restart.log && exit | |
CPU_USAGE=$(top -pid $PID -l 2 -s 5 -stats cpu | tail -n1 | cut -d"." -f1) | |
if test $CPU_USAGE -gt 80 | |
then | |
killall Growl | |
open -j -a Growl |
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
--enable-fpm --with-regex=php --disable-rpath --disable-static --with-pic --with-layout=GNU --enable-calendar --enable-fileinfo --enable-hash --enable-json --enable-sysvsem --enable-sysvshm --enable-sysvmsg --enable-bcmath --with-bz2 --enable-ctype --with-iconv --enable-exif --enable-ftp --with-gettext --enable-mbstring --with-onig=/usr --with-pcre-regex --with-mysql=shared,/usr --with-mysql-sock=/var/run/mysqld/mysqld.sock --with-mysqli=shared,/usr/bin/mysql_config --enable-pdo=shared --with-pdo-mysql=shared,/usr --with-pdo-pgsql=shared,/usr/bin/pg_config --with-pdo-sqlite=shared,/usr --with-pdo-dblib=shared,/usr --enable-phar --enable-shmop --enable-sockets --enable-simplexml --enable-dom --enable-wddx --with-libxml-dir=/usr --enable-tokenizer --with-zlib --with-kerberos=/usr --with-openssl=/usr --enable-soap --enable-zip --with-mhash=yes --without-mm --with-curl=shared,/usr --with-enchant=shared,/usr --with-zlib-dir=/usr --with-gd=shared --enable-gd-native-ttf --with-gmp=shared,/usr --with-jpeg-dir=shared, |
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
--- a/ext/spl/php_spl.c | |
+++ b/ext/spl/php_spl.c | |
@@ -889,10 +889,12 @@ static void construction_wrapper(INTERNAL_FUNCTION_PARAMETERS) /* {{{ */ | |
} | |
goto cleanup; | |
} | |
+ /* | |
if (!EG(exception) && SPL_G(validating_fun)(object_data TSRMLS_CC) == 0) | |
zend_throw_exception_ex(spl_ce_LogicException, 0 TSRMLS_CC, | |
"In the constructor of %s, parent::__construct() must be called " |
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
# based on: http://pastie.org/293845 | |
module Capistrano | |
class Configuration | |
module Servers | |
alias_method :original_find_servers, :find_servers | |
def find_servers(options={}) | |
servers = original_find_servers options | |
stack_roles = task_call_frames.collect {|frame| frame.task.options[:roles]}.compact.flatten |
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
diff --git a/src/Git/Daily/Command/Release.php b/src/Git/Daily/Command/Release.php | |
index 0f9cf47..de7e070 100644 | |
--- a/src/Git/Daily/Command/Release.php | |
+++ b/src/Git/Daily/Command/Release.php | |
@@ -539,9 +539,9 @@ class Git_Daily_Command_Release | |
self::outLn("Author list:"); | |
foreach ($author_list as $author => $id_list) { | |
- self::outLn("= $author"); | |
+ self::outLn("\t$author:"); |