This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/* | |
* Activate proxy_module and proxy_http_module | |
*/ | |
ignore_user_abort(true); | |
$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>' ]; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
# apt install xboxdrv | |
# added at session opening | |
# visudo -f /etc/sudoers.d/xbox360 | |
# floreo ALL = (root) NOPASSWD: /usr/bin/xboxdrv | |
sudo xboxdrv --daemon --dbus session \ | |
-i 0 --wid 0 --detach-kernel-driver --mimic-xpad \ | |
--next-controller -i 0 --wid 1 --detach-kernel-driver --mimic-xpad \ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
# Generate OCSP file for every pem | |
# http://www.jinnko.org/2015/03/ocsp-stapling-with-haproxy.html | |
# Set a cron every few hours or dayli | |
## CONFIGURATION ## | |
_LE_ROOT_DIR="/root/LE/" | |
_LE_CONF_DIR="${_LE_ROOT_DIR}conf/" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
_FTP_PASSWORD="" | |
_FTP_USER="" | |
_FTP_HOST="" | |
_FTP_DIRECTORY="" | |
_GPG_KEY="" | |
_BACKUP_OUTPUT="$( mktemp )" | |
_BACKUP_EMAIL="" | |
_BACKUP_TYPE="incremental" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
_mail="" # without the @gmail.com | |
_password="" | |
_mailcount="$( curl -u ${_mail}:${_password} --silent "https://mail.google.com/mail/feed/atom" | 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 | |
fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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>" | |
_TEMPORARY_ICS="$(mktemp)" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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.+/ \ | |
{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
_pid="$HOME/$0.pid" | |
while : | |
do | |
if [ ! -s "${_pid}" ] ; then | |
echo $$ >"${_pid}" | |
echo "Doing real stuff" | |
rm "${_pid}" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
## README ## | |
# | |
# * Whats does it require ? | |
# To download or clone https://github.com/diafygi/acme-tiny 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: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?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". |
NewerOlder