Skip to content

Instantly share code, notes, and snippets.

Tim Martin t-mart

Block or report user

Report or block t-mart

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@t-mart
t-mart / README.md
Created Dec 4, 2018
xmlto does not validate xmlto: Fix document syntax or use --skip-validation option I/O error : Attempt to load network entity dtd warning: failed to load external entity D DocBook XML V4.5//EN"
View README.md

Problem

When compiling git from source, I often run into this problem:

% make prefix=$HOME all doc info
    SUBDIR git-gui
    SUBDIR gitk-git
    SUBDIR templates
/Applications/Xcode.app/Contents/Developer/usr/bin/make -C Documentation all
View gist:b9b0d0455319c970940f8a18a60941de
apiVersion: extensions/v1beta1
kind: Ingress
metadata:
name: ingress
spec:
rules:
- http:
paths:
- path: /
backend:
@t-mart
t-mart / boomerang.zsh
Created Oct 14, 2018
Creates a "boomerang" movie clip.
View boomerang.zsh
#!/usr/bin/env zsh
set -ex
INPUT_FILE_PATH=${INPUT:a}
INPUT_DIR=${INPUT:a:h}
INPUT_EXT=${INPUT:e}
REVERSE_FILE_PATH="${INPUT_DIR}/reverse.${INPUT_EXT}"
FORWARD_FILE_PATH="${INPUT_DIR}/forward.${INPUT_EXT}"
@t-mart
t-mart / forensic_files.json
Last active Aug 19, 2019
Forensic Files Episodes on Netflix
View forensic_files.json
[
{
"netflix_collection_number": 1,
"netflix_episode_number": 1,
"title": "If I Were You",
"series_number": 285,
"season": 11,
"season_number": 28,
"air_date": "2007-01-24"
},
@t-mart
t-mart / zsh.zsh
Created Mar 11, 2017
Function rename?
View zsh.zsh
foo() {
echo "This is foo()"
}
bar=foo
bar
# --> zsh: command not found: bar
@t-mart
t-mart / netrw quick reference.md
Last active Aug 21, 2019
A quick reference for Vim's built-in netrw file selector.
View netrw quick reference.md
Map Action
<F1> Causes Netrw to issue help
<cr> Netrw will enter the directory or read the file
<del> Netrw will attempt to remove the file/directory
- Makes Netrw go up one directory
a Toggles between normal display, hiding (suppress display of files matching g:netrw_list_hide) showing (display only files which match g:netrw_list_hide)
c Make browsing directory the current directory
C Setting the editing window
d Make a directory
View knobs.py
from itertools import combinations
UP = [[0,0,1,0,1,1,
1,1,1,1,0,1],
[1,0,1,0,1,0,
0,1,1,0,1,1]]
DOWN = [[0,1,1,0,0,1,
1,1,1,1,0,1],
[1,0,1,0,1,0,
0,1,0,0,0,1]]
@t-mart
t-mart / pull-submodules-to-origin-master.pre-commit-hook.sh
Last active Oct 15, 2015
A script to pull submodules to their origin/master. Meant to be used as a git hook.
View pull-submodules-to-origin-master.pre-commit-hook.sh
#!/bin/sh
#
# To enable this hook, place this file at:
# <repo-base-dir>/.git/hooks/pre-commit
printf "Updating submodules to origin master..." >&2
git submodule update --rebase --remote
STATUS=$?
if [ $STATUS -eq 0 ]; then
echo "done" >&2
@t-mart
t-mart / rude.sh
Last active Oct 7, 2015
Say it with me: Random Uuids...R Uuid...Ruuid...rude!
View rude.sh
#!/usr/bin/env python2
from base64 import b32encode
from uuid import uuid4
from sys import stdout
stdout.write(b32encode(uuid4().bytes)[:-6])
if stdout.isatty():
stdout.write('\n')
@t-mart
t-mart / fourget.sh
Created Oct 7, 2015
Download 4chan images to the current directory.
View fourget.sh
#!/usr/bin/env sh
# Download 4chan images to the current directory.
#
# example: fourget http://boards.4chan.org/int/thread/48964967
#
# requires httpie to be installed.
# The MIT License (MIT)
#
You can’t perform that action at this time.