Skip to content

Instantly share code, notes, and snippets.

@xmppjingle
xmppjingle / ikv.sh
Last active July 6, 2016 20:02
Cross Platform Shell Based KV Template
#!/bin/bash
#Cross Platform Shell Based KV Template
# Usage: ./iks.sh . VAR1=test VAR2=Temp GOAL=Exceed ROCK=nRoll
# Usage for Mustache {{Keys}}: ./iks.sh . -m VAR1=test VAR2=Temp GOAL=Exceed ROCK=nRoll
MM=false
if [ "$1" = "-m" ]; then
MM=true
shift
fi
@xmppjingle
xmppjingle / gist:c9a21950ed2911e07f474970ce58fcb1
Created July 8, 2016 21:34
ejabberd machine preparation
apt-get remove erl
apt-get purge erlang*
apt-get install gcc ncurse* make
apt-get install autotools-dev libyaml-dev libexpat-dev
apt-get install build-essential autoconf libncurses5-dev openssl libssl-dev fop xsltproc unixodbc-dev git
curl -O https://raw.githubusercontent.com/kerl/kerl/master/kerl
chmod a+x kerl
export CFLAGS="-DOPENSSL_NO_EC=1"
CFLAGS="-DOPENSSL_NO_EC=1" ./kerl build 18.3 erl18.3
./kerl install erl18.3 /opt/erl18.3
@xmppjingle
xmppjingle / gist:996f066090ee954711b07913ad4255d1
Created September 15, 2016 14:19
ejabberd install generic
git clone https://github.com/xmppjingle/ejabberd.git
cd ejabberd
. /opt/erl18.3/activate
./autogen.sh
./configure
make
sudo make install
cd ..
HOST=`hostname`
@xmppjingle
xmppjingle / FS Prep
Last active February 13, 2018 00:07
sudo apt-get -y install autoconf automake devscripts gawk g++ git-core
sudo apt-get -y install libjpeg-dev libncurses5-dev libtool make python-dev gawk pkg-config
sudo apt-get -y install libtiff5-dev libperl-dev libgdbm-dev libdb-dev gettext equivs
sudo apt-get -y install mlocate git dpkg-dev devscripts wget sox flac librabbitmq-dev
sudo apt-get -y install libpcre3-dev libedit-dev libsqlite3-dev
sudo apt-get -y install libogg-dev libspeex-dev libspeexdsp-dev
sudo apt-get -y install unixodbc-dev libpq-dev python-all-dev
sudo apt-get -y install doxygen uuid-dev libldns-dev libopus-dev
sudo apt-get -y install libsndfile1-dev libflac-dev libvorbis-dev liblua5.2-dev
sudo apt-get -y install dpatch ftp
#!/bin/bash
sudo apt-get update
# Keys
sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv 2930ADAE8CAF5059EE73BB4B58712A2291FA4AD5
# Repos
echo "deb http://repo.mongodb.org/apt/debian jessie/mongodb-org/3.6 main" | sudo tee /etc/apt/sources.list.d/mongodb-org-3.6.list
# Debian 7
#!/bin/bash
sudo apt-get update
# Properties
sudo apt-get install -y software-properties-common
# Add Repos
sudo add-apt-repository "deb http://ppa.launchpad.net/webupd8team/java/ubuntu xenial main"
#!/bin/bash
# Update
sudo apt-get update
# Properties
sudo apt-get install -y software-properties-common
# Install Java
sudo apt-get install -y redis-server
#!/bin/bash
# Update
sudo apt-get update
# Properties
sudo apt-get install -y software-properties-common
# Install Java
sudo apt-get install -y rabbitmq-server
@xmppjingle
xmppjingle / debian_7_elastic.sh
Last active February 22, 2018 22:38
debian_7_elastic.sh
#!/bin/bash
sudo apt-get update
# Properties
sudo apt-get install -y software-properties-common
# Add Repos
sudo add-apt-repository "deb http://ppa.launchpad.net/webupd8team/java/ubuntu xenial main"
@xmppjingle
xmppjingle / debian_8_erlang.sh
Created February 28, 2018 21:08
debian_8_erlang
#!/bin/bash
sudo apt-get -y install g++ ncurse* make
sudo apt-get -y install autotools-dev libyaml-dev libexpat-dev libexpat-dev
sudo apt-get -y install build-essential autoconf libncurses5-dev openssl libssl-dev fop xsltproc unixodbc-dev git curl
curl -O https://raw.githubusercontent.com/kerl/kerl/master/kerl
chmod a+x kerl
export CFLAGS="-DOPENSSL_NO_EC=1"
CFLAGS="-DOPENSSL_NO_EC=1" ./kerl build 20.1 erl20.1
./kerl install erl20.1 /opt/erl20.1