Skip to content

Instantly share code, notes, and snippets.

View asciitohex's full-sized avatar

0x640x610x670x6f asciitohex

View GitHub Profile
@asciitohex
asciitohex / gist:ec24762ae4cdf94d685d6f15db6239a1
Created November 23, 2017 11:08
AMD LINUX - Download AMD driver and SDK
# Download AMD driver and SDK
cd /tmp
sudo apt-get update && sudo apt-get upgrade
sudo apt-get install p7zip-full
# Install AMD Driver
wget --referer="http://support.amd.com/en-us/kb-articles/Pages/AMDGPU-PRO-Install.aspx" https://www2.ati.com/drivers/linux/ubuntu/amdgpu-pro-16.50-362463.tar.xz
7z x amdgpu-pro-16.50-362463.tar.xz && 7z x amdgpu-pro-16.50-362463.tar
chmod +x amdgpu-pro-16.50-362463/amdgpu-pro-install
sudo amdgpu-pro-16.50-362463/amdgpu-pro-install
du -h / | grep '[[:digit:]]G\b'
sudo fallocate -l 4G /swapfile
sudo chmod 600 /swapfile
sudo mkswap /swapfile
sudo swapon /swapfile
check it out – more memory in swap!
Now make the swap work better. Add a line to this file
@asciitohex
asciitohex / gist:34eefff66e1fd62b159294392b5c2c68
Created January 10, 2018 11:18
show all banned ip with fail2ban
iptables -L -n | awk '$1=="REJECT" && $4!="0.0.0.0/0" {print $4}' | grep 172
#!/usr/bin/env bash
# IMPORTANT: Run this script from /home/<USER>/ directory: bash -c "$(curl SCRIPT_URL)"
# (optional): Preparing the environment if you want to install zen from source:
# Once you get the VM up and running you need to login with your root account and run below commands.
# apt-get update && apt-get upgrade -y
# apt-get install -y build-essential pkg-config libc6-dev m4 g++-multilib autoconf libtool ncurses-dev unzip git python zlib1g-dev wget bsdmainutils automake libgtk2.0-dev && apt-get autoremove -y
@asciitohex
asciitohex / fail2ban-unban-ip.sh
Created February 15, 2018 09:30 — forked from yolabingo/fail2ban-unban-ip.sh
shell script to remove IPv4 addresses from all fail2ban jails
#!/usr/bin/env bash
function print_help {
echo "remove an ip address from all fail2ban jails"
echo "$(basename $0) ip_address [ip_address] [ip_address]"
}
if [[ -z "$@" ]]
then
print_help
fi
/var/ossec/bin/ossec-control stop && rm -rf /var/ossec && rm /etc/init.d/*ossec* && rm /etc/ossec-init.conf
@asciitohex
asciitohex / zbalance.sh
Created April 7, 2018 08:33 — forked from lorepozo/zbalance.sh
zbalance: quickly get your zcash addresses (taddr and zaddr) and their balances
#!/bin/sh
# zbalance: quickly get your zcash addresses (taddr and zaddr) and their balances.
# REQUIRES zcash-cli (https://z.cash) AND jq (https://stedolan.github.io/jq)
zaddr_withbalance () {
while read a
do echo $(zcash-cli z_getbalance $a) $a
done
}
#!/bin/sh
###############################################################################
#
# install-full-node.sh
#
# This is the earn.com install script for Bitcoin full node based on Bitcoin Core.
# Originally published by ayeowch@gmail.com! Thanks!
#
# This script attempts to make your node automatically reachable by other nodes
<?php
function pan_price(){
$pan_price_old = 0;
$first_loop_done = 0;
$str = file_get_contents('https://kg7jyq8yn3nzcwzxnl7r.bitpanda.com/v1/ticker');
$json = json_decode($str, true);
$time_now = date('H:i:s');
$pan_price_new = $json['PAN']['EUR'];