#!/usr/bin/env bash
dir=`dirname realpath $0`
# Check php syntax
$dir/check-php-syntax
if [ $? -ne 0 ]; then
message="Aborting commit due to files with syntax errors."
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
#!/usr/bin/env bash | |
case "${OSTYPE}" in | |
darwin*) | |
sysctl -n kern.uuid | |
;; | |
freebsd*) | |
sysctl -n kern.hostuuid | |
;; | |
linux*) |
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
function git_porcelain | |
set -l staged (set_color green) | |
set -l unstaged (set_color red) | |
set -l untracked (set_color -o black) | |
set -l normal (set_color normal) | |
set -l opts "" | |
set -l empty 1 | |
if set -q argv[1] | |
switch "$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 -i|grep session.gc | |
session.gc_divisor => 1000 => 1000 | |
session.gc_maxlifetime => 1440 => 1440 | |
session.gc_probability => 1 => 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
\set PROMPT2 '' | |
\set PROMPT1 '%[%033[1;33;40m%]-- psql(%`psql --version|cut -d " " -f3` on %`hostname`) %`date +%Y-%m-%d` %`date +%H:%M:%S` %n@%M:%>/%/ %x %#%[%033[0m%]\n' | |
\pset null '[NULL]' | |
\x auto | |
\set VERBOSITY verbose | |
\set HISTFILE ~/.psql_history- :DBNAME | |
\set HISTCONTROL ignoredups |
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
setInterval(function () { | |
// ページタイトルセット | |
document.title = 'Silent ChatWork'; | |
// 左カラムの未読数を表示しない。(自分宛ては表示する) | |
$('li ._unreadBadge.unread').css('display', 'none'); | |
// 左カラム、上の未読件数の合計も表示しない。(自分宛ては表示する) | |
$('#_chatUnreadStatus').css('display', 'none'); | |
}, 10000); // 10秒毎。 |
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
mkdir -p ~/local/bin | |
wget http://cs.sensiolabs.org/get/php-cs-fixer.phar -O ~/local/bin/php-cs-fixer | |
chmod 755 ~/local/bin/php-cs-fixer |
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
cd ~/local/src | |
tar zxvf php-5.3.29.tgz | |
cd ~/local/src/php-5.3.29 | |
./configure --prefix=~/local --exec-prefix=~/local/php53 --program-suffix=53 | |
make && make install | |
cd ~/local/src | |
tar zxvf php-5.4.36.tgz | |
cd ~/local/src/php-5.4.36 | |
./configure --prefix=~/local --exec-prefix=~/local/php54 --program-suffix=54 |
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 | |
sudo date | |
project_name=fvndev10.local | |
ip=192.168.33.55 | |
# このスクリプトはMac用なのでそれ以外のOSでは終了 | |
if [ 'Darwin' != `uname` ];then | |
echo sorry, this script made for Darwin. | |
exit 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
#!/bin/bash | |
file=$1 | |
mode=$2 | |
if [ "$mode" = "" ] || [ "$mode" = "message" ] ; then | |
branch=`git rev-parse --abbrev-ref HEAD` | |
if [ "$branch" != "master" ]; then | |
if [ "$branch" != "" ]; then | |
mv $file $file.tmp |