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
| import json | |
| from schema import Schema, Literal | |
| schema = Schema( | |
| { | |
| Literal("application", description="The name of your application. Letters, numbers, hyphens and underscores are allowed."): str, | |
| "dict-of-dicts-only-specific-names-allowed": { | |
| "specific-name-1": { | |
| "property-1": str, |
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
| ➜ trufflehog filesystem . --no-verification --fail --trace | |
| 2024-11-14T07:36:39Z info-2 trufflehog trufflehog 3.83.6 | |
| 🐷🔑🐷 TruffleHog. Unearth your secrets. 🐷🔑🐷 | |
| 2024-11-14T07:36:39Z info-4 trufflehog default engine options set | |
| 2024-11-14T07:36:39Z info-4 trufflehog engine initialized | |
| 2024-11-14T07:36:39Z info-4 trufflehog setting up aho-corasick core | |
| 2024-11-14T07:36:39Z info-4 trufflehog set up aho-corasick core | |
| 2024-11-14T07:36:39Z info-2 trufflehog starting scanner workers {"count": 8} | |
| 2024-11-14T07:36:39Z info-2 trufflehog starting detector workers {"count": 64} |
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
| #!/bin/bash | |
| # Usage... | |
| # ./migrate-ecr-images.sh <aws_account_id> <region> <source_repository> <destination_repository> | |
| # E.g... | |
| # ./migrate-ecr-images.sh 1234567890 eu-west-2 group/this group/that | |
| awsAccountId="$1" | |
| region="$2" | |
| sourceRepository="$3" |
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
| #!/bin/bash | |
| # I had a situation where a config upgrader tool added empty lines to the end of thousands of files, which made for an insane pull request diff (in Bitbucket). | |
| # This is what I used to append those empty lines separately and get that into my main branch so that the diff is more manageable for my colleagues... | |
| # cd into the parent directory, paste this into your terminal, hit enter... | |
| find . -type f -name '*.*' -print0 | while IFS= read -r -d '' file; do | |
| echo "$file" | |
| echo "" >> "$file" |
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
| /* | |
| Maybe someone already solved this in a library, but I wasn't finding it, | |
| so I wrote this. | |
| In the same directory as this file, put your JSON object in temp.json | |
| and create an empty directory called temp, then run... | |
| node explodeJSONToFiles.js | |
| ...and do whatever you need to do with the files. |