Skip to content

Instantly share code, notes, and snippets.

View RafalSladek's full-sized avatar

Rafal Sladek RafalSladek

  • AutoScout24
  • Munich, Germany
View GitHub Profile
#This script was written by REXOVAS to automate 90% of a ZEN Secure Node setup process for an IPv4 node.
#Parts of this script were adapted from a script by github user rnkhouse
#rnkhouse script found here: https://gist.github.com/rnkhouse/f7f04f0cb10b596e2c6623275968a220
#Prior to running this script, please ensure that you are not signed in as root, and have completed all steps up until the copying
#of authentication key pairs in this guide: https://blockoperations.com/build-zencash-secure-node-part-1-prepare-vps/
#This script performs all actions described in the 3 guides found on blockoperations.com. It compiles zend from source.
#This script installs both Monit and PM2 and automatically configures monit to monitor zend.
#WARNING: This script is intended for use by advanced Linux users. Please read through this script thoroughly to ensure that
## Go to HELP → Edit Custom VM Options
## and adjust or add new values. I am using following config values
-Xms128m
-Xmx2048m
-XX:ReservedCodeCacheSize=512m
-XX:+UseCompressedOops
-XX:MaxMetaspaceSize=1024m
@RafalSladek
RafalSladek / ELK-install.sh
Created June 10, 2018 19:47 — forked from sniper7kills/ELK-install.sh
ELK-Install-Ubuntu-16.04
#/bin/bash
#Ask some info
echo -n "Enter ELK Server IP or FQDN: "
read eip
echo -n "Enter Admin Web Password: "
read adpwd
#Update System
sudo apt-get update
sudo apt-get upgrade -y
@RafalSladek
RafalSladek / setup_caddy_proxy.sh
Created June 10, 2018 14:34
install and setup caddy web proxy as service for monit, to server ssl and password protected access
#!/bin/bash
curl https://getcaddy.com | bash -s personal hook.service,http.datadog,http.forwardproxy,http.login,http.minify,http.nobots,http.ratelimit
# config
mkdir /etc/caddy
chown -R root:www-data /etc/caddy
cat << EOF > /etc/caddy/Caddyfile
alpharack1.crypto-pool.net/monit {
gzip
@RafalSladek
RafalSladek / cropstatus.sh
Last active June 10, 2018 14:32
script to get current status informations about your cropcoin daemon (put this into executable script in /usr/local/bin)
#!/bin/bash
CROPUSER=cropcoin
PUBLIC_IP=$(curl -s ipecho.net/plain)
sudo -u $CROPUSER -H sh -c "echo '{ \"timestamp\": \"`date`\", \"details\": ['; cropcoind masternode status; echo ','; cropcoind getinfo; echo ','; cropcoind masternode list full $PUBLIC_IP; echo ']}'"
@RafalSladek
RafalSladek / build_corpcoin.sh
Created June 9, 2018 20:25
you can use it to compile cropcoind under ubuntu 16.04
#!/bin/bash
apt -y install software-properties-common
apt-add-repository -y ppa:bitcoin/bitcoin
apt-get update
apt install -y make build-essential libtool software-properties-common autoconf libssl-dev libboost-dev libboost-chrono-dev libboost-filesystem-dev \
libboost-program-options-dev libboost-system-dev libboost-test-dev libboost-thread-dev sudo automake git pwgen curl libdb4.8-dev \
bsdmainutils libdb4.8++-dev libminiupnpc-dev libgmp3-dev pwgen
rm -rf CropDev
git clone https://github.com/Cropdev/CropDev.git
cd CropDev/src
@RafalSladek
RafalSladek / flash_raspbian.md
Last active May 20, 2018 20:04
sd card flashing instructions - raspberry

1. download image from official page - https://www.raspberrypi.org/downloads/raspbian/

2. unzip the image

3. after inserting your sd card for the raspberry pi, list all disks with following command

diskutil list

4. knowing how big is your card, look for disk number with this capacity

@RafalSladek
RafalSladek / docker-cleanup-resources.md
Last active May 25, 2018 09:22 — forked from bastman/docker-cleanup-resources.md
docker cleanup guide: containers, images, volumes, networks

Docker - How to cleanup (unused) resources

Once in a while, you may need to cleanup resources (containers, volumes, images, networks) ...

delete volumes

// see: https://github.com/chadoe/docker-cleanup-volumes

docker volume rm $(docker volume ls -qf dangling=true)
docker volume ls -qf dangling=true | xargs -r docker volume rm
@RafalSladek
RafalSladek / 12MonthsInOracle.sql
Created March 14, 2018 22:20
create 12 months in oracle
select add_months(date '2018-01-01',rownum-1) mth from dual connect by level <= 12;
@RafalSladek
RafalSladek / installDockerUbuntu.sh
Created February 13, 2018 23:18
how to install docker ce on ubuntu
#!/bin/bash
sudo -s
sudo apt-get update
wget -qO- https://get.docker.com/ | sh