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
# MediaWiki with MariaDB | |
# | |
# Access via "http://localhost:8080" | |
# (or "http://$(docker-machine ip):8080" if using docker-machine) | |
version: '3' | |
services: | |
mediawiki: | |
image: mediawiki | |
restart: always | |
ports: |
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
# This gist is compatible with Ansible 1.x . | |
# For Ansible 2.x , please check out: | |
# - https://gist.github.com/dmsimard/cd706de198c85a8255f6 | |
# - https://github.com/n0ts/ansible-human_log | |
# This program is free software: you can redistribute it and/or modify | |
# it under the terms of the GNU General Public License as published by | |
# the Free Software Foundation, either version 3 of the License, or | |
# (at your option) any later version. | |
# |
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 | |
PLAYER="mpg123 --utf8 --long-tag" | |
VMPID="/tmp/vmusic_mainpid" | |
PLAYERPID="/tmp/vmusic_playerpid" | |
VMTRACK="/tmp/vmusic_trackurl" | |
VMINFO="/tmp/vmusic_trackinfo" | |
SELFNAME="$0" | |
fetch() { | |
ACCESS_TOKEN='8426e7c42b7136646ac0c655ea0c09ad97bd80919a04a28d2e5a7860ab10862c3ac4805f27a75e096a589' | |
ENDPOINT="https://api.vk.com/method/audio.search" |
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
rpm --queryformat "%{NAME},%{VERSION},%{ARCH},%{RELEASE}\n" -qa | |
dpkg-query --show --showformat='${Package},${Version},${Architecture}\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
$ VAGRANT_LOG=info vagrant up | |
INFO global: Vagrant version: 1.8.4 | |
INFO global: Ruby version: 2.2.3 | |
INFO global: RubyGems version: 2.4.5.1 | |
INFO global: VAGRANT_LOG="info" | |
INFO global: VAGRANT_OLD_ENV_PROMPT_COMMAND="_fasd_prompt_func;find_git_branch; find_git_dirty; history -a" | |
INFO global: VAGRANT_OLD_ENV_COLORTERM="xfce4-terminal" | |
INFO global: VAGRANT_OLD_ENV__="/opt/vagrant/bin/vagrant" | |
INFO global: VAGRANT_OLD_ENV_LC_MEASUREMENT="ru_RU.UTF-8" | |
INFO global: VAGRANT_OLD_ENV_GDMSESSION="mate" |
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... |
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
# 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
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
def drmia { | |
for j in $(docker images | grep $1 | awk '{print $2}'); do | |
docker rmi -f $1:$j; | |
done | |
} |
NewerOlder