Skip to content

Instantly share code, notes, and snippets.

View korovamilk's full-sized avatar
🏠
Working from home

Marco Agate korovamilk

🏠
Working from home
View GitHub Profile
@tonek
tonek / jetty.sh
Last active December 16, 2015 01:48
install jetty 9 CentOS
cd ~
sudo wget http://eclipse.org/downloads/download.php?file=/jetty/stable-9/dist/jetty-distribution-9.2.1.v20140609.tar.gz -O jetty.tar.gz
tar -xf jetty.tar.gz
rm -rf jetty.tar.gz
mv jetty-* jetty
sudo /usr/sbin/useradd jetty
sudo mv jetty /srv/
@dkrizic
dkrizic / notify_by_pushover.sh
Created January 2, 2014 23:39
notify_by_pushover.sh
#!/bin/bash
# Notify by Pushover
# by Jedda Wignall
# http://jedda.me
# v1.2.1 - 17 Mar 2013
# Now parses title and message for sound processing.
# v1.2 - 18 Dec 2012
@ashevchuk
ashevchuk / gist:8e9d43277f30ffb993d5
Last active May 5, 2016 01:45
FreeBDS installation process @cloudatcost VPS provider
For example, we need two VMs in the same network:
104.1.1.5 - debian linux
104.1.1.6 - host, where we want to install FreeBSD
00:50:66:be:70:c9 - ethernet address, where we installing FreeBSD
Network:
104.1.1.0 - our network
255.255.255.0 - our network mask
104.1.1.255 - our network broadcast address
104.1.1.1 - our network gateway
@tancnle
tancnle / setup_mosh_centos.sh
Last active December 5, 2019 03:01
Setup mosh on Centos 6.x
#!/bin/sh
# Update latest epel
wget http://dl.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch.rpm
sudo rpm -Uvh epel-release-6-8.noarch.rpm
# Download and build mosh
sudo yum -y install rpm-build rpmdevtools protobuf-compiler protobuf-devel libutempter-devel zlib-devel ncurses-devel openssh-clients perl-IO-Tty openssl-devel gcc gcc-c++
rpmdev-setuptree
cd ~/rpmbuild/SOURCES
@mrlesmithjr
mrlesmithjr / logstash.conf
Last active February 19, 2020 08:22
Logstash Configuration File
input {
redis {
host => "127.0.0.1"
data_type => "list"
key => "logstash"
}
}
input {
udp {
type => "syslog"
@ah8r
ah8r / README.md
Last active June 7, 2020 19:51
Hut3 Cardiac Arrest (compatible with Python 2.7)

Cardiac Arrest

Hut3 Cardiac Arrest - A script to check OpenSSL servers for the Heartbleed bug (CVE-2014-0160).

Note: This code was originally a GitHub Gist but has been copied to a full GitHub Repository so issues can also be tracked. Both will be kept updated with the latest code revisions.

DISCLAIMER: There have been unconfirmed reports that this script can render HP iLO unresponsive. This script complies with the TLS specification, so responsitivity issues are likely the result of a bad implementation of TLS on the server side. CNS Hut3 and Adrian Hayter do not accept responsibility if this script crashes a server you test it against. USE IT AT YOUR OWN RISK. As always, the correct way to test for the vulnerability is to check the version of OpenSSL installed on the server in question. OpenSSL 1.0.1 through 1.0.1f are vulnerable.

This script has several advantages over similar scripts that have been re

@GabLeRoux
GabLeRoux / fix-ssl-cert-snakeoil.key-ubuntu-postgresql.sh
Created April 1, 2016 06:39
Fix postgresql error FATAL: could not access private key file "/etc/ssl/private/ssl-cert-snakeoil.key": Permission denied
# > It happened to me and it turned out that I removed erroneously the postgres user from "ssl-cert" group, set it back with
gpasswd -a postgres ssl-cert
# Fixed ownership and mode
sudo chown root:ssl-cert /etc/ssl/private/ssl-cert-snakeoil.key
sudo chmod 740 /etc/ssl/private/ssl-cert-snakeoil.key
# now postgresql starts! (and install command doesn't fail anymore)
sudo /etc/init.d/postgresql start
@starkers
starkers / prune_old_vols.sh
Last active August 28, 2023 11:11
prune delete and remove old bacula volumes
#!/usr/bin/env bash
#set -x
# Prune and volumes older than 2 months:
PAST=`date --date='-2 months 0 day ago' +%Y-%m-%d`
#EG a hard coded date
#PAST="2012-11-29"
#PAST="2013-11-29"
@JeffBelback
JeffBelback / docker-destroy-all.sh
Last active December 12, 2023 17:47
Destroy all Docker Containers and Images
#!/bin/bash
# Stop all containers
containers=`docker ps -a -q`
if [ -n "$containers" ] ; then
docker stop $containers
fi
# Delete all containers
containers=`docker ps -a -q`
if [ -n "$containers" ]; then
docker rm -f -v $containers
@jovimon
jovimon / openvpn-telegram.md
Last active February 18, 2024 07:08
Telegram notifications for (dis)connections to my pfSense OpenVPN Server

OpenVPN Telegram Notifier

Features

Each time a client (dis)connects to the OpenVPN server of pfSense a new Telegram notification will be sent.

pfSense WebGUI configuration

Under "VPN" > "Servers" > your server > "Advanced Configuration" > "Custom Options" add the following lines.

client-connect    /root/openvpn-telegram.sh
client-disconnect /root/openvpn-telegram.sh