Skip to content

Instantly share code, notes, and snippets.

@lucagervasi
lucagervasi / hs110.sh
Created February 8, 2018 12:23 — forked from Khoulaiz/hs110.sh
hs110.sh -- bash script to toggle wall plug from TP-LINK and check status
#!/bin/bash
##
# Switch the TP-LINK HS100 wlan smart plug on and off, query for status
# Tested with firmware 1.0.8
#
# Credits to Thomas Baust for the query/status/emeter commands
#
# Author George Georgovassilis, https://github.com/ggeorgovassilis/linuxscripts
#
@lucagervasi
lucagervasi / install.md
Created September 21, 2017 18:26 — forked from floehopper/install.md
Install rtl-sdr on Raspian on Raspberry Pi
jamesmead@floehopper.local:~$ sudo dd bs=1m if=/Users/jamesmead/Downloads/2015-02-16-raspbian-wheezy.img of=/dev/disk2
pi@raspberrypi ~ $ sudo raspi-config
# Choose option 1 to "Expand Filesystem" - Ensures that all of the SD card storage is available to the OS
# Choose Finish & reboot

pi@raspberrypi ~ $ sudo apt-get update
@lucagervasi
lucagervasi / trim.awk
Created July 10, 2017 13:04 — forked from andrewrcollins/trim.awk
ltrim(), rtrim(), and trim() in awk
function ltrim(s) { sub(/^[ \t\r\n]+/, "", s); return s }
function rtrim(s) { sub(/[ \t\r\n]+$/, "", s); return s }
function trim(s) { return rtrim(ltrim(s)); }
BEGIN {
# whatever
}
{
# whatever
}
END {

Keybase proof

I hereby claim:

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

To claim this, I am signing this object:

#!/bin/bash
db=zabbix
for f in history history_log history_str history_text history_uint
do
mysqldump --no-create-info --lock-tables $db $f > `date +"%Y-%m-%d"`_$f.sql
done
for f in acknowledges alerts auditlog events service_alarms trends trends_unit
- name: "Configure php-fpm istance pools"
template:
src: config/php-fpm/pool.conf.j2
dest: "/config/{{item[0]}}/fpm-pools.d/{{item[1]}}"
with_nested:
- "{{fpm_istances}}"
- "fpmistance::{{item[0]}}::pools"
This is in the yaml
---