Skip to content

Instantly share code, notes, and snippets.


Block or report user

Report or block floreo

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
floreo /
Created Feb 28, 2018
Bash script to generate OCSP for HAProy
#!/usr/bin/env bash
# Generate OCSP file for every pem
# Set a cron every few hours or dayli
floreo /
Last active Jan 7, 2018
Server backup script using Duplicity and GnuPG
#!/usr/bin/env bash
_BACKUP_OUTPUT="$( mktemp )"
floreo / index.php
Last active Aug 16, 2018
Philips HUE reverse proxy
View index.php
* Activate proxy_module and proxy_http_module
$mac_address = [ '<mac address of the real bridge>', '<your fake Philips HUE mac address>' ];
$ip_hue = [ '<ip of the real bridge>', '<ip of your PI>' ];
$bridge_id = [ '<the real bridge id>', '<faked id bridge>' ];
floreo /
Created Sep 24, 2017
Philips HUE alert for GMAIL // make blink a lamp when finding emails
#!/usr/bin/env bash
_mail="" # without the
_mailcount="$( curl -u ${_mail}:${_password} --silent "" | sed -re 's@.*<fullcount>([0-9]+)</fullcount>.*@\1@' )"
if [ -n "${_mailcount}" ] && [ "${_mailcount}" -gt 0 ] ; then
curl -X PUT -d '{ "alert": "select" }' http://<hub IP>/api/<api key>/lights/<light number>/state &>/dev/null
floreo /
Created Jul 12, 2017
Bash script to import ICS into Radicale
#!/usr/bin/env bash
# This script import an ics calendar into Radicale
#TODO: check if the current calendar is up to date before to import it, I tried downloading it and comparing checksums but events ain't in the same order :(
declare -r _RADICALE_CALENDAR_URL="<URL of you Radicale calendar"
declare -r _ICS_CALENDAR_URL="<URL of your ICS calendar>"
declare -r _USERPASSWD="<user>:<password>"
floreo /
Created Jul 6, 2017
Funny script to make a graph of the current connections
#!/usr/bin/env bash
# requires graphviz
dot -Tpng -o network-$(date +%Y-%m-%d-%H-%M-%S).png < <(sudo netstat -ntu | awk 'BEGIN \
print "digraph network {\n\tsize=\"35\" node [shape = circle, style=filled];\n\tratio = fill;\n\trankdir=LR;"; \
} \
/^(ud|tc)p.+/ \
floreo /
Created May 2, 2017
Simple pid script
#!/usr/bin/env bash
while :
if [ ! -s "${_pid}" ] ; then
echo $$ >"${_pid}"
echo "Doing real stuff"
rm "${_pid}"
floreo / spoof.php
Last active Mar 10, 2017
Mail Spoofing Gmail like
View spoof.php
// howto: php -c <(echo "mail.add_x_header=0") mail.php
$to = "";
$from = "User <real from>";
$spoof="fake mail";
$headers = "Reply-To: $spoof\r\n" .
"Content-type: text/plain; charset=utf-8\r\n".
floreo /
Last active Mar 12, 2017
bash script to generate Let's Encrypt certificates through Acme Tiny
#!/usr/bin/env bash
## README ##
# * Whats does it require ?
# To download or clone inside _LE_ACME_DIR
# * How to write a correct conf file ?
# Write a file named myname.conf inside _LE_CONF_DIR
# hHre's the content:
floreo /
Created Jan 23, 2017
mysqldump script using pt-show-grants
#!/usr/bin/env bash
# wget
declare -r \
_BACKUP_DIR="/root/backup/" \
# Get the real number of backup occurrences and delete the old ones
function delete () {
You can’t perform that action at this time.