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
if [[ "x$SOURCE_PATH" = "x" ]]; then | |
SOURCE_PATH=$(cd "$(dirname $0)" && pwd) | |
SOURCE_PATH=${SOURCE_PATH%/*} | |
fi |
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
"${ZOOKEEPER?variable is required. You may want to set it inline: ZOOKEEPER=localhost:2181 $0}" | |
VAR=${VAR:-default} |
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
libraries=( 'item1' \ | |
'item2' \ | |
'item3' ) | |
for j in "${libraries[@]}"; do | |
done |
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
.l-content_main { | |
background-color: #FAFAC8!important; | |
} | |
a.b-controls_button { | |
display: none; | |
} | |
.b-button_icon { | |
display: none; | |
} | |
a.c_show_user { |
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
docker pull centurylink/dockerfile-from-image | |
alias dfimage="docker run -v /var/run/docker.sock:/var/run/docker.sock --rm centurylink/dockerfile-from-image" | |
dfimage your/image |
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
def drmia { | |
for j in $(docker images | grep $1 | awk '{print $2}'); do | |
docker rmi -f $1:$j; | |
done | |
} |
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
aptitude install -y locales | |
echo "LANG=en_US.UTF-8" > /etc/default/locale | |
cat > /etc/locale.gen << EOF | |
en_US.UTF-8 UTF-8 | |
ru_RU.UTF-8 UTF-8 | |
EOF | |
locale-gen |
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
# regexp parser and eval variant | |
str = "1 year 2 months 3 days 2 hours 3 minutes 59 seconds" | |
t = {'minute[s]?': '*60+', 'hour[s]?': '*60*60+', 'day[s]?': '*60*60*24+', 'second[s]?': '+0', 'month[s]?': '*30*60*60*24+', 'year[s]?': '*12*30*60*60*24+'} | |
s = t.each {|x,y| str.gsub!(Regexp.new(x.to_s), y)} | |
seconds = eval(str) | |
# hash parser and inject variant | |
SECOND = SECONDS = 1 | |
MINUTE = MINUTES = 60 | |
HOUR = HOURS = 3600 |
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
VBoxManage modifyvm default --natdnsproxy1 on --natdnshostresolver1 on | |
config.vm.provider :virtualbox do |vb| | |
vb.customize ["modifyvm", :id, "--natdnshostresolver1", "on"] | |
end |
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
$ vagrant up | |
Bringing machine 'default' up with 'virtualbox' provider... | |
==> default: Importing base box 'hfm4/centos7'... | |
==> default: Matching MAC address for NAT networking... | |
==> default: Checking if box 'hfm4/centos7' is up to date... | |
==> default: Setting the name of the VM: testV_default_1468827488759_88757 | |
==> default: Clearing any previously set network interfaces... | |
==> default: Preparing network interfaces based on configuration... | |
default: Adapter 1: nat | |
==> default: Forwarding ports... |
OlderNewer