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
# Refer | |
# https://github.com/kubernetes/kubernetes/blob/master/docs/getting-started-guides/docker.md | |
# curl -L https://gist.githubusercontent.com/takashi209/cf716397f8922e767726/raw/323d80be17880527d43eb50427555e0d78b0381f/running_kubernetes_locally_via_docker.sh | bash | |
CONFIG_RESOURCE_COUNTERS=y | |
CONFIG_MEMCG=y | |
CONFIG_MEMCG_SWAP=y | |
CONFIG_MEMCG_SWAP_ENABLED=y | |
CONFIG_MEMCG_KMEM=y | |
GRUB_CMDLINE_LINUX="cgroup_enable=memory swapaccount=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
package main | |
func Substring(s string, i int) string { | |
runes := []rune(s) | |
return string(runes[i]) | |
} | |
func main() { | |
str := "パタトクカシーー" | |
println(Substring(str, 1) + Substring(str, 3) + Substring(str, 5) + Substring(str, 7)) |
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 main | |
func Reverse(s string) string { | |
runes := []rune(s) | |
for i, j := 0, len(runes)-1; i < j; i, j = i+1, j-1 { | |
runes[i], runes[j] = runes[j], runes[i] | |
} | |
return string(runes) |
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
// You can edit this code! | |
// Click here and start typing. | |
package main | |
import "fmt" | |
func main() { | |
fmt.Println("Hello, 世界") | |
} |
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
# 参考URL | |
# https://github.com/boot2docker/boot2docker/blob/master/doc/FAQ.md | |
root@boot2docker:~# cat /var/lib/boot2docker/profile | |
export http_proxy=http://host:port/ | |
export https_proxy=http://host:port/ | |
root@boot2docker:~# |
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
http_proxy=http://hoge:1234 docker -d & |
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>クロスドメイン対応</title> | |
<script src="http://code.jquery.com/jquery-2.0.0.min.js"></script> | |
<script type"text/javascript"> | |
$(document).ready(function(){ | |
var strUrl = 'http://www.google.co.jp'; |
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 | |
if(isset($_GET["url"])){ | |
header("Content-type: application/xml;"); | |
readfile($_GET["url"]); | |
} | |
?> |
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>sample html</title> | |
</head> | |
<body> | |
</body> | |
</html> |
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 main | |
import ( | |
"fmt" | |
"strconv" | |
"strings" | |
) | |
func main() { | |
for i := 1; i <= 100; i++ { |