This file contains hidden or 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 /* | |
encode/decode Outlook thread index. | |
GUID must be 32 bytes long | |
forked from brettp/thread-index.php | |
*/ |
This file contains hidden or 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/sh | |
# | |
# show manually installed packages under debian | |
# | |
aptHistory(){ | |
install_or_remove=$1 | |
for pkg in $(zgrep -hoE "apt(-get)? (-y )?$install_or_remove .*" /var/log/apt/history.log*gz);do | |
echo "$pkg" | |
done | sort|sort -u | grep -v '^-' |
This file contains hidden or 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 | |
# | |
# to use with Postfix. | |
# Exim users, get out of here! Write your own scripts. | |
# | |
set -e | |
serviceIP="127.0.0.2" | |
servicePort=1051 |
This file contains hidden or 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 | |
# | |
# setup mysql replication. | |
# run this script parallel on both servers as we need log file name and position on the other node | |
# | |
# | |
ROOT_PASS="rootP@ssw0rd" | |
REPLI_PASS="replicationP@ssw0rd" | |
SIBLING_IP="1.2.3.4" |
This file contains hidden or 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
[Unit] | |
Description = fotók betöltése | |
After=postgresql.service | |
Requires=postgresql.service | |
Wants=postgresql.service | |
[Service] | |
ExecStart = /home/szerver/foto-devtolt.py | |
ExecReload = /bin/kill -HUP $MAINPID |
This file contains hidden or 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
create view v_sizeof_dbs as | |
select datname dbname | |
,pg_size_pretty(pg_database_size(datname)) hsize | |
from pg_database | |
order by pg_database_size(datname) desc; | |
create view v_sizeof_tables as | |
SELECT table_catalog,table_schema,table_name | |
,pg_size_pretty(pg_table_size(table_schema||'.'||table_name)) table_hsize | |
FROM information_schema.tables |
This file contains hidden or 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
listener 1883 localhost | |
listener 2883 | |
certfile /etc/letsencrypt/live/my.example.com/cert.pem | |
cafile /etc/letsencrypt/live/my.example.com/chain.pem | |
keyfile /etc/letsencrypt/live/my.example.com/privkey.pem |
This file contains hidden or 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 | |
# | |
# control script for HAproxy backends. | |
# | |
# rare usage does not allow me to remember socket commands... | |
# @author ZsBT@GitHub | |
# | |
_socmd(){ echo "$*" | socat stdio $(egrep -o '[^ ]+\.sock' /etc/haproxy/haproxy.cfg); } | |
[ -z "$(which socat)" ] && { echo "error: socat not installed";exit 1; } |
This file contains hidden or 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 | |
# | |
# BTRFS maintenance | |
# scrub or balance all btrfs fs present on system | |
# | |
scrub() { | |
for device in $(mount -t btrfs | cut -d ' ' -f 1 |sort -u) ;do | |
echo "scrub $device" | |
btrfs scrub start -B -c 3 -n 9 -d $device || exit 1 |
This file contains hidden or 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/sh | |
sudo apt -y install apt-transport-https ca-certificates curl gnupg2 software-properties-common | |
curl -fsSL https://download.docker.com/linux/debian/gpg | sudo apt-key add - | |
sudo add-apt-repository -y \ | |
"deb [arch=amd64] https://download.docker.com/linux/debian \ | |
$(lsb_release -cs) \ | |
stable" |
OlderNewer