echo "deb http://httpredir.debian.org/debian stretch-backports main" | tee /etc/apt/sources.list.d/backports.list
echo deb http://haproxy.debian.net stretch-backports-1.8 main | tee /etc/apt/sources.list.d/haproxy.list
curl https://haproxy.debian.net/bernat.debian.org.gpg | apt-key add -
apt-get update
apt-get install haproxy=1.8.\* -t stretch-backports
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 python | |
# -*- coding: utf-8 -*- | |
# Copyright (c) 2014-17 Richard Hull and contributors | |
# See LICENSE.rst for details. | |
# PYTHON_ARGCOMPLETE_OK | |
""" | |
Use misc draw commands to create a simple image. | |
Ported from: |
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
-- Changing spotify notifications. | |
naughty.config.presets.spotify = { | |
-- if you want to disable Spotify notifications completely, return false | |
callback = function(args) | |
return true | |
end, | |
-- Adjust the size of the notification | |
height = 100, | |
width = 400, |
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
SELECT | |
table_schema as `Database`, | |
table_name AS `Table`, | |
round(((data_length + index_length) / 1024 / 1024), 2) `Size in MB` | |
FROM information_schema.TABLES | |
ORDER BY (data_length + index_length) DESC; | |
SELECT table_schema as `Database`, table_name AS `Table`, round(((data_length + index_length) / 1024 / 1024), 2) `Size in MB` FROM information_schema.TABLES ORDER BY (data_length + index_length) DESC; |
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
# Get config from http://127.0.0.1:19999/netdata.conf | |
[backend] | |
data source = average | |
buffer on failures = 10 | |
enabled = yes | |
update every = 10 | |
prefix = netdata | |
destination = IP-DEST:4242 | |
timeout ms = 20000 |
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
echo 1 > /sys/module/kvm/parameters/ignore_msrs |
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 zlib1g-dev uuid-dev libmnl-dev gcc make git autoconf autoconf-archive autogen automake pkg-config curl | |
cd /opt | |
git clone https://github.com/firehol/netdata.git --depth=1 | |
cd netdata | |
./netdata-installer.sh | |
ln -s /opt/netdata/netdata-updater.sh /etc/cron.daily/netdata-updater | |
chown -Rf netdata:netdata /opt/netdata/web | |
service netdata restart |
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 | |
APPNAME=$1 | |
USER=$(whoami) | |
for PID in $(pgrep -u $USER $APPNAME); do TIME=$(ps --noheaders -o etimes $PID); if [ $TIME -gt 60 ];then kill -9 $PID;fi ;done |
Then, the complete steps are:
- Create qcow2 image
qemu-img create -f qcow2 foo.qcow2 2G
- Boot whit the new disc install basic OS, in my case, I download debian 7.11 iso