Skip to content

Instantly share code, notes, and snippets.

Avatar

Levi shadycuz

View GitHub Profile
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"}
@shadycuz
shadycuz / lxc-ctrl.sh
Created Nov 8, 2016
Allows you to create LXD containers with static ip in one go. Thanks to http://jason.trickett.us/2016/08/lxd-containers-static-ip-addresses-heres/
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
@shadycuz
shadycuz / worldclock.js
Created Nov 7, 2016
Worldclock .js for SolarWinds in 12hr format
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()
@shadycuz
shadycuz / nginx.conf
Last active Sep 20, 2016 — forked from spikegrobstein/nginx.conf
Nginx Reverse Proxy config for Plex to prevent user from needing port or /web/index.html
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;
You can’t perform that action at this time.