Skip to content

Instantly share code, notes, and snippets.

--- zend_inline_hash_func-5.6.16» 2015-12-10 22:02:42.179337112 +0900
+++ zend_inline_hash_func-7.0.0»2015-12-10 22:03:03.595338278 +0900
@@ -14,7 +14,7 @@
* numbers are not useable at all. The remaining 128 odd numbers
* (except for the number 1) work more or less all equally well. They
* all distribute in an acceptable way and this way fill a hash table
- * with an average percent of approx. 86%._
+ * with an average percent of approx. 86%.
*
* If one compares the Chi^2 values of the variants, the number 33 not
@do-aki
do-aki / phantomjs.spec.patch
Created December 24, 2012 07:49
phantomjs 1.8 付属の spec ファイルを 1.8 に対応させるパッチ
--- phantomjs.spec.original 2012-12-21 08:51:10.000000000 +0900
+++ phantomjs.spec 2012-12-24 07:34:04.000000000 +0900
@@ -1,5 +1,5 @@
%define name phantomjs
-%define version 1.7
+%define version 1.8.0
%define release 1
%define prefix /usr
@@ -122,6 +122,18 @@
--- php-5.6.16/ext/skeleton/skeleton.c 2015-11-26 05:28:38.000000000 +0900
+++ php-7.0.0/ext/skeleton/skeleton.c 2015-12-01 22:36:41.000000000 +0900
@@ -36,20 +36,21 @@
PHP_FUNCTION(confirm_extname_compiled)
{
char *arg = NULL;
- int arg_len, len;
- char *strg;
+ size_t arg_len, len;
+ zend_string *strg;
@do-aki
do-aki / redmine.sh
Created July 3, 2012 07:49
redmine 起動スクリプト
#!/bin/sh
export HOME=/home/redmine
SHELL="$HOME/.rvm/bin/rvm-shell 1.9.3"
PID_FILE=$HOME/redmine.pid
LISTEN='127.0.0.1:3001'
APP_DIR=$HOME/redmine-2.0
start() {
cd $APP_DIR && $SHELL -c "unicorn --listen $LISTEN --pid=$PID_FILE --env=production --daemonize"
@do-aki
do-aki / launch-skype.sh
Created June 15, 2012 01:31 — forked from moriyoshi/launch-skype.sh
"/etc/rc.d/init.d/skype" (for Scientific Linux 6.2)
#!/bin/bash
#
# chkconfig: 345 99 10
# description: Skype service
#
# pidfile: /var/run/skype.pid
if [ -f /etc/init.d/functions ] ; then
. /etc/init.d/functions
elif [ -f /etc/rc.d/init.d/functions ] ; then
@do-aki
do-aki / gist:2652478
Created May 10, 2012 11:12
glt のあれ
<?php
$cards = range(1,99);
$get_cards = array();
$count = 0;
while(++$count) {
$get_cards[$cards[array_rand($cards, 1)]] = 1;
if (!array_diff($cards, array_keys($get_cards))) {
break;
@do-aki
do-aki / caller.lua
Created March 30, 2012 03:34
fluent.logger_lua
local logger = require 'fluent.logger'
logger.connect()
logger.post('test.test', {message='data'})
@do-aki
do-aki / bf_on_php.php
Created December 19, 2011 08:10
run Brainf*ck on PHP
<?php
if (isset($argv[1]) && file_exists($argv[1])) {
$code = file_get_contents($argv[1]);
} else {
fputs(STDERR, "no source (follow output is fizzbuzz demo)\n\n");
$code = file_get_contents(__FILE__, 0, null, __COMPILER_HALT_OFFSET__);
}
$buffer = array_pad(array(), 30, 0);
@do-aki
do-aki / session.c
Created December 6, 2011 02:24
PHP 5.4.0RC2 ext/session/session.c
/*
+----------------------------------------------------------------------+
| PHP Version 5 |
+----------------------------------------------------------------------+
| Copyright (c) 1997-2011 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
| available through the world-wide-web at the following url: |
| http://www.php.net/license/3_01.txt |
@do-aki
do-aki / zend_language_parser.y.diff
Created December 5, 2011 01:56
Difference between 5.3.8 and 5.4.0RC2
--- php-5.3.8/Zend/zend_language_parser.y Sun Jun 12 10:43:10 2011
+++ php-5.4.0RC2/Zend/zend_language_parser.y Tue Nov 29 23:15:18 2011
@@ -18,7 +18,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: zend_language_parser.y 312076 2011-06-12 01:43:10Z felipe $ */
+/* $Id: zend_language_parser.y 318823 2011-11-06 13:25:45Z felipe $ */
/*