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 | |
# Usage: | |
# [BACKUP_DIR=/var/backups] \ | |
# [RETENTION=30] \ | |
# [WSREP_DESYNC=true] \ | |
# ./mariadb-backup.sh <hostname> <database> <user> <password> [<port>] | |
DB_HOST=${1} | |
DB_NAME=${2} |
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 python | |
# configure this in my.cnf on a Galera-based MySQL-alike server: | |
# wsrep_notify_cmd=/usr/local/sbin/wsrep_notify_slack | |
import argparse | |
import json | |
import os | |
import socket | |
import urllib2 |
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
# /etc/systemd/system/var-lib-docker-volumes.mount | |
# Mounts a Gluster volume on /var/lib/docker/volumes | |
# | |
[Unit] | |
Description=docker volumes | |
Before=docker.service | |
[Mount] | |
What={{gluster_server}}:/{{gluster_volume}} |
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
/* Add a gradient to GH labels */ | |
:root .hx_IssueLabel, | |
[data-color-mode=light][data-light-theme*=light] .hx_IssueLabel, | |
[data-color-mode=dark][data-dark-theme*=light] .hx_IssueLabel { | |
--lightness-threshold: 0.7 !important; | |
--triad1: hsl( | |
calc(var(--label-h) + 10), | |
calc(var(--label-s) * 1%), | |
calc(var(--label-l) * 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 | |
if [ -z "$1" ]; then | |
echo "2:0:no volume provided" | |
exit 1 | |
fi | |
# volume bricks online = y | |
bricks=`sudo gluster volume info $1 | sed -nr 's/Number of Bricks:[^=]+= ([0-9]+)/\1/p'` | |
online=`sudo gluster volume status $1 detail | egrep 'Online.+Y' | wc -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
#!/bin/sh | |
systemctl status $1 > /dev/null 2>&1 | |
result=$? | |
if [ $result -ne 0 ]; then | |
echo "2:$result:$1 down" | |
else | |
echo "0:$result:$1 ok" | |
fi |
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
# /etc/bash/bashrc | |
# | |
# This file is sourced by all *interactive* bash shells on startup, | |
# including some apparently interactive shells such as scp and rcp | |
# that can't tolerate any output. So make sure this doesn't display | |
# anything or bad things will happen ! | |
# Test for an interactive shell. There is no need to set anything | |
# past this point for scp and rcp, and it's important to refrain from |
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
public class SPDisableEventFiring : SPEventReceiverBase, IDisposable | |
{ | |
private bool _eventFiringEnabled; | |
public SPDisableEventFiring() | |
{ | |
_eventFiringEnabled = base.EventFiringEnabled; | |
base.EventFiringEnabled = false; | |
} |