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
on ApplicationIsRunning(appName) | |
tell application "System Events" to set appNameIsRunning to exists (processes where name is appName) | |
return appNameIsRunning | |
end ApplicationIsRunning | |
repeat | |
if ApplicationIsRunning("Spotify") then | |
tell application "Spotify" | |
try | |
if player state is playing and player position is greater than 30 and track is not "spotify:track:4uLU6hMCjMI75M1A2tKUQC" then |
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
export JAVA_HOME=/opt/mesosphere/ | |
cd /opt/mesosphere/bin/ | |
./zkCli.sh -server leader.mesos:2181 |
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
locals { | |
"akamai_siteshield_ranges" = [ | |
"11.22.33.41/24", | |
"11.22.33.42/24", | |
"11.22.33.45/24" | |
] | |
} | |
resource "aws_security_group" "akamai_siteshield_ranges" { | |
name = "aws-europe-s1486.akamaiedge.ne" |
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
fss_sandbox=consul.sandbox.fss | |
fss_production=consul.production.fss | |
apps=consul-apps.hashicorp | |
url=domain/v1/operator/raft/configuration?stale=true | |
declare -a consuls=($fss_sandbox $fss_production $apps) | |
for consul in "${consuls[@]}"; do | |
printf "%s Leader is: " "$consul"; | |
curl -s "http://$consul.$url\\n" |jq '.Servers[] | select(.Leader==true) | .Address' |
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
Host tunnel | |
Hostname [host_with_access] | |
ProxyJump [bastion_host] | |
LocalForward [local_port] [remote_host]:[remote_port] | |
#Start tunnel with ssh -N tunnel |
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
output "SSH Config" { | |
value = <<SSHCONFIG | |
### START Auto-gen SSH Config for ${random_pet.cluster_id.id} ### | |
Host ${random_pet.cluster_id.id}-bastion | |
User core | |
Hostname ${aws_instance.bastion.public_ip} | |
IdentityFile ~/.ssh/${random_pet.cluster_id.id}.key | |
Host ${random_pet.cluster_id.id}-agent |
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
andyirvine$ aws ec2 describe-network-interfaces --filters "Name=description,Values=[ELB Interface description]" |jq '.NetworkInterfaces[] .PrivateIpAddress' |
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
# N.B does not persist across reboots | |
echo " | |
rdr pass inet proto tcp from any to any port 443 -> 127.0.0.1 port 8080 | |
" | sudo pfctl -ef - | |
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
sudo rbd resize -s 8000 [image] | |
#xfs | |
xfs_growfs /dev/rdb0 | |
#ext4 https://access.redhat.com/documentation/en-US/Red_Hat_Enterprise_Linux/6/html/Storage_Administration_Guide/ext4grow.html | |
sudo resize2fs /dev/rbd0 |
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
packer build template.json | |
2016/12/01 14:55:23 [INFO] Packer version: 0.12.0 | |
2016/12/01 14:55:23 Packer Target OS/Arch: darwin amd64 | |
2016/12/01 14:55:23 Built with Go Version: go1.7.3 | |
2016/12/01 14:55:23 Detected home directory from env var: /Users/user | |
2016/12/01 14:55:23 Using internal plugin for parallels-iso | |
2016/12/01 14:55:23 Using internal plugin for vmware-vmx | |
2016/12/01 14:55:23 Using internal plugin for googlecompute | |
2016/12/01 14:55:23 Using internal plugin for qemu | |
2016/12/01 14:55:23 Using internal plugin for amazon-chroot |
NewerOlder