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 RIFFException extends RuntimeException {} | |
/** | |
* Base class of RIFF chunks | |
*/ | |
abstract class RIFFChunk | |
{ | |
protected $id; | |
protected $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
#ifdef HAVE_CONFIG_H | |
#include "config.h" | |
#endif | |
#include <php.h> | |
#include <ext/standard/info.h> | |
#include <Zend/zend_extensions.h> | |
static PHP_MINFO_FUNCTION(cb) | |
{ | |
php_write("hi!\n", 4 TSRMLS_CC); |
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 -r 'var_dump(posix_isatty(2));' | |
bool(true) | |
% php -r 'var_dump(posix_isatty(2));' 2>/dev/null | |
bool(false) |
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-5.3.5/Zend/zend_operators.c.orig 2010-06-27 02:14:33.000000000 +0900 | |
+++ php-5.3.5/Zend/zend_operators.c 2011-02-11 13:45:33.000000000 +0900 | |
@@ -45,6 +45,77 @@ | |
#define TYPE_PAIR(t1,t2) (((t1) << 4) | (t2)) | |
+static int operator_overload(zval *op1, zval *op2, const char *function_name, zval **retval_ptr_ptr TSRMLS_DC) /* {{{ */ | |
+{ | |
+ zval callable; | |
+ zval *retval, *op2_copy; |
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 sys, subprocess | |
class AutoColorDiff: | |
diff = 'diff' | |
colordiff = 'colordiff' | |
def run(self, args, | |
stdin = None, stdout = None, stderr = None, |
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/sh | |
pmset -a hibernatemode 0 | |
rm -fv /var/vm/sleepimage |
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 | |
$stream1 = fopen('php://output', 'wb'); | |
stream_filter_append($stream1, 'string.rot13'); | |
fwrite($stream1, "hoge\n"); | |
fwrite(STDOUT, "hoge\n"); | |
echo "hoge\n"; | |
echo "-\n"; | |
$stream2 = fopen('php://stdout', 'wb'); |
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
--- Gyazo.app/Contents/Resources/script | |
+++ Zyazo.app/Contents/Resources/script | |
@@ -2,6 +2,15 @@ | |
require 'net/http' | |
+def gyazo_read_defaults(name, alternative, namespace = 'com.gyazo.Gyazo') | |
+ value = `defaults read '#{namespace}' '#{name}' 2>/dev/null` | |
+ if $? == 0 | |
+ value.chomp |
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 | |
// The latest version can be found at https://github.com/rsky/PEAR_PackageFileBuilder | |
/** | |
* Utility for PEAR_PackageFileManager2. | |
* | |
* @package PEAR_PackageFileBuilder | |
* @author Ryusuke SEKIYAMA <rsky0711@gmail.com> | |
* @copyright Copyright (c) 2011 Ryusuke SEKIYAMA | |
* @license http://www.opensource.org/licenses/mit-license.php MIT License |
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
Only in php-5.3.8/Zend: acconfig.h | |
diff -ur php-5.3.8/Zend/zend.h php-5.4.0RC2/Zend/zend.h | |
--- php-5.3.8/Zend/zend.h 2011-12-13 14:10:07.000000000 +0900 | |
+++ php-5.4.0RC2/Zend/zend.h 2011-12-13 14:10:09.000000000 +0900 | |
@@ -22,7 +22,7 @@ | |
#ifndef ZEND_H | |
#define ZEND_H | |
-#define ZEND_VERSION "2.3.0" | |
+#define ZEND_VERSION "2.4.0" |