Skip to content

Instantly share code, notes, and snippets.

View joe-speedboat's full-sized avatar
🙃
AiHoi!

Chris Rüttimann joe-speedboat

🙃
AiHoi!
View GitHub Profile
@m-radzikowski
m-radzikowski / script-template.sh
Last active May 4, 2024 04:13
Minimal safe Bash script template - see the article with full description: https://betterdev.blog/minimal-safe-bash-script-template/
#!/usr/bin/env bash
set -Eeuo pipefail
trap cleanup SIGINT SIGTERM ERR EXIT
script_dir=$(cd "$(dirname "${BASH_SOURCE[0]}")" &>/dev/null && pwd -P)
usage() {
cat <<EOF
Usage: $(basename "${BASH_SOURCE[0]}") [-h] [-v] [-f] -p param_value arg1 [arg2...]
root@datexis-master2:/data/brick1# gluster volume get fast all
Option Value
------ -----
cluster.lookup-unhashed on
cluster.lookup-optimize on
cluster.min-free-disk 10%
cluster.min-free-inodes 5%
cluster.rebalance-stats off
cluster.subvols-per-directory (null)
cluster.readdir-optimize off
@bmaupin
bmaupin / open-source-sso.md
Last active April 11, 2024 09:36
Comparison of some open-source SSO implementations

ⓘ This list is not meant to be exhaustive and is not guaranteed to be maintained. See the comments for updates and alternative options.

(Items in bold indicate possible concerns)

Keycloak WSO2 Identity Server Gluu CAS OpenAM Shibboleth IdP
OpenID Connect/OAuth support yes yes yes yes yes yes
Multi-factor authentication yes yes yes yes yes yes
Admin UI yes yes yes yes yes no
OpenJDK support yes yes partial² yes
@justdave
justdave / kickstucklocks.sh
Created March 3, 2018 10:31
Zimbra 8.8.5 seems to freeze up on me periodically. I wrote this script to automatically kick it when it happens to avoid getting calls from users at odd hours complaining that they couldn't check their mail.
#!/bin/bash
# Script to automatically restart mailboxd when IMAP mailboxes fail to lock
# (which usually indicates the server has hung)
#
# Configure MAILTO to match where you want the notification email sent.
#
# Prerequisite: You must install LogWarn, which can be found at
# https://github.com/archiecobbs/logwarn if your package manager doesn't have
# it.
@superseb
superseb / readme.md
Created October 27, 2017 09:34
Infoblox external-dns testing
@jaredcatkinson
jaredcatkinson / Get-KerberosTicketGrantingTicket.ps1
Last active February 24, 2024 15:19
Kerberos Ticket Granting Ticket Collection Script and Golden Ticket Detection Tests
function Get-KerberosTicketGrantingTicket
{
<#
.SYNOPSIS
Gets the Kerberos Tickets Granting Tickets from all Logon Sessions
.DESCRIPTION
Get-KerberosTicketGrantingTicket uses the Local Security Authority (LSA) functions to enumerate Kerberos logon sessions and return their associate Kerberos Ticket Granting Tickets.
@Nihhaar
Nihhaar / linux_performance.md
Created September 18, 2017 18:42 — forked from marianposaceanu/linux_performance.md
Linux simple performance tweaks

Linux simple performance tweaks

Change the I/O Scheduler

Open $ vim /etc/default/grub then add elevator=noop next to GRUB_CMDLINE_LINUX_DEFAULT. Run $ update-grub and $ cat /sys/block/sda/queue/scheduler to be sure that noop is being used:

$ vim /etc/default/grub
$ update-grub
$ cat /sys/block/sda/queue/scheduler

[noop] deadline cfq

[mysqld]
sql_mode=no_engine_substitution,no_unsigned_subtraction
default_tmp_storage_engine=MyISAM
sync_relay_log_info=100
relay_log_recovery=1
relay_log_info_repository=FILE
innodb_purge_threads=8
innodb_compression_pad_pct_max=37
innodb_compression_failure_threshold_pct=10
innodb_flush_neighbors=0
@geerlingguy
geerlingguy / ansible-role-test.sh
Last active January 18, 2024 17:37
Ansible Role Test Shim Script
#!/bin/bash
#
# Ansible role test shim.
#
# Usage: [OPTIONS] ./tests/test.sh
# - distro: a supported Docker distro version (default = "centos7")
# - playbook: a playbook in the tests directory (default = "test.yml")
# - role_dir: the directory where the role exists (default = $PWD)
# - cleanup: whether to remove the Docker container (default = true)
# - container_id: the --name to set for the container (default = timestamp)
@Schm1tz1
Schm1tz1 / make_rtlsdr.sh
Last active February 22, 2018 23:30
Script for building RTL-SDR-Stuff, Gnuradio, GQRX....
#!/bin/bash
STD_PREFIX="/opt/radio"
HERE=$PWD
bold(){
echo -e \\033[1m$*\\033[0m
}
boldn(){