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 python3 | |
# Requires: pip install pymemcache cryptography boto3 python-dotenv keyring | |
# This script asks for MFA ARN, ROLE ARN to be assumed , and MFA | |
# It then creates a file .env where it sets the default and user-inputed configuration, | |
# assumes the role, caches the access key/secret/token values into the system's vault | |
# (or memcached, depending what you choose) and outputs the access key/secret/token envvars , | |
# in such a format that you can call it with shell's 'eval'. |
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 | |
set -e | |
# This script is for removing a policy from a IAM user after a predefined TTL | |
# It adds a crontab that runs this script every hour | |
# If run with arguments then that task is added to the .state file | |
# In addition it attaches the policy to the user if run with '-a' | |
# If run without arguments it parses the .state file and detaches policies from users if TTL expired | |
## WORKFLOW |
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 | |
DOMAIN="https://www.nepremicnine.net" | |
MAIN_URL="/oglasi-oddaja/ljubljana-mesto/stanovanje/garsonjera,1-sobno,1.5-sobno,2-sobno/cena-od-450-do-700-eur-na-mesec,velikost-od-38-do-60-m2/?s=14&nadst%5B0%5D=vsa&nadst%5B1%5D=vsa" | |
INDEX_FILE="/tmp/index.txt" | |
FIRST_PAGE="/tmp/page1.html" | |
TMP_FILE="/tmp/tmp.html" | |
SLEEP_BETWEEN_REQUESTS_SECONDS=10 | |
touch ${INDEX_FILE} |
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/perl | |
# This script takes the files from the inbound folder and copies them | |
# into the base folder and in the process positions each inbound file | |
# between 2 base files - between the older and the newer base file by | |
# renaming it accordingly (using the older file as the 1st part and the | |
# inbound file as the 2nd part of the new name) | |
# Scenario: | |
# You configured your phone to use SD card for storing pictures. |
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/perl | |
## Purpose: | |
# To get the real size of your app that is comprised of many services/images. | |
# This script sums only the sizes of unique image layers. | |
# This way you can get a better sense of the total size of your app and make optimizations if needed. | |
## Usage: | |
# ./docker_images_size.pl IMAGE1:TAG1 IMAGE2:TAG2 ... | |
## Example: |
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 | |
### BEGIN INIT INFO | |
# Provides: vino-server | |
# Required-Start: $local_fs | |
# Required-Stop: $local_fs | |
# Should-Start: | |
# Should-Stop: | |
# X-Start-Before: | |
# X-Stop-After: |