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
$ apt-get install convmv | |
# more at https://linux.die.net/man/1/convmv | |
# compose (can be use as --nfd to decompose): | |
convmv -r -f utf-8 -t utf-8 --nfc --preserve-mtimes --nosmart --notest . |
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
# /etc/apache2/sites-available/kibana.conf | |
# create | |
<VirtualHost *:5601> | |
<Proxy *> | |
AuthUserFile /etc/kibana/kibana.htpasswd | |
AuthType basic | |
AuthName "Kibana" | |
require valid-user | |
</Proxy> |
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
[phpmyadmin] | |
enabled = true | |
port = 443 | |
filter = phpmyadmin | |
logpath = /var/log/auth.log | |
bantime = 3600 | |
findtime = 60 | |
maxretry = 7 |
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
# Fail2Ban filter to catch all http request | |
# | |
# Author: Alex Alouit <alexandre.alouit@gmail.com> | |
[Definition] | |
failregex = ^<HOST> -.*"(GET|HEAD|POST|PUT|DELETE|TRACE|CONNECT).* | |
ignoreregex = |
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
Freebox use 4242 as default uid and gid. |
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
$ apt-get install linux-headers-`uname -r` | |
$ apt-get install linux-source | |
$ mkdir -p ~/build/ath; cd ~/build/ath | |
$ tar -xvf /usr/src/linux-source-`uname -r`.tar.xz | |
# patch linux-source-`uname -r`/drivers/net/wireless/ath/regd.c | |
$ cp /boot/config-`uname -r` ~/build/ath/.config | |
$ cp /usr/src/linux-headers-`uname -r`/Module.symvers ~/build/ath/linux-source-`uname -r`/ | |
$ cd linux-source-`uname -r` |
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/python | |
import fileinput | |
import json | |
if __name__ == "__main__": | |
jsonStr = '' | |
for a_line in fileinput.input(): | |
jsonStr = jsonStr + ' ' + a_line.strip() | |
jsonObj = json.loads(jsonStr) | |
print json.dumps(jsonObj, sort_keys=True, indent=2) |
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
#!/bin/bash | |
# cron ex: @daily /root/scripts/adblock.sh >> /dev/null | |
# be sure dnsmasq load /etc/dnsmasq.d/*.conf | |
wget -O- https://raw.githubusercontent.com/StevenBlack/hosts/master/hosts | awk '$1 == "0.0.0.0" { print "address=/"$2"/0.0.0.0/"}' > /etc/dnsmasq.d/ad_hosts.conf | |
#/etc/init.d/dnsmasq restart | |
systemctl restart dnsmasq.service |
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
--- /root/Chromecast.xml.orig 2018-02-15 17:52:59.952340896 +0100 | |
+++ /usr/lib/plexmediaserver/Resources/Profiles/Chromecast.xml 2018-02-15 18:01:48.763665177 +0100 | |
@@ -7,6 +7,14 @@ | |
<PhotoProfile container="jpeg" /> | |
<SubtitleProfile container="ass" codec="ass" /> | |
</TranscodeTargets> | |
+ <DirectPlayProfiles> | |
+ <VideoProfile container="mp4,mkv" codec="h264" audioCodec="aac,mp3,ac3,pcm,flac,alac" /> | |
+ <MusicProfile container="mp4" codec="aac,alac" /> | |
+ <MusicProfile container="mp3" codec="mp3" /> |
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
#!/bin/bash | |
# | |
# cron ex: 1 0 * * * /usr/bin/nice -n 19 /usr/bin/ionice -c2 -n7 /root/scripts/cron-errors.sh >> /root/scripts/cron.log | |
email="" | |
dir="/tmp/" | |
file="/var/www/clients/client*/web*/private/cron*.log" | |
cd $dir |