This file contains hidden or 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
import org.slf4j.Logger; | |
import org.slf4j.LoggerFactory; | |
import org.springframework.http.ResponseEntity; | |
import org.springframework.stereotype.Controller; | |
import org.springframework.http.HttpHeaders; | |
import org.springframework.http.HttpStatus; | |
import org.springframework.web.bind.annotation.RequestMapping; | |
import org.springframework.web.bind.annotation.RequestParam; | |
import org.springframework.web.bind.annotation.ResponseBody; |
This file contains hidden or 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
発端はDBAさんとのお話。 | |
前略。 | |
Multi-Master Replication Manager を利用したら良いよ。だからDNSの申請はいらないよ。 | |
どういうこっちゃ?と思って調べてみたのでメモ。 | |
それに続いて、一般的なFail Overの方法ってなんだろう?と気になったのでメモ。 | |
結局、FailOverというか、MySQLの更新の仕組みがよくわかってない、みたいな感じになって実に残念w |
This file contains hidden or 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
command + [ | |
参考 | |
http://d.hatena.ne.jp/hiru926/20090610/1244608057 |
This file contains hidden or 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
2013-03-12T17:29:32.875+0900: [GC [ParNew: 105726K->658K(118016K), 0.0036680 secs] 940860K->835893K(1035520K), 0.0038120 secs] [Times: user=0.04 sys=0.00, real=0.01 secs] | |
2013-03-12T17:29:33.937+0900: [GC [ParNew (promotion failed): 105618K->105610K(118016K), 0.0631610 secs][CMS: 835245K->259864K(917504K), 1.8827850 secs] 940853K->259864K(1035520K), [CMS Perm : 53618K->53373K(83968K)], 1.9461600 secs] [Times: user=1.98 sys=0.02, real=1.94 secs] | |
2013-03-12T17:29:35.952+0900: [GC [ParNew: 104960K->4540K(118016K), 0.0079190 secs] 364824K->264404K(1035520K), 0.0080600 secs] [Times: user=0.07 sys=0.00, real=0.01 secs] | |
2013-03-12T17:29:36.076+0900: [GC [ParNew: 109500K->4641K(118016K), 0.0096710 secs] 369364K->264505K(1035520K), 0.0098120 secs] [Times: user=0.03 sys=0.00, real=0.01 secs] | |
This file contains hidden or 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
[hogehoge@ ~]$ sudo /usr/local/nginx/sbin/nginx -t | |
nginx: the configuration file /usr/local/nginx/conf/nginx.conf syntax is ok | |
nginx: configuration file /usr/local/nginx/conf/nginx.conf test is successful | |
[hogehoge@ ~]$ sudo /usr/local/nginx/sbin/nginx -s reload |
This file contains hidden or 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
public class CreateRandomNumberTest{ | |
Logger LOGGER = LoggerFactory.getLogger(CreateRandomNumberTest.class); | |
@Test | |
public void testExpire(){ | |
List<Long> rundomList1 =new ArrayList<Long>(); | |
List<Long> rundomList2 =new ArrayList<Long>(); | |
SecureRandom rundom = new SecureRandom(); | |
This file contains hidden or 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
split -l 100000 number_all.txt number.txt. | |
sed -e 's/^\([0-9]\{8\}\)/\1,/g' number.txt > number.sepalate.txt | |
# remae | |
# 拡張子を追加 | |
for nm in number.sepalate.*; do mv $nm $nm.txt; done | |
####### | |
# 追記 |
This file contains hidden or 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
while getopts f:t:r:h opt; do | |
case $opt in | |
f) FROM_DATE="${OPTARG}" ;; | |
t) TO_DATE="${OPTARG}" ;; | |
h) HELP="true" ;; | |
*) ERROR="true" ;; | |
esac | |
done | |
function help() |
This file contains hidden or 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
# FollowSymLinks はDocumentRoot下にシンボリックリンクされたファイルを利用するために必要。 | |
<Directory /> | |
Options FollowSymLinks | |
AllowOverride None | |
FileETag None | |
</Directory> |
This file contains hidden or 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
$ perl -ne 'if (/^[0-9]{7} [0-9]{7}\r\n$/) { print } ' *.txt | wc -l | |