Skip to content

Instantly share code, notes, and snippets.

@dgreen
dgreen / Default (OSX).sublime-keymap
Created August 11, 2012 06:02 — forked from FichteFoll/prettify_markdown_table.py
Plugin for Sublime Text 2 that "prettifies" MultiMarkdown tables and aligns their vertical separators
[
{
"keys": ["ctrl+k"], "command": "prettify_markdown_table"
}
]
@dgreen
dgreen / rtftomarkdown.rb
Created October 11, 2012 04:43 — forked from ttscoff/rtftomarkdown.rb
Convert RTF/DOC files to Markdown via Textutil
#!/usr/bin/ruby
# Uses textutil, available on Mac only (installed by default)
# Usage: rtftomarkdown.rb FILENAME.rtf
# Outputs to STDOUT
if ARGV.length == 0
puts "#{__FILE__} expects an RTF input file as an argument"
exit
end
@dgreen
dgreen / Drop Action.scpt
Last active November 4, 2018 05:31 — forked from cdzombak/Drop Action.scpt
OmniFocus AppleScript to move an action to my "❌ Dropped" context and mark it completed.
-- Drop an action
-- Mark it "Complete" and add front tag of "❌ Dropped"
--
tell application "OmniFocus"
tell front document
try
set droppedTag to first tag where its name contains "Dropped"
on error
display alert "No tag found whose name ends with “" & "Dropped”"
return
@dgreen
dgreen / unpackCanvasSubmissions.pl
Last active October 20, 2018 22:53
Unpack a Canvas Submission
#!/usr/bin/env perl -w
# File: unpack_canvas_submissions.pl
# Desc: unpack submissions.zip from Canvas
# Vers: 1.1 dgg 20181020 - update for Mac Mojave (and any changes due to recent Canvas updates)
# Vers: 1.0 dgg 20171129 - fixup syntax for High Sierra Perl and declare version 1.0
# Vers: 0.3 dgg 20171108 - move original submissions.zip to trash
# Vers: 0.2 dgg 20170910 - eliminate copy of submissions.zip
# Vers: 0.1 dgg 20160216 - original coding
#
# Limitation: Present version is tied to MacOS, Linux
@dgreen
dgreen / Support Note.scpt
Last active May 7, 2019 03:23 — forked from csreed/Support Note.scpt
Create a project support note in Evernote. The note will be cross-referenced with the task/project in OmniFocus.
(*
Opens the support note for an OmniFocus task/project in Evernote. Creates the note if necessary, linking the note back to the task/project.
NB: If you set this up by hand, the evernote:/// URL in OmniFocus needs to be enclosed in <> for the script to find it.
Put this script in ~/Library/Application Scripts/com.omnigroup.omnifocus2. Then you can add the script as a custom toolbar item.
version 1.0: Initial release
*)
@dgreen
dgreen / Prepare Task Completion Report.scpt
Last active December 31, 2018 04:08
Completed Task Report
--==============================
-- OmniFocus > Completed Task Report
-- Version 1.1.0
-- Originally Written By: Ben Waldie <ben@automatedworkflows.com>
-- http://www.automatedworkflows.com
-- Description: This script retrieves a list of OmniFocus tasks completed today, yesterday, this week, last week, or this month. It then summarizes the tasks in a new Evernote note.
-- Version History:
-- 1.4.1 - DGG Add Quarterly Report
-- 1.3.0 - DGG Change folder, separately log items tagged Dropped
@dgreen
dgreen / CreatePDFListing.sh
Last active April 15, 2019 14:09
Create a pdf listing for all source files in NetBeans Java Project (ant-based) - shell script portion of automator script
ENSCRIPT=/usr/local/bin/enscript
PS2PDF=/usr/local/bin/ps2pdf
PACKAGE="*/"
# PACKAGE=
# TBD: deal with spaces in paths
for f in "$@"
do
@dgreen
dgreen / gaugedemo.html
Last active April 30, 2019 04:14
Example Dashboard of Gauges
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="description" content="Financial Dashboard">
@dgreen
dgreen / display.php
Created May 7, 2019 03:57
Simple PHP script to show data available to it
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>Displaying results of activation</title>
</head>
<body>
<h1>Results of Activation</h1>
<?php
@dgreen
dgreen / nbactions.xml
Last active October 9, 2019 05:11
An attempt at a POM for NetBeans 11.1 (and CoolBeans) which allows building, debugging, testing, and creating javadoc style documentation.
<?xml version="1.0" encoding="UTF-8"?>
<actions>
<action>
<actionName>run</actionName>
<packagings>
<packaging>jar</packaging>
</packagings>
<goals>
<goal>process-classes</goal>
<goal>package</goal>