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
echo 'opendiff $2 $5' > ~/bin/opendiff-git.sh | |
chmod a+x ~/bin/opendiff-git.sh | |
git config --global diff.external ~/bin/opendiff-git.sh |
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
Converted about PHP files from dos format to unix format: | |
for file in $(find . -name *.php); do dos2unix $file; done; | |
Expanded all multi-line use statements. | |
for file in $(find . -name "*.php"); do php -r 'file_put_contents($argv[1],preg_replace_callback("(use (\s*[a-zA-Z0-9\\\\]+(\s*as[\sa-zA-Z0-9]+)?[,;])+)",function($m){return preg_replace("(,\s*([^,;]+))",";\nuse \\1",$m[0]);},file_get_contents($argv[1])));' $file; done; | |
Removed all trailing whitespaces. |
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
Warning: mysqli_connect(): (HY000/2002): No such file or directory | |
このエラーはソケットファイル未定義の場合に(も)出る | |
対処法: | |
1) mysqladmin version (macportsはmysqladmin5 versioん)等のコマンドでsocketファイルの位置を知る | |
2) mysqli.default_socket = 等にソケットファイルのパスを追加 | |
※php.iniの位置が分からない場合は |
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
sudo add-apt-repository ppa:ondrej/php5 | |
sudo apt-get update | |
sudo apt-get install php5 |
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
/** | |
* @Inject | |
*/ | |
public function __construct(HttpRequest $request) | |
{ | |
$this->request = request; | |
} | |
/** | |
* @PostConstruct |
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
sudo cp /usr/local/mysql/support-files/my-huge.cnf /etc/my.cnf |
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
# | |
# Use name-based virtual hosting. | |
# | |
NameVirtualHost *:80 | |
# | |
# VirtualHost example: | |
# Almost any Apache directive may go into a VirtualHost container. | |
# The first VirtualHost section is used for all requests that do not | |
# match a ServerName or ServerAlias in any <VirtualHost> block. |
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
/Applications/eclipse/Eclipse.app/Contents/MacOS/eclipse -initialize | |
/Applications/eclipse/Eclipse.app/Contents/MacOS/eclipse -clean & |
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
/** | |
* @Inject | |
*/ | |
public function setSession(Session $session) | |
{ | |
$this->session = $session | |
} | |
@Injectで受け取るこのコードはtraitにする。 | |
利用コードはこのように |
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
1) AI programing in PHP | |
IDS/BFS/IDDFS/A*(A star)等AI探索プログラムの基礎をPHP組み込みのDLL(双方向リンクスト)クラスを使った例で紹介します。 | |
PHPは競技プログラミングに最高最適の言語ではないかもしれませんが十分に楽しめます。 | |
2) パフォーマンス指向アーキテクチャ | |
パフォーマスは機会であり、コストであり、またユーザー体験です。 | |
Webアプリケーションのパフォーマンス改善を実装レベルではなく、アプリケーションアーキテクチャレベルでPHP/HTTP双方を対象に考察します。 |