Skip to content

Instantly share code, notes, and snippets.

View koriym's full-sized avatar

Akihito Koriyama koriym

View GitHub Profile
@koriym
koriym / gist:6280947
Created August 20, 2013 12:51
generated aop code
<?php
class Mock_ray569357a3a82a9de18a16206045ebb680 extends Ray\Aop\Mock\Mock implements Ray\Aop\WeavedInterface
{
private $___intercept = true;
public $___bind;
public function returnSame($a)
{
if ($this->___intercept) {
$this->___intercept = false;
$interceptors = $this->___bind[__FUNCTION__];
@koriym
koriym / test2.php
Created August 21, 2013 08:14
Serialized object singleton test (2)
<?php
class Depedency
{
public $value;
}
class A
{
public $dependency;
@koriym
koriym / test1.php
Created August 21, 2013 08:14
Serialized object singleton test
<?php
class Depedency
{
public $value;
}
class A
{
public $dependency;
@koriym
koriym / gist:7244271
Created October 31, 2013 04:12
octpress error "Pygments can't parse unknown language: <br." ? no error file information given. 何処がエラーか分からない
$ rake generate
## Generating Site with Jekyll
identical source/stylesheets/screen.css
Configuration from /Users/akihito/git/octopress/_config.yml
Building site: source -> public
/Users/akihito/git/octopress/plugins/pygments_code.rb:27:in `rescue in pygments': Pygments can't parse unknown language: <br. (RuntimeError)
from /Users/akihito/git/octopress/plugins/pygments_code.rb:24:in `pygments'
from /Users/akihito/git/octopress/plugins/pygments_code.rb:14:in `highlight'
from /Users/akihito/git/octopress/plugins/backtick_code_block.rb:37:in `block in render_code_block'
from /Users/akihito/git/octopress/plugins/backtick_code_block.rb:13:in `gsub'
@koriym
koriym / HY000error.txt
Created April 17, 2012 10:07
Warning: mysqli_connect(): (HY000/2002)
Warning: mysqli_connect(): (HY000/2002): No such file or directory
このエラーはソケットファイル未定義の場合に(も)出る
対処法:
1) mysqladmin version (macportsはmysqladmin5 versioん)等のコマンドでsocketファイルの位置を知る
2) mysqli.default_socket = 等にソケットファイルのパスを追加
※php.iniの位置が分からない場合は
@koriym
koriym / v8js.md
Last active May 2, 2016 07:57
v8js for MacOS

How to install latest v8 (5.x) on MacOS

Compile latest v8

# Install depot_tools first (needed for source checkout)
# https://github.com/phpv8/v8js/blob/php7/README.MacOS.md
git clone https://chromium.googlesource.com/chromium/tools/depot_tools.git
export PATH=`pwd`/depot_tools:"$PATH"
@koriym
koriym / ssr.html
Created May 8, 2016 04:30
SSR code sample
<!doctype html>
<html>
<head>
<title>React page</title>
<!-- css and stuff -->
</head>
<body>
<!-- render server content here -->
v8js
V8 Javascript Engine => enabled
V8 Engine Compiled Version => 5.0.71.33
V8 Engine Linked Version => 5.2.0 (candidate)
Version => 1.0.0
Directive => Local Value => Master Value
v8js.compat_php_exceptions => 0 => 0
v8js.flags => no value => no value
1. Asakusa
http://www.japan-guide.com/e/e3004.html
Get the map and Sumida River Cruise boat time table atAsakusa Culture Tourist Information Center (open at 9:00AM)
Kaminarimon, Sensoji Temple,and Kappabashi Shopping Street
2 Sumida River Cruise
http://www.japan-guide.com/e/e3042.html
@koriym
koriym / .bash_profile
Last active September 13, 2016 05:34
bash_profile
# macports
export PATH="/opt/local/bin:/opt/local/sbin:$PATH"
# PHP
export PATH="/usr/local/php5/bin:$PATH"
# mysql
export PATH="/usr/local/mysql/bin/:$PATH"
# composer
export PATH="$HOME/.composer/vendor/bin:$PATH"
# npm
export PATH="./node_modules/.bin:$PATH"