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
set-option -g prefix C-t | |
unbind-key C-b | |
unbind-key s | |
bind-key f command-prompt "findw -t '%%'" | |
bind-key s command-prompt "select-window -t '%%'" | |
# set-option -g default-shell /bin/zsh | |
set-window-option -g mode-keys vi | |
set -g update-environment "SSH_ASKPASS SSH_AUTH_SOCK SSH_AGENT_PID SSH_CONNECTION" |
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
pear config-set temp_dir $HOME/.phpbrew/tmp/pear/temp | |
pear config-set cache_dir $HOME/.phpbrew/tmp/pear/cache_dir | |
pear config-set download_dir $HOME/.phpbrew/tmp/pear/download_dir | |
pear install HTTP_Header HTTP_Request HTTP_Download | |
phpbrew ext install imagick |
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
git clone https://github.com/c9s/phpbrew | |
cd phpbrew | |
phpbrew init | |
source ~/.phpbrew/bashrc | |
phpbrew install php-5.5.4 \ | |
+default +mcrypt=shared,/usr +mysql | |
phpbrew switch php-5.5.4 |
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
Host db-server?? app-server?? | |
PermitLocalCommand yes | |
LocalCommand tmux rename-window %n |
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/bash -x | |
sudo yum install wget | |
wget http://ftp-srv2.kddilabs.jp/Linux/distributions/fedora/epel/6/x86_64/epel-release-6-8.noarch.rpm | |
sudo rpm --import wget http://ftp.riken.jp/Linux/fedora/epel/RPM-GPG-KEY-EPEL-6 | |
sudo yum install re2c libmcrypt libmcrypt-devel | |
sudo yum install libxml2-devel \ | |
bison \ | |
bison-devel \ | |
openssl-devel \ |
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
mount -t vboxsf -o uid=`id -u vagrant`,gid=`id -g vagrant` v-root /vagrant | |
sudo /etc/init.d/vboxadd setup |
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 | |
if ($argc <= 1) { | |
echo 'usage: revert COMMIT', PHP_EOL; | |
echo ' revert COMMIT1 COMMIT2', PHP_EOL; | |
exit; | |
} | |
$revert_point_start = 'HEAD'; | |
$revert_point_end = $argv[1]; |
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 | |
if (!function_exists('getimagesizefromstring')) { | |
function getimagesizefromstring($data) | |
{ | |
$uri = 'data://application/octet-stream;base64,' . base64_encode($data); | |
return getimagesize($uri); | |
} | |
} |
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 ArrayChaser implements ArrayAccess { | |
private $array_ref; | |
private $log = array(); | |
public function __construct(array &$ref) | |
{ | |
$this->array = &$ref; | |
} |
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 | |
$path_samples = array( | |
'/temp/hoge/foo', | |
'/temp/./hoge/foo', | |
'/temp//hoge/foo', | |
'/temp///hoge/foo', | |
'/temp//bar/../hoge/foo', | |
'/temp/bar/../../../..//temp//bar/../hoge/foo', | |
'/temp/bar/../../../..//temp//bar/../hoge/foo////', |