Skip to content

Instantly share code, notes, and snippets.

@LTGIV
LTGIV / dnscc.bash
Last active September 23, 2018 18:48
DNSControl Compiler
#!/usr/bin/env bash
: <<'!COMMENT'
DNSControl Compiler v201712120445
Louis T. Getterman IV (@LTGIV)
https://Thad.Getterman.org/2017/12/11/dnscontrol-compiler
# DNSControl
https://github.com/StackExchange/dnscontrol
https://github.com/StackExchange/dnscontrol/blob/master/docs/getting-started.md
@LTGIV
LTGIV / docker-timemachine.service
Created December 5, 2016 18:06
systemd service : Apple Time Machine in Docker
[Unit]
Description=Time Machine Service
After=docker.service setup-network-environment.service
Requires=docker.service setup-network-environment.service
RequiresMountsFor=/mnt/YOURDRIVEHERE
[Service]
EnvironmentFile=/etc/network-environment
TimeoutStartSec=0
Restart=always
@LTGIV
LTGIV / ubuntu-initial.yml
Last active August 5, 2016 10:21
Ansible playbook: Initial provision of an Ubuntu Server
---
#
# Ansible playbook: Initial provision of an Ubuntu Server v201608051020
# Louis T. Getterman IV (@LTGIV)
# https://www.opensour.cc/network/ansible/examples/ubuntu-initial-setup
#
# Install Requirements:
# ansible-galaxy install resmo.ntp resmo.sshd
#
# Set Ansible inventory host:
@LTGIV
LTGIV / vmware-hgfs-remount.conf
Last active February 21, 2016 02:05
Remount VMWare Host-Guest File System with proper permissions
description "VMware Host-Guest File System Remount"
author "Louis T. Getterman IV"
# Save this file to /etc/init/vmware-hgfs-remount.conf
# chmod 444 /etc/init/vmware-hgfs-remount.conf
# Note: Adjust UID and GID arguments below, if needed.
start on started vmware-tools
stop on stopped vmware-tools
@LTGIV
LTGIV / 2015-10-02_kivy-ios_toolchain_build_fail_log.txt
Last active October 2, 2015 10:55
2015-10-02: kivy-ios toolchain build failure (on fresh OSX 10.11 install)
This file has been truncated, but you can view the full file.
Last login: Fri Oct 2 05:15:22 on ttys000
Louiss-Mac:~ ltgiv$ which git
/usr/bin/git
Louiss-Mac:~ ltgiv$
@LTGIV
LTGIV / gist:2b557af1901d8af7db89
Last active August 29, 2015 14:27
Cloning latest stable release of OpenCV 3
git clone https://github.com/Itseez/opencv.git --branch "$( \
git ls-remote --tags https://github.com/Itseez/opencv.git | \
sed -e 's/^[[:space:]]*//' | \
grep --perl-regexp --ignore-case --only-matching '(?<=refs/tags/)3\.[0-9][\.0-9]*$' | \
sort --version-sort | \
tail -n 1 \
)" --single-branch
@LTGIV
LTGIV / zbar010seg11_patch.diff
Created May 17, 2015 22:52
Patch to fix zbar 0.10 segmentation fault 11
--- zbar-0.10/imagescanner.c 2009-11-10 04:40:18.000000000 +0700
+++ zbar-0.10_patched/imagescanner.c 2015-05-18 05:44:24.000000000 +0700
@@ -67,7 +67,10 @@
}
static PyGetSetDef imagescanner_getset[] = {
- { "results", (getter)imagescanner_get_results, },
+ // Instructions for patching: http://thad.getterman.org/post/119228757923/fix-zbar-osx-segmentation-fault-11
+ // Special thanks goes to http://stackoverflow.com/questions/21612908/zbar-python-crashes-on-import-osx-10-9-1
+ { "results", (getter)imagescanner_get_results, NULL, NULL, NULL },

Keybase proof

I hereby claim:

  • I am ltgiv on github.
  • I am ltgiv (https://keybase.io/ltgiv) on keybase.
  • I have a public key whose fingerprint is 9D50 4A87 1FC3 FBD3 9CB2 36DB 4E71 71E9 1FCC D4CC

To claim this, I am signing this object:

@LTGIV
LTGIV / purgeCakeTmp.bash
Created April 17, 2015 21:12
Quick way to trash CakePHP v2 application cache
#!/usr/bin/env bash
: <<'!COMMENT'
CakePHP Cache Flush v201504172014
Louis T. Getterman IV (@LTGIV)
www.GotGetLLC.com | www.opensour.cc/programming/php/frameworks/cakephp/v2/cache/flush
Thanks:
http://stackoverflow.com/questions/15065010/how-to-do-for-each-file-using-find-in-shell-bash
http://stackoverflow.com/questions/1590297/shell-scripting-using-bash-with-xargs
@LTGIV
LTGIV / ssh_config
Last active August 29, 2015 14:15
Ansible with Bastion Host(s)
#
# Route all superserver####.example.com connections through superserver9001.example.com
# Save as: ~/ssh/config
#
# A very special thank you to Alex Bilbie:
# http://alexbilbie.com/2014/07/using-ansible-with-a-bastion-host/
#
Host superserver9001.example.com
User userNameHere1