Skip to content

Instantly share code, notes, and snippets.

Donald Merand dmerand

Block or report user

Report or block dmerand

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
@dmerand
dmerand / doku2tex.sh
Created Apr 18, 2012
BASH/AWK/SED script to convert Dokuwiki to Latex format. Flawed in many ways, but functional
View doku2tex.sh
#! /bin/sh
#doku-tex - take a dokuwiki/notational velocty syntax file, and convert it to latex
#author: donald l. merand
echo "\documentclass{article}"
echo "\pagestyle{empty}"
echo "\setlength{\parindent}{0pt}"
echo "\setlength{\parskip}{1ex plus 0.5ex minus 0.2ex}"
echo "\usepackage{ulem}"
echo "\usepackage[pdftex]{hyperref}"
echo "\hypersetup{colorlinks=true}"
@dmerand
dmerand / imagecomp.sh
Created Apr 25, 2012
ImageMagick Image Merger
View imagecomp.sh
#!/bin/sh
# IMAGE COMPOSITOR
# Author: Donald L. Merand
# Description: Merge images in a directory together into one composite image.
# Be careful, this program is recursive and can eat up some disk space
# creating images in subdirectories.
# default program options
RESULTSDIR="_results"
@dmerand
dmerand / tsvfmt.sh
Created May 2, 2012
Format TSV files on the command line
View tsvfmt.sh
#!/bin/sh
#tsvfmt - TSV Formatter
#Author: Donald L. Merand
#----------
#Takes a TSV file, and outputs a text-only representation of the table,
#+ justified to the max width of each column. Basically, you use it when
#+ you want to "preview" a TSV file, or print it prettily.
#----------
#Accepts standard input, or piped/redirected files
#----------
@dmerand
dmerand / tsv2html.sh
Created May 2, 2012
Convert TSV file to HTML snippet
View tsv2html.sh
#!/bin/sh
#convert a TSV file to an HTML file
#author: Donald L. Merand
#note: this is most useful in conjunction with bcat, which sends results to the browser
# you can get bcat on OS X using homebrew
# http://mxcl.github.com/homebrew/
# then type "brew install bcat"
#also note: this script only creates an HTML snippet - you'll probably want to wrap
@dmerand
dmerand / random-giphy-bg.html
Last active Oct 9, 2017
HTML Template for Random Animated Gif Background Using Giphy
View random-giphy-bg.html
<!DOCTYPE html>
<html>
<head>
<script src="http://code.jquery.com/jquery-2.1.1.min.js"></script>
<script>
$(function() {
var xhr = $.get("http://api.giphy.com/v1/gifs/random?api_key=dc6zaTOxFJmzC");
xhr.done(function(data) {
$('.gif-bg').css('background-image', 'url(' + data.data.image_url + ')');
});
@dmerand
dmerand / atom-style.css
Last active Aug 29, 2015
Stylesheet Changes to Atom to Center Text
View atom-style.css
// always center the scroll view
atom-text-editor {
.gutter {
-webkit-flex: 1;
text-align: right;
.line-number {
width: 100%;
}
}
@dmerand
dmerand / emoticonify
Created Jan 22, 2015
HipChat Emoticonify
View emoticonify
#!/usr/bin/env sh
#---------------------------------------------------------#
# emoticonify
# Donald L. Merand
# ----------------
# Convert any image file into a suitable hipchat emoticon
#---------------------------------------------------------#
# Usage: emoticonify <file>
# will return <file_emoticon.png>
#---------------------------------------------------------#
@dmerand
dmerand / gcode_pause.sh
Last active Jun 19, 2016
Insert a pause into a GCODE <<file>> at <<layer number>>, matching layers against an optional <<regex>>
View gcode_pause.sh
#!/usr/bin/env sh
#---------------------------------------------------------#
# gcode_pause
# Donald L. Merand
# ----------------
# Given (1) a file, (2) a layer number, and an optional
# (3) regular expression matching layer change, add a
# pause command (defaults to "M226" but changeable) to
# the GCODE.
#---------------------------------------------------------#
@dmerand
dmerand / filemaker_launcher.sh
Last active Apr 21, 2017
Shell Script FileMaker DB Launcher
View filemaker_launcher.sh
#!/usr/bin/env sh
# FileMaker Script Launcher
# =========================
#
# **Author:** Donald L. Merand
#
# General template to run ANY FileMaker script.
# NOTE: This is probably Mac-only. I haven't tested it on other platforms.
You can’t perform that action at this time.