Skip to content

Instantly share code, notes, and snippets.


James Cuzella trinitronx

View GitHub Profile
trinitronx / Makefile_include_exclude
Last active Nov 25, 2019 — forked from davidlu1001/terraform_include_exclude
Makefile for Terraform to support include/exclude
View Makefile_include_exclude
# Plan exclude / include targets
# To use: export INCLUDE or EXCLUDE with Extended Grep pattern for targets to match
TERRAFORM ?= terraform
PLAN_FILE ?= current.plan
REPO_NAME ?= terraform
''' Not my script, found on the Internet, and rediscovered on my hard drive
import sys
def cidr_to_regex(cidr):
ip, prefix = cidr.split('/')
base = 0
for val in map(int, ip.split('.')):
trinitronx / gist:8b80f2e2529b9bc32bf70af01b59033a
Created Jun 10, 2016 — forked from clintel/gist:1155906
Fenced code in bullet lists with GitHub-flavoured MarkDown??
View gist:8b80f2e2529b9bc32bf70af01b59033a

Fenced code blocks inside ordered and unordered lists

  1. This is a numbered list.

  2. I'm going to include a fenced code block as part of this bullet:

    More Code
trinitronx / gpg-agent.conf
Created May 12, 2016 — forked from nl5887/gpg-agent.conf
Using GPG Agent on OS-X
View gpg-agent.conf
launchctl unload -w -S Aqua /System/Library/LaunchAgents/gpg.agent.daemon.plist
launchctl load -w -S Aqua /System/Library/LaunchAgents/gpg.agent.daemon.plist
trinitronx / iterm_open_with
Last active Jun 28, 2020 — 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.
View iterm_open_with
# 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
trinitronx / truecrypt_fix.bash
Last active Mar 21, 2017 — forked from jimjh/truecrypt_fix.bash
Fixes annoying brew doctor messages caused by Truecrypt
View truecrypt_fix.bash
libs=( "/usr/local/lib/libmacfuse_i32.2.dylib" \
"/usr/local/lib/libosxfuse_i32.2.dylib" \
"/usr/local/lib/libosxfuse_i64.2.dylib" \
"/usr/local/lib/libmacfuse_i64.2.dylib" \
"/usr/local/lib/" \
"/usr/local/lib/" \
"/usr/local/lib/pkgconfig/osxfuse.pc" )
trinitronx / Open iTerm Here
Last active Dec 16, 2015 — forked from al3xandru/gist:1156476
An AppleScript to provide Open iTerm Here function within Forked to work with iTerm2's default Hotkey Window keyboard shortcut. (So it triggers the sliding yakuake-style Hotkey Window profile first.)
View Open iTerm Here
on run {input, parameters}
tell application "Finder"
set sel to selection
if (count sel) > 0 then
set myTarget to item 1 of sel
else if (count window) > 0 then
set myTarget to target of window 1
set myTarget to path to home folder
end if