Skip to content

Instantly share code, notes, and snippets.

View trinitronx's full-sized avatar
⛩️
Zazen

James Cuzella trinitronx

⛩️
Zazen
View GitHub Profile
@trinitronx
trinitronx / README.md
Last active May 3, 2018 22:47
kubernetes-grafana

A basic example for deploying OLD Grafana with:

  • Session storage in Redis (users logged into web UI)
  • Dashboard storage in MySQL or MariaDB
  • AWS CloudWatch access via grafana-cloudwatch-access secret (should contain .aws/ credentials & config files)
  • Basic user authentication. Change this if you want LDAP, Google OAuth, etc...

Note: This was to work around bug [grafana/grafana#3824][1]. This stack was for Grafana 3.1.1, and Kubernetes v1.6.4! If I were deploying this into a newer production cluster, I'd use Deployment instead of ReplicationController. NFS still seems to be the most well supported data store supporting multiple pods mounting at the same time.

On the NFS mount, the directory structure used was the following:

@trinitronx
trinitronx / README.md
Last active April 26, 2018 00:30
Docker SOCKS5h Proxy Diagram

docker-socks5h-diagram.svg

[ASCII art diagram][1] for docker networking proxy setup. [SVG file diagram][2] generated from ditaa tool.

How to Generate from source & view

git clone https://gist.github.com/6427d6454fb3b121fc2ab5ca7ac766bc.git docker-socks5h-diagram.svg
cd ./docker-socks5h-diagram.svg
brew install ditaa

ditaa --transparent --verbose --no-separation --svg ./docker-ditaa-diagram.md ./docker-diagram.svg

@trinitronx
trinitronx / terraform-trace-output-crash.txt
Created March 5, 2018 21:29
Terraform console segfault
docker run -it --rm -u 817502452 -v ~/.aws:/root/.aws -e AWS_ACCESS_KEY_ID -e AWS_SECRET_ACCESS_KEY -v /Users/exampleuser:/Users/exampleuser -e HOME=/Users/exampleuser -e TF_DATA_DIR -e TF_VAR_env -e CREATED_BY -e TF_LOG -v /Users/exampleuser/src/pub/terraform-crash:/wd -w /wd/terraform hashicorp/terraform:0.11.3 console
2018/03/05 21:25:21 [INFO] Terraform version: 0.11.3 3802b14260603f90c7a1faf55994dcc8933e2069
2018/03/05 21:25:21 [INFO] Go runtime version: go1.9.1
2018/03/05 21:25:21 [INFO] CLI args: []string{"/bin/terraform", "console"}
2018/03/05 21:25:21 [DEBUG] Attempting to open CLI config file: /Users/exampleuser/.terraformrc
2018/03/05 21:25:21 [DEBUG] File doesn't exist, but doesn't need to. Ignoring.
2018/03/05 21:25:21 [INFO] CLI command args: []string{"console"}
2018/03/05 21:25:21 [DEBUG] command: loading backend config file: /wd/terraform
2018/03/05 21:25:21 [INFO] command: backend config not found, returning nil: /wd/terraform
2018/03/05 21:25:21 [INFO] command: no config, returning nil
@trinitronx
trinitronx / Makefile
Last active February 28, 2018 23:09
grc + make + read bash builtin bug reproduction test case
.PHONY: help list clean
UID := $(shell id -u)
interactive := $(shell [ -t 0 ] && echo 1)
ifeq (1,$(interactive))
INTERACTIVE_SHELL := true
endif
define set-env
@trinitronx
trinitronx / cec-client_output.log
Created January 14, 2018 23:52
Testing CEC with Pulse8 USB adapter on Ubuntu + Vizio TV - f.f.f.f Address only with Golang code?
$ echo 'scan' | cec-client -s
opening a connection to the CEC adapter...
DEBUG: [ 54] Broadcast (F): osd name set to 'Broadcast'
DEBUG: [ 55] connection opened, clearing any previous input and waiting for active transmissions to end before starting
DEBUG: [ 60] communication thread started
DEBUG: [ 171] turning controlled mode on
NOTICE: [ 343] connection opened
DEBUG: [ 343] processor thread started
DEBUG: [ 343] << Broadcast (F) -> TV (0): POLL
TRAFFIC: [ 343] << f0
@trinitronx
trinitronx / mupen64plus-journalctl.log
Created November 2, 2017 05:02
mupen64plus fullscreen journalctl logs
Nov 01 23:00:03 saturn caribou[3357]: daemon.vala:120: error in focus handler: GDBus.Error:org.freedesktop.DBus.Error.ServiceUnknown: The name org.gnome.Caribou.Keyboard was not provided by any .service files
Nov 01 23:00:04 saturn unity-settings-[3055]: failed to turn the panel on: Could not change DPMS mode
Nov 01 23:00:04 saturn unity-settings-[3055]: Failed to load PNP ids: Failed to open file “/usr/share/hwdata/pnp.ids”: No such file or directory
Nov 01 23:00:04 saturn unity-settings-[3055]: Failed to load PNP ids: Failed to open file “/usr/share/hwdata/pnp.ids”: No such file or directory
Nov 01 23:00:08 saturn kernel: snd_hda_codec_hdmi hdaudioC1D3: HDMI: invalid ELD data byte 92
Nov 01 23:00:09 saturn unity-settings-[3055]: Failed to load PNP ids: Failed to open file “/usr/share/hwdata/pnp.ids”: No such file or directory
Nov 01 23:00:09 saturn unity-settings-[3055]: Failed to load PNP ids: Failed to open file “/usr/share/hwdata/pnp.ids”: No such file or directory
Nov 01 23:00:09 saturn unity-panel-ser[
@trinitronx
trinitronx / berks-lockfile-bug.log
Created October 20, 2017 07:51
berkshelf lockfile bug reproduced with v6.3.1 and v5.6.5 (same result each time)
trinitronx@saturn:lyraphase-chef(add-ubuntu-desktop-role)$ berks outdated --debug
I, [2017-10-20T01:45:23.381159 #23201] INFO -- : Checking if lockfile is trusted
D, [2017-10-20T01:45:23.381284 #23201] DEBUG -- : Checking apt (>= 0.0.0)
D, [2017-10-20T01:45:23.384546 #23201] DEBUG -- : Detected there is a cached cookbook
D, [2017-10-20T01:45:23.384632 #23201] DEBUG -- : Checking transitive dependencies for apt (5.0.0)
D, [2017-10-20T01:45:23.384647 #23201] DEBUG -- : Checking compat_resource (>= 12.14.7)
D, [2017-10-20T01:45:23.384682 #23201] DEBUG -- : Checking transitive dependencies for compat_resource (12.16.2)
D, [2017-10-20T01:45:23.384693 #23201] DEBUG -- : Already checked - skipping
D, [2017-10-20T01:45:23.384704 #23201] DEBUG -- : Checking bash (>= 0.0.0)
D, [2017-10-20T01:45:23.387452 #23201] DEBUG -- : Detected there is a cached cookbook
I, [2017-07-03T12:00:18.168346 #26840] INFO -- wifi-bridge-debian-81: -----> Cleaning up any prior instances of <wifi-bridge-debian-81>
I, [2017-07-03T12:00:18.168505 #26840] INFO -- wifi-bridge-debian-81: -----> Destroying <wifi-bridge-debian-81>...
I, [2017-07-03T12:00:18.170011 #26840] INFO -- wifi-bridge-debian-81: Finished destroying <wifi-bridge-debian-81> (0m0.00s).
I, [2017-07-03T12:00:18.170330 #26840] INFO -- wifi-bridge-debian-81: -----> Testing <wifi-bridge-debian-81>
I, [2017-07-03T12:00:18.170436 #26840] INFO -- wifi-bridge-debian-81: -----> Creating <wifi-bridge-debian-81>...
I, [2017-07-03T12:00:18.257922 #26840] INFO -- wifi-bridge-debian-81: Sending build context to Docker daemon 3.072kB
I, [2017-07-03T12:00:18.283119 #26840] INFO -- wifi-bridge-debian-81: Step 1/17 : FROM debian:8.1
I, [2017-07-03T12:00:19.612568 #26840] INFO -- wifi-bridge-debian-81: 8.1: Pulling from library/debian
I, [2017-07-03T12:00:19.615288 #26840] INFO -- wifi-bridge-debian-81: 7ccc78f8af6d: Pulling fs lay
******************************
PSH KERNEL VERSION: b0182929
WR: 20104000
******************************
SCU IPC: 0x800000d0 0xfffce92c
PSH miaHOB version: TNG.B0.VVBD.0000000c
microkernel built 10:14:01 Jan 13 2015
PSH miaHOB version: TNG.B0.VVBD.0000000c
microkernel built 10:14:01 Jan 13 2015
******* PSH loader *******
PCM page cache size = 192 KB
Cache Constraint = 0 Pages
Arming IPC driver ..
Adding page store pool ..
PagestoreAddr(IMR Start Address) = 0x04899000