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
| def compare_hashes(hash1, hash2, options = {}) | |
| options = { | |
| sort_keys: true, | |
| include_identical: false | |
| }.merge(options) | |
| # Get all keys from both hashes | |
| all_keys = options[:sort_keys] ? (hash1.keys | hash2.keys).sort : (hash1.keys | hash2.keys) | |
| differences = {} |
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
| # To prevent: | |
| # ENV['ELASTIC_APM_DISABLE_INSTRUMENTATIONS'] = "json,sidekiq" | |
| [DEPRECATED] The option active has been renamed to enabled to align with other agents and with the remote config. | |
| Traceback (most recent call last): | |
| 99: from bin/rails:10:in `<main>' | |
| 98: from /Users/hbeaver/.rbenv/versions/2.5.5/lib/ruby/gems/2.5.0/gems/bootsnap-1.3.1/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:29:in `require' | |
| 97: from /Users/hbeaver/.rbenv/versions/2.5.5/lib/ruby/gems/2.5.0/gems/bootsnap-1.3.1/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:20:in `require_with_bootsnap_lfi' | |
| 96: from /Users/hbeaver/.rbenv/versions/2.5.5/lib/ruby/gems/2.5.0/gems/bootsnap-1.3.1/lib/bootsnap/load_path_cache/loaded_features_index.rb:65:in `register' | |
| 95: from /Users/hbeaver/.rbenv/versions/2.5.5/lib/ruby/gems/2.5.0/gems/bootsnap-1.3.1/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:21:in `block in require_with_bootsnap_lfi' |
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
| // NODE_ENV=production node inspect dist/server.js | |
| var AWS = require('aws-sdk'); | |
| var secretsmanager = new AWS.SecretsManager(); | |
| console.log(secretsmanager.config); | |
| var params = { | |
| SecretId: process.env.DOCUMENT_API_KEY | |
| }; | |
| secretsmanager.getSecretValue(params, function(err, data) { |
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
| source:atldockerhaproxy* AND time_backend_response:/[6-9][0-9][0-9][0-9][0-9]/ AND request_header_host:/s.*enable.*/ |
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
| var AWS = require('aws-sdk'); | |
| AWS.config.update({ | |
| accessKeyId: process.env.AWS_ACCESS_KEY_ID, | |
| secretAccessKey: process.env.AWS_SECRET_ACCESS_KEY, | |
| region: process.env.AWS_REGION | |
| }); | |
| var secretsmanager = new AWS.SecretsManager(); |
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
| cat graylog-search-result-relative-604800.csv | while read line | |
| do | |
| echo $line | sed -n -r 's/.*db":([0-9]*\.[0-9]*).*/\1/p' | |
| done | |
| cat graylog-search-result-keyword-since-april3.csv | while read line | |
| do | |
| echo $line | sed -n -r 's/.*email":"([A-Z0-9._%+-]+@[A-Z0-9.-]+\.[A-Z]{2,})",.*/\1/pi' | |
| done |
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
| / Encrypt | |
| const ciphertext = CryptoJS.AES.encrypt('a8f0840ce2388', process.env.JWT_SECRET); | |
| console.log('ciphertext', ciphertext.toString()); | |
| // // Decrypt | |
| const plaintext = CryptoJS.AES.decrypt(ciphertext.toString(), process.env.JWT_SECRET).toString(CryptoJS.enc.Utf8); | |
| console.log('plaintext', plaintext); |
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
| require 'json' | |
| require 'pry' | |
| require 'active_support' | |
| require 'date' | |
| require 'csv' | |
| class GHAudit | |
| def initialize | |
| @file = File.open('./gh_audit.json','r') |
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
| <?xml version="1.0" encoding="UTF-8"?> | |
| <!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> | |
| <plist version="1.0"> | |
| <dict> | |
| <key>Label</key> | |
| <string>com.hankbeaver.DockerForMacLoopBack</string> | |
| <key>ProgramArguments</key> | |
| <array> | |
| <string>/System/Library/CoreServices/Spotlight.app/Contents/MacOS/Spotlight</string> | |
| </array> |
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
| #Gemfile contents | |
| source "https://rubygems.org" | |
| gem 'octokit' | |
| gem "pry" | |
| # END Gemfile | |
| require 'rubygems' | |
| require 'bundler/setup' | |
| require 'octokit' | |
| require 'csv' |
NewerOlder