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
#!/usr/bin/env python3 | |
"""Yaml Parser | |
Usage: yaml_parser.py [-f FILE] [KEYS] | |
Parses yaml file using provided keys in 'key.otherkey.anotherkey' format | |
If result is a datastructure, response comes in JSON | |
Arguments: |
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
#!/usr/bin/env python3 | |
"""Usage: render_jinja.py <template_file> <parameters_file> | |
Parameters file must be yaml encoded. Use Jinja2 to reference in template. | |
Options: -h | |
""" | |
from docopt import docopt | |
from jinja2 import Environment, FileSystemLoader |
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: ConfigMap | |
metadata: | |
name: concourse-keys | |
data: | |
authorized_worker_keys: |+ | |
ssh-rsa {{public_key_text}} worker-key | |
session_signing_key: |+ | |
-----BEGIN RSA PRIVATE KEY----- |
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
# $HOME/.ssh/config | |
Host example-forward | |
HostName bastion.example.com | |
ForwardAgent yes | |
ForwardX11 yes | |
LocalForward 9090 app-0.example.local:8080 | |
# this allows you to run `ssh example-forward` | |
# you'll get an SSH session but more importantly, |
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
from jinja2 import Environment, meta, StrictUndefined, exceptions | |
from yaml import load_all | |
def get_manifests(template_string, overrides): | |
config = get_config(template_string) | |
for k, v in overrides.items(): | |
config['parms'][k] = v | |
rendered = render_jinja(template_string, config['parms']) | |
results = list(load_all(rendered)) | |
try: |
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
# in ~/.ssh/config | |
# run `ssh application-server` to use forward, then `curl localhost:8080` | |
Host application-server | |
HostName bastion.mycloud.app | |
User admin | |
ForwardAgent yes | |
ForwardX11 yes | |
LocalForward 8080 app-server-01.mycloud.local:80 |
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
; Volume control (turn master volume up and down with Ctrl-Alt-Up/Down and | |
; toggle mute with Ctrl-Alt-.) | |
!]::Send {Volume_Up} | |
![::Send {Volume_Down} | |
!\::Send {Volume_Mute} | |
g_LastCtrlKeyDownTime := 0 | |
g_AbortSendEsc := false | |
g_ControlRepeatDetected := false |
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
{ | |
"global": { | |
"check_for_updates_on_startup": false, | |
"show_in_menu_bar": false, | |
"show_profile_name_in_menu_bar": false | |
}, | |
"profiles": [ | |
{ | |
"complex_modifications": { | |
"parameters": { |
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
version: '3' | |
services: | |
unifi: | |
restart: always | |
hostname: unifi | |
container_name: "unifi" | |
image: linuxserver/unifi-controller | |
volumes: ["../data/unifi/:/config"] | |
environment: | |
TZ: "America/Seattle" |
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
package main | |
import ( | |
"fmt" | |
"io/ioutil" | |
"log" | |
"os" | |
"strings" | |
"sync" | |
"time" |
OlderNewer