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
# (Codemirror)[http://codemirror.net/] | |
CodeMirror is a versatile text editor implemented in JavaScript for the browser. |
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
function findCurrentOSType() | |
{ | |
osType=$(uname) | |
case "$osType" in | |
"Darwin") | |
echo "OS: MacOSX detected" | |
;; | |
"Linux") | |
echo "OS: Linux detected" | |
;; |
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
# generate list of variables from a properties file | |
# form : \$VARIABLE | |
# give it to envsubst command to avoid escaping others variable in template file | |
function generate-parameters-list-for-envsubst { | |
type=$1 | |
local pts | |
local pindex | |
unset parameters | |
pts=$(cat $properties|grep export|cut -d "=" -f 1|sed "s/export //g") |
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 | |
function check_jboss_is_running() { | |
echo "INFO: Waiting for JBoss to startup..." | |
echo -n "INFO: starting " | |
while [ ! -f "${JBOSS_HOME}/logs/server.log" ]; do | |
sleep 1 | |
echo -n "#" | |
done | |
echo -n "-log-" |
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 | |
# wait-for-postgres.sh | |
# source : https://docs.docker.com/compose/startup-order/ | |
set -e | |
host="$1" | |
shift | |
cmd="$@" |
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
yum update -y && yum -y install yum-utils | |
# Example for downloading rpm | |
declare -a arr=("nc.x86_64" "curl" "wget" "mlocate" "sudo" "dos2unix" "tar" "unzip" "passwd") | |
for p in "${arr[@]}"; do { yumdownloader $p; } done; | |
declare -a arr=(curl-7.19.7-53.el6_9.x86_64.rpm nc-1.84-24.el6.x86_64.rpm tar-1.23-15.el6_8.x86_64.rpm | |
dos2unix-3.1-37.el6.x86_64.rpm passwd-0.77-7.el6.x86_64.rpm unzip-6.0-5.el6.x86_64.rpm | |
mlocate-0.22.2-6.el6.x86_64.rpm sudo-1.8.6p3-29.el6_9.x86_64.rpm wget-1.12-10.el6.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 | |
rpm -q --requires $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
#!/bin/bash | |
apt-get -o Acquire::ForceIPv4=true -y update | |
apt-get -o Acquire::ForceIPv4=true -y dist-upgrade |
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 apt-get -y update | |
sudo apt-get -y install rpi-update | |
sudo rpi-update | |
sudo reboot |
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 installation | |
curl -sSL get.docker.com | sh | |
# docker-compose installation | |
pip install docker-compose | |
# fix issue "memory cgroup not supported" | |
# https://github.com/moby/moby/issues/35587 | |
# replace/adding "cgroup_enable=memory cgroup_memory=1" in /boot/cmdline.txt & reboot |
OlderNewer