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 | |
// abstract class Object { /* ... */ } | |
class Loader extends Object { | |
/** | |
* Class_action という命名規則と仮定 | |
* action -> model, controller それ以外は汎用クラスと解釈 | |
* ex) Post_controller, Category_model |
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
Show hidden characters
{ | |
"token": "**********" | |
} |
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
// ID指定 | |
[gist id=8877382] | |
// URL指定 | |
[gist]http://gist.github.com/8877382[/gist] |
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
spl_autoload_register( '__autoload' ); |
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
// requestAnimationFrameを優先に、存在しなければsetTimeoutを取得する | |
var requestAnimationFrame = window.requestAnimationFrame | |
|| window.webkitRequestAnimationFrame | |
|| window.mozRequestAnimationFrame | |
|| window.setTimeout; | |
window.requestAnimationFrame = requestAnimationFrame; | |
function func() { | |
// 実行させたい何か | |
} |
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 basetime = Date.now(); | |
// FPS | |
var fps = 1000/30; | |
// setTimeoutを利用した場合は最初から30FPSで実行される | |
function animate_handler() { | |
var now = Date.now(); | |
var check = now - basetime; |
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
$ wget http://www.hop5.in/yum/el6/hop5.repo | |
$ yum install hhvm | |
// libwarf が無いよって怒られる | |
$ yum install libdwarf --enablerepo=epel | |
$ yum install hhvm | |
$ hhvm | |
// liblcms2.so.2が無いよって怒られる |
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
Eval { | |
Jit = true | |
JitASize = 67108864 | |
JitAStubsSize = 67108864 | |
JitGlobalDataSize = 22554432 | |
} |
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
// ポートを指定する場合 | |
$ hhvm --mode daemon -vServer.Type=fastcgi -vServer.Port=9000 | |
// socketを指定する場合(自環境の場合は上手く動きませんでした) | |
$ hhvm --mode daemon -vServer.Type=fastcgi -vServer.FileSocket=/var/run/hhvm/sock |
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
# ... | |
upstream php-backend { | |
# server unix:/path/to/php-fpm.socket; php-fpmの場合 | |
# server unix:/var/run/hhvm/sock; socket経由だと何故か動かず… | |
server 127.0.0.1:9000; | |
} | |
# ... |
OlderNewer