Skip to content

Instantly share code, notes, and snippets.

@xmppjingle
xmppjingle / PasswordUtils.kt
Created July 17, 2020 09:59
Kotlin PasswordUtils
import java.security.NoSuchAlgorithmException
import java.security.SecureRandom
import java.security.spec.InvalidKeySpecException
import java.util.*
import javax.crypto.SecretKeyFactory
import javax.crypto.spec.PBEKeySpec
class PasswordUtils {
companion object {
private val random: Random = SecureRandom()
#export CS_API_KEY=WHATEVERa6077d1
FN=`curl -F file=@$1 https://www.cloudshark.org/api/v1/$CS_API_KEY/upload | jq -r '.id'`
echo https://www.cloudshark.org/captures/$FN
@xmppjingle
xmppjingle / setup.sh
Created March 19, 2018 14:07
All-One.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
@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"
#!/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
#!/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
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
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
@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