{
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
import boto3 | |
GROUPS_ALLUSERS = 'http://acs.amazonaws.com/groups/global/AllUsers' | |
GLOBAL_AUTHUSERS = 'http://acs.amazonaws.com/groups/global/AuthenticatedUsers' | |
s3 = boto3.client('s3') | |
list_buckets = s3.list_buckets()['Buckets'] | |
available_buckets = [] |
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 | |
curl -L get.rvm.io | bash -s stable | |
source ~/.rvm/rvm.sh | |
rvm requirements | |
rvm install 2.4 | |
rvm use 2.4 --default | |
rvm rubygems current | |
gem install rails |
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
# centos: libxslt-devel python-devel | |
# debian: | |
import re | |
import time | |
import requests | |
from bs4 import BeautifulSoup | |
from elasticsearch import Elasticsearch | |
es_client = Elasticsearch(['http://10.0.1.11:9200']) |
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
#!/usr/bin/env bash | |
# https://github.com/payara/Payara-Examples/tree/master/Administration-Samples | |
DOMAIN_NAME="u1t-domain" | |
PAYARA_HOME="/opt/payara" | |
ASADMIN=${PAYARA_HOME}/bin/asadmin | |
PORT_BASE="4800" | |
ADMIN_PORT=$(($PORT_BASE + 48)) | |
DEPLOYMENTS_LOCATION="/opt/payara/applications" |
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
#!/usr/bin/env bash | |
apt update && apt upgrade -y | |
apt install unzip software-properties-common python-software-properties -y | |
add-apt-repository ppa:webupd8team/java | |
echo debconf shared/accepted-oracle-license-v1-1 select true | debconf-set-selections | |
echo debconf shared/accepted-oracle-license-v1-1 seen true | debconf-set-selections | |
apt update | |
apt install oracle-java8-installer -y | |
echo 'JAVA_HOME="/usr/lib/jvm/java-8-oracle"' >> /etc/environment |
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
import getpass | |
text = getpass.getpass(prompt='Enter your passphrase to encrypt ') | |
print("You have entered: {}".format(text)) |
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
#!/usr/bin/python | |
import requests | |
import json | |
baseurl = 'https://coindata.co.za/api.php' | |
r = requests.get(baseurl).content | |
j = json.loads(r) | |
for crypto in j: |