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
# frozen_string_literal: true | |
require 'fluent/plugin/filter' | |
module Fluent::Plugin | |
class ThrottleFilter < Filter | |
Fluent::Plugin.register_filter('throttle', self) | |
desc "Used to group logs. Groups are rate limited independently" | |
config_param :group_key, :array, :default => ['kubernetes.container_name'] |
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 Crypto.Cipher import AES | |
import binascii, os | |
def encrypt_AES_GCM(msg, secretKey): | |
aesCipher = AES.new(secretKey, AES.MODE_GCM) | |
ciphertext, authTag = aesCipher.encrypt_and_digest(msg) | |
print("ciphertext: {}, authTag: {}".format(ciphertext, authTag)) | |
return (ciphertext, aesCipher.nonce, authTag) | |
def decrypt_AES_GCM(encryptedMsg, secretKey): |
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 | |
ini_set('display_errors', 1); | |
error_reporting(E_ALL); | |
require_once 'Requests/Library/Requests.php'; | |
Requests::register_autoloader(); | |
exec("mv json/*.json json/old/"); // Backup old files |