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
#!/bin/bash | |
set -e | |
set -u | |
FQDN='gitlab.example.com' | |
MY_PORT='8001' | |
FULL_URL="http://$FQDN:$MY_PORT/" | |
DIST='https://downloads-packages.s3.amazonaws.com/centos-6.6/gitlab-ce-7.10.1~omnibus.2-1.x86_64.rpm' |
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
#!/bin/bash | |
set -e | |
set -u | |
FQDN='chat.ml.example.com' | |
cat <<'_EOF_' > /etc/yum.repos.d/mongodb.repo | |
[mongodb] | |
name=MongoDB Repository |
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
#!/bin/bash | |
set -e | |
set -u | |
ML_SERVER='ml.example.com' | |
MAILMAN_ADMIN_PASSWORD='hogehoge1' | |
ADMINML_ADMIN='someone@example.com' | |
ADMINML_PASSWORD='hogehoge2' |
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
#!/bin/bash | |
set -e | |
set -u | |
MY_DOMAIN='example.com' | |
MY_ADDR='127.0.0.1' | |
yum -y install postfix dovecot | |
/sbin/iptables -I INPUT -p tcp --dport smtp -j ACCEPT |
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 HiLoTECH::Validate; | |
#@errs = HiLoTECH::Validate({ | |
# data => $v, | |
# validates => [ | |
# { | |
# target => 'mailaddr', | |
# rules => [ | |
# [ sub { return 1 if ( !$_[0] ) }, | |
# 'メールアドレスが入力されていません' ], |
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> | |
<title>localStorage test</title> | |
<body> | |
<h1>localStorage test</h1> | |
<script> | |
if ( ! window.console ) { | |
console = { | |
log : function( s ) { | |
alert( s ); | |
} |
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 perl | |
# pyaml2json.pl | |
# YAML <-> JSON converter by Perl | |
# Prerequisite installation (on CentOS 6.x) | |
# ----------------------------------------- | |
# # yum -y install perl | |
# # curl -L https://cpanmin.us | perl - App::cpanminus | |
# # cpanm JSON YAML::Tiny |
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
# Usage: local -A __opts=`_getOptsArray --hoge=fuga --age=uge` | |
# to get the value: ${__opts["hoge"]} | |
function _getOptsArray() { | |
local __name='' | |
local __value='' | |
local __declaration='' | |
local -A __opts | |
for OPT in "$@" | |
do | |
__name=${OPT%%=*} |
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
powershell -NoProfile -ExecutionPolicy unrestricted -Command "iex ((new-object net.webclient).DownloadString('https://chocolatey.org/install.ps1'))" && SET PATH=%PATH%;%ALLUSERSPROFILE%\chocolatey\bin | |
REM for CygWin Environment | |
mv /usr/bin/git /usr/bin/cyg-git | |
call cinst git | |
call cinst nodejs | |
call cinst atom | |
call apm install Sublime-Style-Column-Selection | |
call apm install atom-alignment |
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
#!/bin/sh | |
declare container_id=$1 | |
DOCKER_PS=` \ | |
docker ps \ | |
| awk '\ | |
BEGIN{L=1} \ | |
!/^CONTAINER/{printf("<%d> %s\n", L, $0); L++;} \ | |
/^CONTAINER/{print;} \ |