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 | |
aws --region eu-west-1 ec2 describe-instances \ | |
--query 'Reservations[*].Instances[*].[InstanceId,State.Name,InstanceType,PrivateIpAddress,PublicIpAddress,Tags[?Key==`Name`].Value[]]'\ | |
--output json | tr -d '\n[] "' | perl -pe 's/i-/\ni-/g' | tr ',' '\t' | sed -e 's/null/None/g' | grep '^i-' | column -t |
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/local/bin/python | |
# coding: UTF-8 | |
import boto3 | |
import json | |
# Main function that runs the whole thing | |
def updateAll(): | |
instances,groups = getEC2Instances() | |
updateHosts(instances,groups) |
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
/* | |
TODO: | |
X Maybe account for defaults: color: var(--header-color, blue); | |
- Verify cross domain working or not (it is working from dropbox) | |
- Option to wait to apply anything until all <link>s are parsed or inject what we have and update as each <link> returns | |
- Need to test on a more complex CSS file | |
- Option to save parsed file in local/session storage so there isn't a delay on additional page loads. Could only do it for links (with URLs to use as keys) and style blocks with IDs of some sort | |
- Need to test more complex values like rgba(255,0,0,0.5); and something with !important | |
- Try multiple links | |
- Local links |