This file contains 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 | |
/** | |
* Checks where a serialize call would've failed. | |
*/ | |
public static function check($checking_key, $data, $path = [], $processed = []) { | |
try { | |
// Attempt to serialize the data to check for serializability. | |
serialize($data); | |
} catch (\Throwable $e) { |
This file contains 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 | |
# Define variables for holding positional arguments and options | |
POSITIONAL=() | |
OPTIONS=() | |
# Loop through all arguments passed to the script | |
while [[ $# -gt 0 ]] | |
do | |
key="$1" |
This file contains 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
const BaseInput = require('inquirer/lib/prompts/input'); | |
/** | |
* A custom inquirer input plugin that keeps requesting the same input until | |
* nothing is specified. | |
* Useful for taking in the same input multiple times e.g. tags. | |
*/ | |
class InputMultiplePrompt extends BaseInput { | |
constructor(...args) { |
This file contains 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 | |
# Script for finding invalid yaml files in the current directory. | |
# Requires the yq script. | |
for program in find yq; do | |
which "$program" > /dev/null || { echo "ERROR: '$program' program could not be found."; exit 1; } | |
done | |
if yq --version 2>/dev/null | grep -E "yq version [4-9]" > /dev/null; then |
This file contains 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 | |
#: Your comments here. | |
set -o errexit | |
set -o nounset | |
set -o pipefail | |
work_dir=$(dirname "$(readlink -f "${0}" 2> /dev/null)") | |
readonly conf_file="${work_dir}/script.conf" | |
readonly error_reading_conf_file=80 | |
readonly error_parsing_options=81 | |
readonly script_name="${0##*/}" |
This file contains 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/lib/_autoload.php b/lib/_autoload.php | |
index e44c70f97..75945f742 100644 | |
--- a/lib/_autoload.php | |
+++ b/lib/_autoload.php | |
@@ -8,14 +8,21 @@ | |
* @package SimpleSAMLphp | |
*/ | |
-// SSP is loaded as a separate project | |
-if (file_exists(dirname(dirname(__FILE__)) . '/vendor/autoload.php')) { |
This file contains 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 10e59978672d9b779ae7ada18130837717397b29 Mon Sep 17 00:00:00 2001 | |
From: demeritcowboy <[email protected]> | |
Date: Sat, 26 Sep 2020 10:25:12 -0400 | |
Subject: [PATCH] avoid crash from recursion on exceptions | |
Source: https://github.com/civicrm/civicrm-core/pull/18610 | |
--- | |
CRM/Core/Error.php | 13 ++++--- | |
diff --git a/CRM/Core/Error.php b/CRM/Core/Error.php |
This file contains 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
wget -nv -q https://github.com/mglaman/drupalorg-cli/releases/latest/download/drupalorg.phar && \ | |
chmod +x drupalorg.phar && sudo mv drupalorg.phar /usr/local/bin/drupalorg |
This file contains 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 | |
# Inspiration: https://codelearn.me/2019/01/13/wsl-windows-toast.html | |
# Shim https://ss64.com/bash/notify-send.html for WSL. | |
# Just add an alias for it: | |
# alias notify-send='wsl-notify' | |
POSITIONAL=() | |
urgency='terminal' |
This file contains 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
--- | |
# This playbook rotates Ansible Vault-encrypted secrets that are defined | |
# as dictionaries in the group_vars of an Ansible repository. | |
# | |
# The changes are split over multiple tasks, because the dictionary logic | |
# doesn't handle looping over secrets on differing levels within a | |
# dictionary. | |
- hosts: "all" | |
user: "ansible" |
NewerOlder