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 | |
| # By B Shea Dec2018 & Mar2020 | |
| # https://www.holylinux.net | |
| # Test for OpenSSL - if not installed stop here. | |
| if ! [[ -x $(which openssl) ]]; then | |
| printf "\nOpenSSL not found or not executable.\nPlease install OpenSSL before proceeding.\n\n" | |
| exit 1 | |
| fi |
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/sh | |
| ######################################################## | |
| # | |
| # Check certificates inside a java keystore | |
| # | |
| ######################################################## | |
| TIMEOUT="timeout -k 10s 5s " | |
| KEYTOOL="$TIMEOUT keytool" | |
| THRESHOLD_IN_DAYS="30" |
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
| #!/usr/bin/env python3 | |
| """ | |
| Usage: | |
| - Save this script somewhere on your path (e.g. `vi /usr/local/bin/aws-console && chmod +x /usr/local/bin/aws-console`) | |
| - Make AWS credentials available in one of the usual places where boto3 can find them (~/.aws/credentials, env var, etc.) | |
| - Excute the script: `aws-console --profile myprofile` | |
| - :tada: Your browser opens and you are signed in into the AWS console | |
| """ |
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
| #!/usr/bin/python2.7 | |
| import ConfigParser | |
| import os | |
| import sys | |
| from os.path import expanduser | |
| config = ConfigParser.RawConfigParser() | |
| # credentials_file: The file where this script will grab the temp creds | |
| credentials_file = '/.aws/credentials' |
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
| #!/usr/bin/env python | |
| import getpass | |
| import json | |
| import requests | |
| import sys | |
| import urllib | |
| import boto3 |
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
| from botocore.credentials import InstanceMetadataProvider, InstanceMetadataFetcher | |
| provider = InstanceMetadataProvider(iam_role_fetcher=InstanceMetadataFetcher(timeout=1000, num_attempts=2)) | |
| credentials = provider.load() | |
| access_key = credentials.access_key | |
| secret_key = credentials.secret_key | |
| print access_key | |
| print secret_key |
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
| const cheerio = require('cheerio'); | |
| const fetch = require('node-fetch'); | |
| const fs = require('fs'); | |
| // roles["roles/accesscontextmanager.policyAdmin"]["en"] | |
| const roles = {}; | |
| async function makePredefinedRoles(locale) { | |
| const response = await fetch( | |
| `https://cloud.google.com/iam/docs/understanding-roles?hl=${locale}` |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
| function exportSpreadsheet() { | |
| //All requests must include id in the path and a format parameter | |
| //https://docs.google.com/spreadsheets/d/{SpreadsheetId}/export | |
| //FORMATS WITH NO ADDITIONAL OPTIONS | |
| //format=xlsx //excel | |
| //format=ods //Open Document Spreadsheet | |
| //format=zip //html zipped | |
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
| /* | |
| * script to export data in all sheets in the current spreadsheet as individual csv files | |
| * files will be named according to the name of the sheet | |
| * author: Michael Derazon | |
| */ | |
| function onOpen() { | |
| var ss = SpreadsheetApp.getActiveSpreadsheet(); | |
| var csvMenuEntries = [{name: "export as csv files", functionName: "saveAsCSV"}]; | |
| ss.addMenu("csv", csvMenuEntries); |