Skip to content

Instantly share code, notes, and snippets.

Avatar

Donald Merand dmerand

View GitHub Profile
@dmerand
dmerand / dns-monitor-cron.sh
Created Jan 28, 2020
Sample DNS-Monitor CRON Script
View dns-monitor-cron.sh
#!/usr/bin/env sh
HERE="/Users/explo/cron/dns-monitor-data"
GCHAT_URL='https://gchat_url_goes_here.com'
MANDRILL_KEY='paste_ye_olde_key_here'
MANDRILL_EMAIL="person@example.com"
cd "${HERE}" && /Users/explo/.rbenv/shims/dns-monitor --check \
--domains_path "${HERE}/hosts.txt" \
--db_path "${HERE}/dns-monitor.sqlite3" \
View keybase.md

Keybase proof

I hereby claim:

  • I am dmerand on github.
  • I am donaldmerand (https://keybase.io/donaldmerand) on keybase.
  • I have a public key whose fingerprint is 78D3 1A32 50CC 3479 1DA5 365E 3C62 4C48 9615 08BB

To claim this, I am signing this object:

@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.
@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 / 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 / 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 / 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 / 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 / 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 / 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"
You can’t perform that action at this time.