gpg --full-generate-keygpg --list-secret-keys --keyid-format LONG| import csv | |
| import json | |
| import argparse | |
| def convert_csv_to_json(input_file, output_file, verbose=False): | |
| print(f"Converting {input_file} >>> {output_file}") | |
| output_dict = { "rows": [], "sourceFile": input_file } |
| #!/bin/sh | |
| # Generic AWS ECR authentication script | |
| REGION=us-east-1 | |
| ACCOUNT_ID=$(aws sts get-caller-identity --output text --query Account) | |
| aws ecr get-login-password --region $REGION \ | |
| | docker login \ | |
| --username AWS \ | |
| --password-stdin $ACCOUNT_ID.dkr.ecr.$REGION.amazonaws.com |
| # coding: utf-8 | |
| def merge_dict(dict1, dict2): | |
| res = {**dict1, **dict2} | |
| return res |
| --- | |
| AWSTemplateFormatVersion: '2010-09-09' | |
| Description: >- | |
| Creates EC2 instance with an IAM role that can access an S3 Bucket (also created). | |
| Parameters: | |
| KeyPairName: | |
| Description: EC2 Instance SSH Key | |
| Type: AWS::EC2::KeyPair::KeyName |
| navigator.serviceWorker.getRegistrations().then(registrations => registrations.map(k => k.unregister())); |
| # coding: utf-8 | |
| '''Excel Column Conversion, (C) 2018 Adam C. Abernathy, Lic. MIT''' | |
| def excel_alpha_to_index(column_name, alphabet='abcdefghijklmnopqrstuvwxyz'): | |
| return sum([(alphabet.find(column_name[-i - 1].lower()) + 1) * pow(len(alphabet), i) | |
| for i in reversed(xrange(len(column_name)))]) | |
| def excel_index_to_alpha(postion, alphabet='abcdefghijklmnopqrstuvwxyz'): | |
| column_name = '' | |
| while postion > 0: |
| '''Simple CLI arguments parser | |
| Requires the `--key=value` format. Defaults to True if value is omitted. | |
| (C) 2018 Adam C. Abernathy, [email protected] | |
| ''' | |
| import sys | |
| def coerce_value(value=None): |
| // A bit cleaner now | |
| let keepRunning = true; | |
| for (let i = 0, li = 5; keepRunning && i < li; i++) { | |
| for (let j = 0, lj = 5; keepRunning && j < lj; j++) { | |
| for (let k = 0, lk = 5; keepRunning && k < lk; k++) { | |
| if (k == 3) { | |
| keepRunning = false; | |
| break; | |
| } | |
| for (let m = 0, lm = 5; m < lm; m++) { |
| 'use strict'; | |
| // The basic idea | |
| let keepRunning = true; | |
| for (let i = 0, li = 5; i < li; i++) { | |
| if (!keepRunning) break; | |
| for (let j = 0, lj = 5; j < lj; j++) { | |
| if (!keepRunning) break; | |
| for (let k = 0, lk = 5; k < lk; k++) { |