View gist:cec53d5a2affcfc202c45e76e65890fe
aws cloudformation describe-stack-resource --stack-name MYSTACK --logical-resource-id MYLC | jq -Cr '.StackResourceDetail.Metadata | fromjson | ."AWS::CloudFormation::Init".MY_INITNAME.files | to_entries[] | {(.key): .value.content }' |
View gist:507fbd614b43aacd6a5a46edfbbfc834
levi@La-Tower:~/repos/mobilityware/tf-templates/test$ terraform plan | |
2017/07/10 18:14:19 [WARN] Invalid log level: "true". Defaulting to level: TRACE. Valid levels are: [TRACE DEBUG INFO WARN ERROR] | |
2017/07/10 18:14:19 [INFO] Terraform version: 0.9.11 efca455c35d0d218a9bfee835a8ec3ef8d4d1c8c | |
2017/07/10 18:14:19 [INFO] Go runtime version: go1.8 | |
2017/07/10 18:14:19 [INFO] CLI args: []string{"/usr/local/bin/terraform", "plan"} | |
2017/07/10 18:14:19 [DEBUG] Detected home directory from env var: /home/levi | |
2017/07/10 18:14:19 [DEBUG] Detected home directory from env var: /home/levi | |
2017/07/10 18:14:19 [DEBUG] Attempting to open CLI config file: /home/levi/.terraformrc | |
2017/07/10 18:14:19 [DEBUG] File doesn't exist, but doesn't need to. Ignoring. | |
2017/07/10 18:14:19 [INFO] CLI command args: []string{"plan"} |
View lxc-ctrl.sh
#!/bin/bash | |
conf="/etc/default/lxd_dnsmasq.conf" | |
func1 () | |
{ | |
sh -c "echo 'dhcp-host=$1,$2' >> $conf" && service lxd-bridge stop && service lxd-bridge start && lxc launch $3 $1 | |
wait |
View worldclock.js
<script language="JavaScript"> | |
<!-- | |
function worldClock(zone, region){ | |
var dst = 0 | |
var time = new Date() | |
var gmtMS = time.getTime() + (time.getTimezoneOffset() * 60000) | |
var gmtTime = new Date(gmtMS) | |
var day = gmtTime.getDate() | |
var month = gmtTime.getMonth() | |
var year = gmtTime.getYear() |
View nginx.conf
upstream plex-upstream { | |
# change plex-server.example.com:32400 to the hostname:port of your plex server. | |
# this can be "localhost:32400", for instance, if Plex is running on the same server as nginx. | |
# I just use the IP and port of my server | |
server plex-server.example.com:32400; | |
} | |
server { | |
listen 80; |