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
instance-id: server1 | |
local-hostname: server1.example.com | |
network-interfaces: | | |
iface ens160 inet static | |
address 192.168.1.10 | |
network 192.168.1.0 | |
netmask 255.255.255.0 | |
broadcast 192.168.1.255 | |
gateway 192.168.1.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
<VirtualHost *:443> | |
ProxyPass / balancer://webcluster/ | |
ProxyPassReverse / balancer://webcluster/ | |
Header add Set-Cookie "ROUTEID=.%{BALANCER_WORKER_ROUTE}e; path=/; secure; HttpOnly" env=BALANCER_ROUTE_CHANGED | |
# Non SSL | |
# Header add Set-Cookie "ROUTEID=.%{BALANCER_WORKER_ROUTE}e; path=/; HttpOnly" env=BALANCER_ROUTE_CHANGED | |
</VirtualHost> | |
<Proxy balancer://webcluster> |
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
<?xml version="1.0" encoding="utf-8"?> | |
<service> | |
<short>Zabbix-Agent</short> | |
<description>Zabbix Agent listening port</description> | |
<port protocol="tcp" port="10050" /> | |
</service> |
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
# CAM-PDF install | |
cpan | |
> install CAM::PDF | |
# Replace text | |
changepagestring.pl -o -v input.pdf srctext dsttext output.pdf | |
# Ref: http://search.cpan.org/dist/CAM-PDF/bin/changepagestring.pl |
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
# Remove Postfix | |
systemctl stop postfix | |
systemctl disable postfix | |
yum remove postfix | |
# Remove Avahi | |
systemctl stop avahi-daemon.socket avahi-daemon.service | |
systemctl disable avahi-daemon.socket avahi-daemon.service | |
yum remove avahi-autoipd avahi-libs avahi |
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
#Enable Volume Shadow copy | |
clear | |
$Continue = Read-Host "Enable Volume Shadowcopy (Y/N)?" | |
while("Y","N" -notcontains $Continue){$Continue = Read-Host "Enable Volume Shadowcopy (Y/N)?"} | |
if ($Continue -eq "Y") { | |
#Enable Shadows | |
vssadmin add shadowstorage /for=C: /on=C: /maxsize=8128MB | |
vssadmin add shadowstorage /for=D: /on=D: /maxsize=8128MB | |
#Create Shadows |
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
// Use Gists to store code you would like to remember later on | |
console.log(window); // log the "window" object to the console |
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
diff --git a/etc/rc.carpbackup b/etc/rc.carpbackup | |
index 76cdfac..73ed0d7 100755 | |
--- a/etc/rc.carpbackup | |
+++ b/etc/rc.carpbackup | |
@@ -50,5 +50,9 @@ if (is_array($config['openvpn']) && is_array($config['openvpn']['openvpn-client' | |
} | |
} | |
+if (file_exists("/usr/local/etc/rc.d/quagga.sh")) { | |
+ // used to sleep(10); here, as apparently it worked around some issue w/2.0. w/2.1, it breaks things on systems with a significant number of CARP IPs. |
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 | |
# See: http://www.kfirlavi.com/blog/2012/11/06/elegant-locking-of-bash-program/ | |
readonly PROGNAME=$(basename "$0") | |
readonly LOCKFILE_DIR=/tmp | |
readonly LOCK_FD=200 | |
lock() { | |
local prefix=$1 | |
local fd=${2:-$LOCK_FD} |
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
// http://security.stackexchange.com/a/34552 | |
#include <stdio.h> | |
#if defined(__i386__) | |
static __inline__ unsigned long long rdtsc(void) | |
{ | |
unsigned long long int x; | |
__asm__ __volatile__ (".byte 0x0f, 0x31" : "=A" (x)); |