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
#!/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
--- | |
# 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" |
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
# /dir/ means exclude the root folder /dir | |
# /dir/* means get the root folder /dir but not the contents | |
# dir/ means exclude any folder anywhere where the name contains dir/ | |
# Examples excluded: /dir/, /usr/share/mydir/, /var/spool/dir/ | |
# /dir means exclude any folder anywhere where the name contains /dir | |
# Examples excluded: /dir/, /usr/share/directory/, /var/spool/dir/ | |
# /var/spool/lpd//cf means skip files that start with cf within any folder within /var/spool/lpd | |
# | |
# include, + | |
# exclude, - |
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
!function () { | |
var global = this; | |
var old_eval = global.eval; | |
var old_const = global.Function.prototype.constructor; | |
global.Function.prototype.constructor = function (code) { | |
console.log('Function Constructor: ' + code); | |
return old_const(code); | |
}; | |
global.eval = function (code) { | |
console.log('EVIL: ' + code); |
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 | |
#================================================================ | |
# Let's Encrypt renewal script for Apache on Ubuntu/Debian | |
# @author Erika Heidi<[email protected]> | |
# Usage: ./le-renew.sh [base-domain-name] | |
# More info: http://do.co/1mbVihI | |
#================================================================ | |
domain=$1 | |
le_path='/opt/letsencrypt' | |
le_conf='/etc/letsencrypt' |