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
void((function() { | |
var editJikoku = function (jikoku) { | |
return function () { | |
var inputForm = jQuery(this); | |
if (inputForm.parents('tr').css('background-color') != 'transparent') { | |
return; | |
} | |
if (inputForm.val() != jikoku) { | |
inputForm.val(jikoku); | |
inputForm.css('background-color', '#fcc'); |
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 | |
APP_DIRS=('/path/to/dir' '/path/2/dir') | |
for app_dir in ${APP_DIRS[@]} | |
do | |
cd $app_dir | |
number_of_changed=`git ls-files --modified | wc -l` | |
if test $number_of_changed -gt 0 ; then | |
curl -F text="$app_dir} 以下の${number_of_changed}個のファイルに変更がありました。確認してください。" -F channel= -F token='' https://slack.com/api/chat.postMessage | |
fi |
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 | |
echo "Hello world.\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
print "Hello world.\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/sh | |
BRANCH=`git rev-parse --abbrev-ref HEAD` | |
if test $BRANCH = 'master'; then | |
echo 'Commiting to master is forbidden.' | |
exit 1 | |
fi |
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/sh | |
sudo yum -y remove php php-common php-mysql php-mbstring php-cli php-gd php-soap php-pdo php-xml | |
sudo yum -y remove httpd httpd httpd-tools | |
sudo yum -y install httpd24 mod24_ssl | |
sudo yum -y install php55-common php55-mysqlnd php55-mbstring php55-cli php55-gd php55-soap php55-pdo php55 php55-xml | |
sed -i -e 's/;date\.timezone =/date\.timezone = "Asia\/Tokyo"/g' /etc/php.ini | |
sudo chkconfig httpd on |
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 | |
REMOTE_NAME='origin' | |
git fetch --prune ${REMOTE_NAME} | |
msg='' | |
for remote_branch in `git branch -r | grep -v '\->'| grep ${REMOTE_NAME}/` | |
do | |
ahead=0 |
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
App::uses('Controller', 'Controller'); | |
AppController extends Controller { | |
public function __construct($request = null, $response = null) { | |
parent::__construct($request, $response); | |
// ここに書いた処理はComponent初期化より前に実行されます | |
} | |
public function startupProcess() { | |
// ここに書いた処理はComponent初期化より前に実行されます | |
// 親クラス(Controller)のstartupProcess()より前に書く必要があります。 |
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
;;display settings | |
(tool-bar-mode nil) ;ツールバーを消す | |
(show-paren-mode t) ; 対応する括弧のハイライト | |
(display-time) | |
(setq-default truncate-lines t) ;右端で折り返さない | |
(setq-default truncate-partial-width-windows t) ;右端で折り返さない | |
;; 行番号 | |
(global-linum-mode t) | |
(set-face-attribute 'linum nil |
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 | |
function add($number1, $number2) { | |
return $number1 + $number2; | |
} | |
$func = 'add'; | |
echo $func(1, 1); | |
// -> 2 | |
echo 'add'(1, 1); |
NewerOlder