View medium3_youtube.go
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
func OpenAndPlay() { | |
// Last menu could be something else, first call to Home doesn't open SmartCast, it just turns on TV | |
key_command.Home() | |
// It takes about 15s to open SmartCast menu with animation loading | |
key_command.Home() | |
time.Sleep(15 * time.Second) | |
// Just incase Vizio menu was frozen, go left 10x times :shrug: | |
key_command.Left() | |
key_command.Left() |
View medium3_vizio.go
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
... | |
func Home() { | |
keyPress(4, 15) | |
} | |
func CycleInput() { | |
keyPress(7, 1) | |
} | |
func keyPress(codeset int, code int) { |
View medium2_eks.yaml
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
AWSTemplateFormatVersion: '2010-09-09' | |
Parameters: | |
vpcId: | |
Type: AWS::EC2::VPC::Id | |
subnet: | |
Type: AWS::EC2::Subnet::Id | |
zone: | |
Type: AWS::Route53::HostedZone::Id | |
cluster: | |
Type: String |
View medium2_rgroup.yaml
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
rgroup: | |
Type: AWS::Route53::RecordSetGroup | |
Properties: | |
HostedZoneId: !Ref zone | |
RecordSets: | |
- Name: yourapp | |
Type: CNAME | |
SetIdentifier: ECS | |
Weight: '9' | |
ResourceRecords: |
View medium2_cname.yaml
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
cname: | |
Type: AWS::Route53::RecordSet | |
Properties: | |
Name: yourapp | |
Type: "CNAME" | |
HostedZoneId: !Ref zone | |
ResourceRecords: | |
- !Ref lb |
View medium2_k8s_eks.yaml
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
apiVersion: v1 | |
kind: Service | |
metadata: | |
name: nginx-service | |
spec: | |
selector: | |
app: nginx | |
ports: | |
- protocol: TCP | |
port: 80 |
View medium2_ecs.yaml
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
AWSTemplateFormatVersion: '2010-09-09' | |
Parameters: | |
vpcId: | |
Type: AWS::EC2::VPC::Id | |
subnet: | |
Type: AWS::EC2::Subnet::Id | |
zone: | |
Type: AWS::Route53::HostedZone::Id | |
Resources: | |
lb: |
View medium1_eni.sh
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 | |
instance_id=$(curl -s http://169.254.169.254/latest/meta-data/instance-id) | |
if ! ifconfig | grep $2 > /dev/null | |
then | |
aId=$(aws ec2 describe-network-interfaces --network-interface-ids $1 --query 'NetworkInterfaces[].Attachment.AttachmentId' --output text) | |
if [ "$aId" != "" ]; then aws ec2 detach-network-interface --attachment-id $aId; fi | |
aws ec2 wait network-interface-available --network-interface-ids $1 | |
aws ec2 attach-network-interface --instance-id ${instance_id} --device-index 1 --network-interface-id $1 | |
while [ ! -f "/sys/class/net/eth1/address" ];do echo ENI not available, waiting; sleep 2;done | |
hwaddr=$(cat /sys/class/net/eth1/address) |
View medium1_eni.yaml
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
Eni: | |
Type: AWS::EC2::NetworkInterface | |
Properties: | |
SourceDestCheck: false | |
GroupSet: your_sg | |
SubnetId: your_subnet | |
PrivateIpAddress: 172.16.13.37 | |
Eip: | |
Type: AWS::EC2::EIP | |
Properties: |
View medium1_ssm.yaml
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
VPN: | |
Type: AWS::SSM::Association | |
Properties: | |
AssociationName: "vpn_sync" | |
Name: 'AWS-RunShellScript' | |
ScheduleExpression: "cron(0 0 0/1 1/1 * ? *)" | |
Parameters: | |
commands: | |
- !Sub | | |
#!/bin/bash |
NewerOlder