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 ( | |
"crypto/tls" | |
"fmt" | |
"sync" | |
"sync/atomic" | |
"unsafe" | |
) |
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
#!/usr/bin/env bash | |
set -eu | |
_OLDPWD=$(pwd) | |
test -d "${BASH_SOURCE[0]%/*}" && { cd "${BASH_SOURCE[0]%/*}" || exit 1; } | |
SCRIPT_DIR="$(pwd)" | |
SVN_URL=http://ftp.kddilabs.jp/infosystems/apache/subversion/subversion-1.9.1.tar.gz |
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
#!/usr/bin/env bash | |
set -eu | |
_OLDPWD=$(pwd) | |
test -d "${BASH_SOURCE[0]%/*}" && { cd "${BASH_SOURCE[0]%/*}" || exit 1; } | |
SCRIPT_DIR="$(pwd)" | |
SVN_URL=http://archive.apache.org/dist/subversion/subversion-1.7.9.tar.gz |
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
source ${HOME}/.zsh_tools/zaw/zaw.zsh | |
bindkey '^R' zaw-history | |
bindkey -M filterselect '^R' down-line-or-history | |
bindkey -M filterselect '^S' up-line-or-history | |
bindkey -M filterselect '^E' accept-search | |
zstyle ':filter-select:highlight' matched fg=green | |
zstyle ':filter-select' max-lines 10 | |
zstyle ':filter-select' rotate-list yes # enable rotation for filter-select | |
zstyle ':filter-select' case-insensitive yes # enable case-insensitive |
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
{ | |
"AWSTemplateFormatVersion": "2010-09-09", | |
"Description": "ApparelCloud MediaAPI Template on elastic beanstalk for Non-VPC", | |
"Parameters": { | |
"ApplicationName": { | |
"Description": "Beanstalk Application Name", | |
"Type": "String" | |
}, | |
"BeanstalkInstanceType": { | |
"AllowedValues": [ |
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
FROM dockerfile/python | |
ADD application.py /usr/local/share/application.py | |
EXPOSE 8000 | |
ENTRYPOINT ["python", "/usr/local/share/application.py"] |
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
--- | |
commands: | |
01-yum-security-update: | |
command: /usr/bin/yum update -y --security --bugfix --skip-broken | |
ignoreErrors: true | |
02-backup-original-hooks: | |
command: /bin/cp -vpRP /opt/elasticbeanstalk/hooks /opt/elasticbeanstalk/hooks.org | |
ignoreErrors: true |
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 cp -p /etc/security/limits.conf /etc/security/limits.conf.org | |
$ echo "include limits.d/fd.conf" | sudo tee -a /etc/security/limits.conf | |
include limits.d/fd.conf | |
$ cat <<EOF | sudo tee /etc/security/limits.d/fd.conf | |
> root soft nofile 65536 | |
> root hard nofile 65536 | |
> * soft nofile 65536 | |
> * hard nofile 65536 | |
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
{ | |
"AWSTemplateFormatVersion": "2010-09-09", | |
"Description": "custom-ami-mold.template: This template creating a simple instance in a VPC in order to create custom ami image for elastic beanstalk.", | |
"Mappings": { | |
"Tags": { | |
"SSHSecurityGroup": { | |
"Name": "Mold-SSHSecurityGroup" | |
} | |
} | |
}, |
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
import java.lang.management.ManagementFactory; | |
import java.lang.management.MemoryPoolMXBean; | |
import java.lang.management.MemoryUsage; | |
public class OOM1 { | |
private static void output() { | |
java.util.List<MemoryPoolMXBean> beans = | |
ManagementFactory.getMemoryPoolMXBeans(); | |
for(MemoryPoolMXBean bean : beans) { |