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
Index: acinclude.m4 | |
=================================================================== | |
RCS file: /repository/php-src/acinclude.m4,v | |
retrieving revision 1.332.2.14.2.26.2.9 | |
diff -u -r1.332.2.14.2.26.2.9 acinclude.m4 | |
--- acinclude.m4 24 Jul 2008 14:17:54 -0000 1.332.2.14.2.26.2.9 | |
+++ acinclude.m4 24 Aug 2008 15:16:48 -0000 | |
@@ -2703,7 +2703,7 @@ | |
enable-libtool-lock | with-pic | with-tags | enable-shared | enable-static | enable-fast-install | with-gnu-ld[)];; | |
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 | |
class foo { | |
public $a = 1; | |
private $b = 2; | |
public $c = 3; | |
public $d = 4; | |
protected $e = 5; | |
public function methodA() {} |
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 | |
class foo implements IteratorAggregate | |
{ | |
public $a; | |
public $b; | |
public function getIterator() | |
{ | |
return new ArrayIterator(array('foo', 'bar')); |
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 | |
use Symfony\Component\Translation\TranslatorInterface; | |
function format(\DateTime $date, TranslatorInterface $translator) | |
{ | |
$diff = date_create()->diff($date); | |
$seconds = $diff->days * 86400 + $diff->h * 3600 + $diff->i * 60 + $diff->s; | |
$format = $translator->transChoice('reldate', $seconds); |
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 | |
/** | |
* @author Arnaud Le Blanc <arnaud.lb@gmail.com> | |
*/ | |
// 255*8 booleans initialized to true | |
$field = str_repeat("\xFF", 255); | |
function read_bit(&$str, $offset) | |
{ |
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 | |
/** | |
* @author Arnaud Le Blanc <arnaud.lb@gmail.com> | |
*/ | |
class Bitfield implements ArrayAccess | |
{ | |
protected $field; | |
public function __construct($size) |
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 | |
use Doctrine\ORM\Query\SqlWalker; | |
/** | |
* Quick hack to allow adding a USE INDEX on the query | |
*/ | |
class UseIndexWalker extends SqlWalker | |
{ | |
const HINT_USE_INDEX = 'UseIndexWalker.UseIndex'; |
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/lib/redis/dump.rdb { | |
# rotate every day and keep 30 backups | |
daily | |
rotate 30 | |
missingok | |
# rename backups dump.rdb-YYYYMMDD | |
# instead of dump.rdb.X: more rsync friendly | |
dateext | |
# create a new dump | |
postrotate |
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 | |
import subprocess | |
import re | |
orig = subprocess.check_output(["/usr/local/bin/html2haml"]) | |
result = orig | |
result = re.sub(r' ', ' ', result) |
OlderNewer