- CheckStyle
- SpotBugs (旧FindBugs)
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 get_color(n) { | |
color_list = [ | |
'#ff7f7f', '#ff7fbf', '#ff7fff', '#bf7fff', | |
'#7f7fff', '#7fbfff', '#7fffff', '#7fffbf', | |
'#7fff7f', '#bfff7f', '#ffff7f', '#ffbf7f']; | |
len = color_list.length | |
n = ((n * 3) + Math.floor((n * 3) / len)) % len; | |
return color_list[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
function doRetry(arr, timeout) { | |
if(arr.length==0) return; | |
param = arr.shift(); | |
console.log(param); | |
setTimeout(doRetry, timeout, arr, timeout); | |
} | |
doRetry(["a",12, 0.1,null], 500); |
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
package com.example.springboot; | |
import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.status; | |
import org.junit.Test; | |
import org.junit.runner.RunWith; | |
import org.springframework.beans.factory.annotation.Autowired; | |
import org.springframework.boot.test.autoconfigure.web.servlet.AutoConfigureMockMvc; | |
import org.springframework.boot.test.context.SpringBootTest; | |
import org.springframework.test.context.junit4.SpringRunner; | |
import org.springframework.test.web.servlet.MockMvc; |
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
<!DOCTYPE html> | |
<html lang="ja"> | |
<head> | |
<meta charset="utf-8"> | |
<title>easyselectbox sample</title> | |
<link rel="stylesheet" type="text/css" media="screen" href="easyselectbox/easyselectbox.css" /> | |
<link rel="stylesheet" type="text/css" media="all" href="css/style.css" /> | |
<script type="text/javascript" src="js/jquery-1.7.1.min.js"></script> | |
<script type="text/javascript" src="easyselectbox/easyselectbox.min.js"></script> |
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
package com.example.springboot; | |
import java.time.LocalDateTime; | |
import java.time.format.DateTimeFormatter; | |
import org.springframework.web.bind.annotation.RequestMapping; | |
import org.springframework.web.bind.annotation.RequestMethod; | |
import org.springframework.web.bind.annotation.RestController; | |
/** | |
* HelloRestController. |
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
sudo curl -o /usr/local/bin/jq http://stedolan.github.io/jq/download/linux64/jq | |
sudo chmod +x /usr/local/bin/jq | |
curl "https://api.github.com/repos/stedolan/jq/pulls/comments?per_page=100" > jq-pr-comments.json | |
cat jq-pr-comments.json | jq -r '.[] | [.id, .user.login, .created_at, .path, .html_url, .body] | @csv' > tmp.csv | |
- jq manual | |
https://stedolan.github.io/jq/manual/ | |
- jq コマンドの 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
sudo fallocate -l 1G /swap.img | |
sudo chmod 600 /swap.img | |
sudo mkswap /swap.img | |
sudo swapon /swap.img | |
#確認 | |
swapon -s | |
free -h | |
#再起動時有効化 |
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
# rbenv | |
git clone https://github.com/sstephenson/rbenv.git ~/.rbenv | |
git clone https://github.com/sstephenson/ruby-build.git ~/.rbenv/plugins/ruby-build | |
echo 'export PATH="$HOME/.rbenv/bin:$PATH"' >> ~/.bash_profile | |
echo 'eval "$(rbenv init -)"' >> ~/.bash_profile | |
exec $SHELL -l | |
rbenv install -l | |
rbenv install 2.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
# nvm | |
git clone https://github.com/creationix/nvm.git ~/.nvm | |
source ~/.nvm/nvm.sh | |
nvm ls-remote | |
nvm install v0.10 | |
これで、node も npm も入る。 |