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 / find-output-all-Mach-O.log
Last active January 24, 2022 19:01
Native vagrant + vagrant-libvirt gem binaries
# Vagrant plugin directory
$ find ~/.vagrant.d/gems/2.7.4/ \( -iname '*.gemspec' -o -iname '.DS_Store' -o -iname '*.yaml' -o -iname '*.gz' -o -iname '*.pub' -o -iwholename '*/spec/*' -o -iwholename '*/test/*' \) -prune -o -type f -print0 | xargs -0 file | grep -v 'tar archive\|Ruby script\|ASCII text\|empty\|PNG image\|PEM\|JSON\|SPEC\|Unicode text\|HTML doc\|Git \(index\|pack\|bundle\)\|SVG\|ISO 9660\|Perl script\|JPEG\|CSV text'
~/.vagrant.d/gems/2.7.4//extensions/arm64-darwin-21/2.7.0/ruby-libvirt-0.8.0/_libvirt.bundle: Mach-O 64-bit bundle arm64
~/.vagrant.d/gems/2.7.4//gems/ruby-libvirt-0.8.0/ext/libvirt/nwfilter.o: Mach-O 64-bit object arm64
~/.vagrant.d/gems/2.7.4//gems/ruby-libvirt-0.8.0/ext/libvirt/nodedevice.o: Mach-O 64-bit object arm64
~/.vagrant.d/gems/2.
@trinitronx
trinitronx / Qt5 Circular Build Dependencies.txt
Last active November 9, 2021 17:03
ASCII art tree representation of Qt5 qtwebengine Build Dependencies on Debian unstable (sid)
qtwebengine
\
├ Depends: libqt5opengl5-dev (>= 5.15.2+dfsg~) but it is not going to be installed
| \
| libqt5opengl5-dev = Source Package: qtbase-opensource-src [1]
| \
| | Depends: qdoc-qt5 (>= 5.15~) but it is not going to be installed
| |\
| | qdoc-qt5 = Source Package: qttools-opensource-src [2]
@trinitronx
trinitronx / pip_list_available_package_versions.py
Created February 7, 2017 17:50
Pip list all versions of a package that are available
import json
import urllib2
from distutils.version import StrictVersion
from distutils.version import LooseVersion
def versions(package_name):
url = "https://pypi.python.org/pypi/%s/json" % (package_name,)
data = json.load(urllib2.urlopen(urllib2.Request(url)))
versions = data["releases"].keys()
try:
@trinitronx
trinitronx / iterm_open_with
Last active June 26, 2021 01:19 — forked from sos4nt/iterm_open_with
Semantic history command for iTerm2 and Sublime Text 3. Allows iTerm integration of Command+Click to open a file in default app (if non-text), or Sublime Text with optional line number and column. Detects relative paths based on PWD.
#!/bin/sh
# iterm_open_with - open a URL, file from CWD, full path, or path with linenumber in default app or Sublime Text if text file
# For usage with iTerm2:
# In iTerm's Preferences > Profiles > Default > Advanced > Semantic History,
# choose "Run command..." and enter "/your/path/to/iterm_open_with \5 \1 \2".
# Usage: iterm_open_with $(pwd) filename [linenumber]
# $(pwd) = current working directory (either use `pwd` or $PWD)
# filename = filename to open
# lineno = line number
pwd=$1
@trinitronx
trinitronx / LICENSE
Last active July 4, 2020 09:20
AX_FEATURE_FLAG M4 Macro for usage with Autoconf
GNU GENERAL PUBLIC LICENSE
Version 3, 29 June 2007
Copyright (C) 2007 Free Software Foundation, Inc. <https://fsf.org/>
Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.
Preamble
The GNU General Public License is a free, copyleft license for
@trinitronx
trinitronx / keybase-verify-signing-key-sig.sh
Last active May 25, 2020 00:51
Script to Verify My Software Signing Key & Keybase Identity
#!/bin/bash
KEYBASE_USERID=trinitronx
GPG_PUBKEY_URL="https://keybase.io/trinitronx/key.asc"
SIGCHAIN_LINK="271330c45423cd997dafdc3f355c9575c0e6213aeb464596a457995ba0ae89110f"
THIS_SCRIPT_URL="https://gist.github.com/trinitronx/aee110cbdf55e67185dc44272784e694/raw/keybase-verify-signing-key-sig.sh"
THIS_SCRIPT_KEYBASE_SIGNATURE_URL="https://gist.github.com/trinitronx/aee110cbdf55e67185dc44272784e694/raw/keybase-verify-signing-key-sig.sh.keybase.sig.asc"
THIS_SCRIPT_GPG_SIGNATURE_URL="https://gist.github.com/trinitronx/aee110cbdf55e67185dc44272784e694/raw/keybase-verify-signing-key-sig.sh.gpg.sig.asc"
echo "This script requires that curl, gpg2, and jq are installed"
@trinitronx
trinitronx / Makefile_include_exclude
Last active November 25, 2019 22:13 — forked from davidlu1001/terraform_include_exclude
Makefile for Terraform to support include/exclude
# Plan exclude / include targets
# To use: export INCLUDE or EXCLUDE with Extended Grep pattern for targets to match
PLAN_OPTIONS ?=
APPLY_OPTIONS ?=
EXCLUDE ?=
INCLUDE ?=
TERRAFORM ?= terraform
PLAN_FILE ?= current.plan
REPO_NAME ?= terraform
@trinitronx
trinitronx / pkgutil --files com.apple.pkg.macOS_SDK_headers_for_macOS_10.14
Last active September 30, 2019 22:52
macOS Mojave 10.14.6 - Command Line Tools Header Files List
System
System/Library
System/Library/Frameworks
System/Library/Frameworks/AGL.framework
System/Library/Frameworks/AGL.framework/Headers
System/Library/Frameworks/AGL.framework/Versions
System/Library/Frameworks/AGL.framework/Versions/A
System/Library/Frameworks/AGL.framework/Versions/A/Headers
System/Library/Frameworks/AGL.framework/Versions/A/Headers/agl.h
System/Library/Frameworks/AGL.framework/Versions/A/Headers/aglContext.h
@trinitronx
trinitronx / apk-add.log
Last active May 18, 2018 20:53
Alpine openssl-dev openldap-dev package conflict
/ # apk add openldap-dev openssl-dev
ERROR: unsatisfiable constraints:
libressl-dev-2.6.3-r0:
conflicts: openssl-dev-1.0.2o-r0[pc:libcrypto=2.6.3] openssl-dev-1.0.2o-r0[pc:libssl=2.6.3] openssl-dev-1.0.2o-r0[pc:openssl=2.6.3]
satisfies: openldap-dev-2.4.45-r3[libressl-dev]
openssl-dev-1.0.2o-r0:
conflicts: libressl-dev-2.6.3-r0[pc:libcrypto=1.0.2o] libressl-dev-2.6.3-r0[pc:libssl=1.0.2o] libressl-dev-2.6.3-r0[pc:openssl=1.0.2o]
satisfies: world[openssl-dev]
@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: