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 | |
| # i want to stream netflix and prime video from my chromecast to the hotel TV | |
| # | |
| # hotels often have an authentication / agreement page that you have to click OK on | |
| # chromecasts do not play nicely with those | |
| # | |
| # solution: connect your laptop to the hotel's wi-fi, then set up an AP and connect the chromecast to the AP | |
| # your laptop will be both a client of the hotel's WLAN and an access point + bridge of your own WLAN | |
| # |
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
| # prerequisites | |
| # 1) you have a (Linux) EC2 instance with SSH enabled, source/destination check disabled, etc. | |
| # 2) you have a security group rule with a tag named roaming (this script updates that rule to allow you access) (note: tag the rule, not the security group) | |
| # grant access to your IP access | |
| myip=$(curl -s https://ipv4.icanhazip.com) | |
| read sgid sgrid < <(echo $(aws ec2 describe-security-group-rules --filter Name=tag:Name,Values=roaming | jq '.SecurityGroupRules[0].GroupId, .SecurityGroupRules[0].SecurityGroupRuleId' -r)) | |
| aws ec2 modify-security-group-rules --group-id $sgid --security-group-rules SecurityGroupRuleId=$sgrid,SecurityGroupRule=\{CidrIpv4=$myip\/32,FromPort=22,ToPort=22,IpProtocol=TCP,Description=roaming\} | |
| # open tunnel |
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
| # i often click between the buttons on my touchpad. | |
| # this is because the touchpad is lined up with the center of the laptop | |
| # rather than the center of the keyboard home row | |
| # this script finds the device id of the touchpad (which changes as devices are plugged/unplugged) and disables the triple click | |
| # note: on new installations, run xinput to identify your touchpad which may not contain the word TouchPad | |
| touchPadId=$(xinput | grep TouchPad | awk -F 'id=' '{print $2}' | cut -f1) | |
| xinput --set-button-map $touchPadId 1 1 3 |
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 bash | |
| # jq-say | |
| # format string as JSON message | |
| # | |
| # treat odd args as keys and even args as values | |
| # use jq to output something like this, for as many args supplied: | |
| # {"arg1": "arg2", "arg3": "arg4"} | |
| # | |
| # very helpful for echo'ing log messages as JSON |
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
| # note: get your AWS credentials however you usually do that (e.g. aws configure or set the env vars) | |
| REPO_URL=accountid.dkr.ecr.region.amazonaws.com/repo-name | |
| EXISTING_TAG=version1 | |
| NEW_TAG=version1-hotfix | |
| # get everything ready | |
| mkdir -p ~/slipstream | |
| cd ~/slipstream | |
| `aws ecr get-login --no-include-email` |
OlderNewer