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
# prerequisites: | |
## install software | |
apt install mariadb-server libmariadbclient-dev sqlite3 | |
## install mysqlclient in virtualenv | |
su -c 'homeassistant/bin/pip3 install mysqlclient --upgrade' -l homeassistant | |
## create database | |
mysql -e 'CREATE SCHEMA IF NOT EXISTS `hass_db` DEFAULT CHARACTER SET utf8' | |
## create user (use a safe password please) | |
mysql -e "CREATE USER 'hass_user'@'localhost' IDENTIFIED BY 'hass_pw'" | |
mysql -e "GRANT ALL PRIVILEGES ON hass_db.* TO 'hass_user'@'localhost'" |
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
auto vmbr1 | |
iface vmbr1 inet manual | |
bridge_ports eth0 | |
bridge_stp off | |
bridge_fd 0 | |
up /sbin/sysctl -w net.ipv6.conf.$IFACE.disable_ipv6=1 | |
up /sbin/sysctl -w net.ipv6.conf.$IFACE.autoconf=0 | |
up /sbin/sysctl -w net.ipv6.conf.$IFACE.accept_ra=0 | |
up ip link set dev $IFACE arp off | |
up ip link set dev eth0 arp off |
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
URxvt*scrollBar_right: True | |
URxvt*scrollBar_floating: True | |
URxvt*scrollWithBuffer: True | |
URxvt*scrollTtyKeypress: True | |
URxvt*scrollTtyOutput: False | |
URxvt*visualBell: True | |
URxvt*font: -*-fixed-medium-r-normal-*-13-*-*-*-*-70-iso10646-1 | |
URxvt*boldFont: -*-fixed-bold-r-normal-*-13-*-*-*-*-70-iso10646-1 | |
URxvt*background: black | |
URxvt*foreground: white smoke |
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
[ ... ] | |
auto vmbr0 | |
iface vmbr0 inet static | |
[ ... ] | |
post-up echo 1 > /proc/sys/net/ipv4/ip_nonlocal_bind | |
post-up iptables -t mangle -N DIVERT | |
post-up iptables -t mangle -A PREROUTING -p tcp -m socket -j DIVERT | |
post-up iptables -t mangle -A DIVERT -j MARK --set-mark 74 | |
post-up iptables -t mangle -A DIVERT -j ACCEPT |
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
# change this to whatever you need | |
export DPI=165 | |
# hardly useful | |
xrandr --dpi $DPI | |
# used by a couple of legacy applications | |
echo 'Xft.dpi: '$DPI | xrdb -merge - | |
# the point here is to increase the mouse cursor size - adjust to your preference |
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 | |
[ -f "$1" ] && . "$1" | |
[ "$2" ] && ACTION="$2" | |
[ "$2" ] && OPTIM="" | |
for ref in $(seq $MAX -1 $MIN) | |
do | |
IDX="${PREFIX}$(date -d @$(($(date +%s)-(${INTERVAL}*${ref}))) +${PATTERN})" |
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
# monthly syslog indices | |
template(name="logstash-index" | |
type="list") { | |
constant(value="logstash-syslog-") | |
property(name="timereported" dateFormat="rfc3339" position.from="1" position.to="4") | |
constant(value=".") | |
property(name="timereported" dateFormat="rfc3339" position.from="6" position.to="7") | |
} | |
# most data we can get |
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 ruby | |
require 'yaml' | |
require 'puppet' | |
if ARGV[0] == 'config' | |
puts <<END | |
graph_args --base 1000 -l 0 -M | |
graph_vlabel value | |
graph_title Puppet stats |
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
# This is a 256 colors MidnightCommander color scheme | |
# based on the Xoria256 color scheme by Alexander Glyzov (isee@inbox.ru) | |
# Note you'll need mc > 4.7.5 for this scheme to work (256 colors support) | |
# Hint: compile from the git repository | |
[skin] | |
description=itSdark256 | |
256colors=true |
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/perl | |
use strict; | |
use warnings; | |
use Net::Jabber; | |
use POSIX qw(strftime); | |
my %vars = map { s/^ICINGA//; $_=>$ENV{"ICINGA$_"} } grep /^ICINGA.+/, keys %ENV; | |
my $recip = $ENV{'JABBERADDRESS'}; |