Skip to content

Instantly share code, notes, and snippets.

View Bambarello's full-sized avatar

Alex Bambarello

View GitHub Profile
@Bambarello
Bambarello / autofan.sh
Created March 9, 2018 19:33
NVIDIA-Multi GPU-Autofan-Ubuntu
#!/bin/bash
### BEGIN INIT INFO
# Name: Autofan script for NVIDIA Cards in HiveOS
# Preparation: Setting up script sheduled run from CRON (Crontab)
# 1) Copy script to /home/user/script/ (create folder script).
# 2) Run mc -> go to script folder
# 3) Make script executable - execute command in the same folder - chmod u+x autofan.sh.
# Sheduled-Start: 4) Edit crontab (sudo crontab -L) and add line */5 * * * * /home/user/script/autofan.sh
# This command will start script every 5 minutes, if you want to change - correct "*/5" value.
@Bambarello
Bambarello / vvl-mn-auto-install.sh
Created October 11, 2018 23:13
VVL wallet autoinstall Ubuntu 16.04
#/bin/bash
NONE='\033[00m'
RED='\033[01;31m'
GREEN='\033[01;32m'
YELLOW='\033[01;33m'
BOLD='\033[1m'
STEPS=10
COINDOWNLOADLINK1=https://github.com/VivaldiCoin/Vivaldi/releases/download/v1.1.1.1/vivaldid
#!/bin/bash
# Creating 1G swap
sudo fallocate -l 1G /swapfile
sudo chmod 600 /swapfile
sudo mkswap /swapfile
sudo swapon /swapfile
# Output on swap
sudo swapon --show
#!/bin/bash
### usage
## wget -O - https://gist.githubusercontent.com/Bambarello/93d529a19a28fa25ee95be2ab2e180e3/raw/968b3ebe96deda53d4bfd29f5f207f8222100d75/docker-utils-install.sh | bash
sudo apt-get update -y
sudo apt-get install -y wget curl tmux htop jq nano screen
# Purge old installations
@Bambarello
Bambarello / http-get-dos.conf
Created October 20, 2018 21:25 — forked from zettacristiano/http-get-dos.conf
Fail2ban Configuration
# Fail2Ban configuration file
#
# NOTE
# You should set up in the jail.conf file, the maxretry and findtime carefully in order to avoid false positives.
#
# Author: http://www.go2linux.org
# Modified by: samnicholls.net
# * Mon 6 Jun 2016 - Updated failregex to capture HOST group correctly
[Definition]
#!/bin/bash
sudo systemctl stop Binarium.service
sudo rm -r -f /root/.binariumcore/blocks
sudo rm -r -f /root/.binariumcore/chainstate
sudo rm -f /root/.binariumcore/banlist.dat
sudo rm -f /root/.binariumcore/mncache.dat
sudo rm -f /root/.binariumcore/peers.dat
@Bambarello
Bambarello / spend_tx.md
Created December 2, 2018 16:52
how to send spend tx from epoch, for the restless

Get your private key

To send a transaction from an account, you'd need to sign it beforehand. To sign it, you need the private key that corresponds to the account.

If you used bin/epoch keys_gen <password>, then you should have your private key in generated_keys/key and your public key (aka address) in generated_keys/key.pub. Let's read and decipher them.

erl shell detour

@Bambarello
Bambarello / ssh-attempts.txt
Last active December 30, 2018 16:08 — forked from gfoss/ssh-attempts.txt
grep IP addresses from auth logs to see attempted ssh attempts into your box w/ invalid creds {ubuntu}
#search for invalid logon attempts, pull out IP, remove dupes, sort...
$ grep -rhi 'invalid' /var/log/auth.log* | awk '{print $10}' | uniq | sort > ~/ips.txt
#look em up
$ for i in `cat ~/ips.txt`; do @nslookup $i 2>/dev/null | grep Name | tail -n 1 | cut -d " " -f 3; done > ~/who.txt
#search through system journal deamon all failed SSH attempts.
# journalctl _SYSTEMD_UNIT=ssh.service | egrep "Failed|Failure"
# journalctl _SYSTEMD_UNIT=sshd.service | egrep "Failed|Failure" #In RHEL, CentOS
!/bin/bash
# chmod 755 clearcache.sh
# Now set a cron to clear RAM cache everyday at 2am. Open crontab for editing.
# crontab -e
# Append the below line, save and exit to run it at 2am daily.
# 0 2 * * * /path/to/clearcache.sh
sync; echo 1 > /proc/sys/vm/drop_caches
sync; echo 2 > /proc/sys/vm/drop_caches

Keybase proof

I hereby claim:

  • I am bambarello on github.
  • I am bambarello (https://keybase.io/bambarello) on keybase.
  • I have a public key ASDzNvUI9gu1gXnPDRbbSHkRnpeBq7JuBS5LprzhnurPEAo

To claim this, I am signing this object: