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 | |
# siteadd.sh script is used to add Unix-Accounts with surrounding setup for | |
# php-fpm, mysql and nginx to host a websie with a dedicated user-account | |
die(){ | |
echo -e "\033[31m${@}\033[0m" >&2; | |
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
#!/usr/bin/env bash | |
# checkserialdns.sh: checks if your DNS master and slaves are synchronised | |
# Copyright (C) 2014 Benedikt Heine <[email protected]> | |
# | |
# This program is free software: you can redistribute it and/or modify | |
# it under the terms of the GNU General Public License as published by | |
# the Free Software Foundation, either version 3 of the License, or | |
# (at your option) any later version. | |
# |
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 | |
# stop on first error | |
set -e | |
DEVICE=/dev/sdb | |
LUKS_DEVNAME=CRYPTsys-$(hostname) | |
VGROUP=VGsys-$(hostname) | |
LV_VOLUME_PREFIX=LV-$(hostname)- | |
PART_PREFIX=$(hostname)- |
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 | |
set -euo pipefail | |
DNS_REC=<your record> | |
SEC=<secret> | |
INTERVAL=1200 # in seconds | |
DNS_MASTER="$(dig SOA +short "${DNS_REC}")" | |
unchanged4() { |
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 | |
# 'ldd % | wc -l | grep -v ^1$' | |
# ^ if file is not a dynamic linked executable, ldd will print one line on STDOUT, but we have to ignore this | |
find $(echo $PATH | tr : ' ') -mindepth 1 -maxdepth 1 \ | |
| xargs -I% bash -c 'ldd % | wc -l | grep -v ^1$' \ | |
while read line;\ | |
do l=$((l + line));\ | |
done \ | |
&& echo $l |
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
FROM alpine | |
RUN apk add --no-cache \ | |
cairo \ | |
dbus \ | |
glib \ | |
gtk+3.0 \ | |
libxdg-basedir \ | |
libxft \ | |
libxinerama \ |
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
root/boot/ | |
root/lib/modules | |
root/usr/include/ | |
root/usr/src/ | |
root/usr/src/ | |
root/var/log/ | |
!root/var/log/nginx | |
!root/var/log/seafile | |
root/var/lib/apt | |
root/tmp/* |
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
# See for WSSE key generation this link: | |
# https://oroinc.com/orocrm/doc/2.0/cookbook/how-to-use-wsse-authentication | |
# Returns a dictionary of headers | |
def genheaders(user_name, user_key): | |
random = str(uuid.uuid4()).encode('ascii') | |
nonce = hashlib.md5(random).digest()[0:16] | |
curdate = datetime.datetime.now().replace(microsecond=0) | |
hash_digest = hashlib.sha1() | |
hash_digest.update(nonce) |
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
# PKGBUILD builds current coccinelle master, as the current coccinelle stable release is not buildable on ArchLinux anymore. | |
# Diff it against https://aur.archlinux.org/cgit/aur.git/commit/?h=coccinelle&id=540550d09c602fac376a87544833eda2a77e9647 | |
# Maintainer: Omar Sandoval <osandov at osandov dot com> | |
# Contributor: Roger Zanoni <[email protected]> | |
# Contributor: Sylvain Henry <[email protected]> | |
# Contributor: Marti Raudsepp <[email protected]> | |
# Contributor: Dan McGee <[email protected]> | |
# Contributor: LeCrayonVert <[email protected]> | |
# Contributor: Lukas Fleischer <[email protected]> |
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
/x |
OlderNewer