Sometimes you just want a list of timezones with their offsets. From this you can find the offset for a given timezone on a specific date.
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
Sometimes you just need to delete everything in an elasticsearch cluster and you don't have access to do the stop-rm-rf-start thing.
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
Python port of the getContentHash() function from PHP's Composer. Useful when updating composer.lock from php when composer is available. Granted this "shouldn't be done" and is "doing it wrong", but sometimes running composer commands in your deployment chain is overkill and redundent.
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
# composerFileContents should be the dict version of the composer.json file
def getContentHash(composerFileContents):
relevant = OrderedDict((key, composerFileContents[key]) for key in composerFileContents.keys() if key in ['name','version','require','require-dev','conflict','replace','provide','minimum-stability','prefer-stable','repositories','extra'])
if 'config' in composerFileContents and 'platform' in composerFileContents['config']:
Accessing "member accounts" of your AWS organization. Since the AWS documentation and all the write-ups are more complicated than useful, there's the cliff notes.
This needs to be done for every user and needs to be done for every machine (stored in a cookie or local storage).
Once you have switched from the parent account to a subaccount, your profile menu usually appears in the upper right corner will show the Display Name in a bubble colored with the chosen Color (below).
Note: you can switch back to the parent org by selecting Back to [ YOUR USERNAME ] in that same profile menu.
Preparation
Click on your username in the upper right corner to access your profile menu (left most of the menus in that corner)
Click on My Organization
In the Organizational Structure chart copy the account numbers and names of the subaccounts you wish to access
For each subaccount you need access to follow these steps:
Make sure you are in the parent account (there will not be a Back to [ YOUR USERNAME ] option in the profile menu).
Open your profile menu by clicking on your username in the upper right corner (left most of the menus in that corner).
Select Switch role
If this is your first time doing this in the browser/computer you will need to click on Switch Role again
Enter the account details
Account: (as copied in Preparation above)
Role: OrganizationAccountAccessRole
Display Name: user's choice - whatever makes sense to you
Color: user's choice - NOTE: this will be the color of your username in the header when you're logged into this subaccount
Click Switch Role
Note you are now in the child account, as indicated by the visual change of the profile menu button in the upper right corner.