Skip to content

Instantly share code, notes, and snippets.

View djhaskin987's full-sized avatar

Daniel Jay Haskin djhaskin987

View GitHub Profile
@djhaskin987
djhaskin987 / .gitattributes
Last active August 29, 2022 13:02
catch-all, end-all, One to Rule Them All, comprehensive gitattributes file; or, notes of my travels through other people's code.
# Use this line at your own risk
# * text=auto
# Editor save files
# (these should be in your gitignore)
*~ text
.*.sw[a-z] text
\#* text
.#* text
@djhaskin987
djhaskin987 / rdp.sh
Created August 30, 2016 14:33
Options to use with XFreeRDP
#!/bin/sh
set -x
xfreerdp \
"${@}"
+clipboard \
+compression \
/audio-mode:2 \
/network:lan \
/cert-ignore \
@djhaskin987
djhaskin987 / functions
Last active July 31, 2016 05:51
Useful Clojure Macros
(defn assoc-conj
"Conjoin a value onto the list corresponding to the key `k` in `mp`."
[mp k v]
(if (empty? mp)
{k [v]}
(if (empty? (mp k))
(assoc mp [v])
(assoc mp
(conj (mp k)
v)))))
@djhaskin987
djhaskin987 / header_of_pwfile.gpg
Last active May 26, 2016 15:52
For use with keeping track of passwords with gnupg.vim in encrypted text files
# vim: nobackup nowritebackup noswapfile bufhidden=wipe tw=0 conceallevel=2 concealcursor=nvc foldmethod=syntax syntax=password
@djhaskin987
djhaskin987 / openpgp.txt
Created February 10, 2016 23:10
OpenKeychain Linked Identity
This Gist confirms the Linked Identity in my OpenPGP key, and links it to this GitHub account.
Token for proof:
[Verifying my OpenPGP key: openpgp4fpr:f54cff731e7e01c3ae749b30d62daa3e080e17a9]
@djhaskin987
djhaskin987 / get_exe_version.c
Created January 27, 2016 19:08
Get version from EXE file on linux
/* Distributed under the CC-wiki license.
* user contributions licensed under cc by-sa 3.0 with attribution required: https://creativecommons.org/licenses/by-sa/3.0/
* Originally taken from the answer by @rodrigo, found here: http://stackoverflow.com/a/12486703/850326
*/
#include <stdio.h>
#include <stdlib.h>
#include <memory.h>
#include <string.h>
#include <stdint.h>
#include <sys/stat.h>
@djhaskin987
djhaskin987 / .config_git-cola_settings
Last active November 9, 2015 14:50
My favorite git-cola layout
{
"gui_state": {
"mainview": {
"lock_layout": false,
"show_status_filter": false,
"height": 768,
"windowstate": "AAAA/wAAAAL9AAAAAQAAAAAAAASaAAADVfwCAAAAAfwAAAAVAAADVQAAATsA/////AEAAAAC/AAAAAAAAADZAAAA2QD////6AAAAAAIAAAAC+wAAAAwAUgBlAGMAZQBuAHQBAAAAAP////8AAABjAP////sAAAASAEYAYQB2AG8AcgBpAHQAZQBzAQAAAHsAAADRAAAAYwD////8AAAA3AAAA74AAACZAP////wCAAAABPsAAAAOAEEAYwB0AGkAbwBuAHMBAAAAFQAAAGYAAAA6AP////wAAAB+AAAAvQAAAHgBAAAU+gAAAAEBAAAAA/sAAAAMAFMAdABhAHQAdQBzAQAAAAD/////AAAAiQD////7AAAACABEAGkAZgBmAQAAAAD/////AAAAewD////7AAAADABDAG8AbQBtAGkAdAEAAAFgAAABnwAAAJkA////+wAAAA4AQgByAG8AdwBzAGUAcgEAAAE+AAABBwAAAGMA////+wAAAA4AQwBvAG4AcwBvAGwAZQEAAAJIAAABIgAAAB0A////AAAAAAAAA1UAAAAEAAAABAAAAAgAAAAI/AAAAAA=",
"width": 1024,
"maximized": false,
"y": 50,
@djhaskin987
djhaskin987 / git-open.py
Created August 21, 2015 02:34
Clone a git repo in an organized, convenient fashion
#!/usr/bin/python
from __future__ import unicode_literals
from __future__ import print_function
from __future__ import absolute_import
from __future__ import division
import giturlparse
import os
import subprocess
import argparse
@djhaskin987
djhaskin987 / us_letter.tex
Last active August 29, 2015 14:27
US letter LaTeX template for math and science
\documentclass[12pt]{article}
\usepackage{amsmath,amsfonts,amssymb,amsthm,placeins}
\usepackage[pdftex]{graphicx}
\setlength{\pdfpagewidth}{8.5in}
\setlength{\pdfpageheight}{11in}
\setlength{\topmargin}{0.0in}
\setlength{\voffset}{0.0in}
\setlength{\oddsidemargin}{0.0in}
@djhaskin987
djhaskin987 / keybase.md
Created April 15, 2015 15:23
keybase.md

Keybase proof

I hereby claim:

  • I am djhaskin987 on github.
  • I am djhaskin987 (https://keybase.io/djhaskin987) on keybase.
  • I have a public key whose fingerprint is F54C FF73 1E7E 01C3 AE74 9B30 D62D AA3E 080E 17A9

To claim this, I am signing this object: