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 SimpleTemplateEngine | |
* | |
* 変数展開ができるだけのテンプレートエンジン | |
* | |
* ex) | |
* SimpleTemplateEngine::apply('こんにちは{{ name }}さん', ['name' => '大城']); | |
* >> こんにちは大城さん。 |
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
# install | |
sudo wget -O /etc/yum.repos.d/jenkins.repo http://pkg.jenkins-ci.org/redhat/jenkins.repo | |
sudo rpm --import http://pkg.jenkins-ci.org/redhat/jenkins-ci.org.key | |
sudo yum install jenkins | |
sudo service jenkins start | |
curl localhost:8080 | |
# default password | |
sudo cat /var/lib/jenkins/secrets/initialAdminPassword |
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
<html> | |
<head> | |
<meta http-equiv="Content-Type" content="text/html; charset=utf8"> | |
</head> | |
<body> | |
developer consoleを確認 | |
<!-- 共通ライブラリ的なところに --> | |
<script type="text/javascript"> |
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
cat << 'EOF' >> ~/.gitconfig | |
[alias] | |
delete-merged-branch = "!f () { git checkout $1; git branch --merged|egrep -v '\\*|develop|master'|xargs git branch -d; };f" | |
EOF |
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
main = do | |
putStrLn "Hello, what's your name?" | |
name <- getLine | |
putStrLn ("Hello, " ++ name ++ "!") |
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
sbt -Dflyway.url=jdbc:mysql://localhost/test_db flywayMigrate |
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
// 自分の中でこれはイディオムとしてfixした | |
def rec(x: String, xs: Seq[String]): String = { | |
xs match { | |
case Seq() => x | |
case Seq(y, ys@_*) => | |
rec(s"$x:$y", ys) | |
} | |
} | |
//scala> rec("start", List("1","2","3")) | |
//res1: String = start:1:2:3 |
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
rm Berksfile.lock berks-cookbooks/ -rf |
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
# 一覧を出すとき | |
vagrant box list | |
# 消すとき | |
vagrant box remove chef/centos-6.5 | |
# plugin のリスト | |
vagrant plugin list |
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
mysql> insert into uid_unq (select null, "a", "a", "a" from testdata, testdata t2, testdata t3, testdata t4, testdata t5, testdata t6, testdata t7); | |
Query OK, 10000000 rows affected (22.80 sec) | |
Records: 10000000 Duplicates: 0 Warnings: 0 | |
mysql> insert into user_attribute(select 1001, account_id, "charge_ammount", FLOOR(1 + RAND() * 9000) from uid_unq ); | |
mysql> insert into user_attribute(select 1001, account_id, "key2", FLOOR(1 + RAND() * 9000) from uid_unq ); | |
mysql> insert into user_attribute(select 1001, account_id, "key3", FLOOR(1 + RAND() * 9000) from uid_unq ); | |
mysql> insert into user_attribute(select 1001, account_id, "key4", FLOOR(1 + RAND() * 9000) from uid_unq ); | |
mysql> insert into user_attribute(select 1001, account_id, "key5", FLOOR(1 + RAND() * 9000) from uid_unq ); | |
mysql> insert into user_attribute(select 1001, account_id, "key6", FLOOR(1 + RAND() * 9000) from uid_unq ); |