Skip to content

Instantly share code, notes, and snippets.

View richie5um's full-sized avatar

Rich Somerfield richie5um

View GitHub Profile
@richie5um
richie5um / omnifocus.rb
Created September 21, 2012 21:53
Completed OmniFocus Tasks --> Brett Terpstra's Slogger --> DayOne Journal
=begin
Plugin: OmniFocus
Description: Grabs completed tasks from OmniFocus
Author: [RichSomerfield](www.richsomerfield.com)
=end
config = {
'omnifocus_description' => [
'Grabs completed tasks from OmniFocus'],
'omnifocus_tags' => '@tasks',
@richie5um
richie5um / vim-keymap.vim
Last active October 23, 2015 08:45
To record all of the keymappings each time you start VIM, outputs to ~/.vim/vim-keys.txt. Place this in ~/.vim/after/plugin/
redir! > ~/.vim/vim-keys.txt
silent verbose map
redir END
@richie5um
richie5um / TerminalHelper.scpt
Last active November 18, 2015 21:35
If you are using VSC v10.0+: Copy to '/Applications/Visual Studio Code.app/Contents/Resources/app/extensions/node-debug/out/node'. If you are using VSC v0.9: Copy to '/Applications/Visual Studio Code.app/Contents/Resources/app/extensions/node-debug/debugAdapter/out/node'
---------------------------------------------------------------
-- Copyright (C) Microsoft Corporation. All rights reserved.
-- Updated by R. Somerfield (hopefully without causing issues for Microsoft's rights).
---------------------------------------------------------------
-- the following two properties are persisted across different runs of this TerminalHelper script
-- they are used to reuse the same terminal across invocations
property lastTty : missing value
property lastWindowID : missing value
#!/bin/sh
# #!/usr/bin/sh
#
# opensnoop - snoop file opens as they occur.
# Written using DTrace (Solaris 10 3/05).
#
# 12-Jan-2006, ver 1.60
#
# USAGE: opensnoop [-a|-A|-ceghsvxZ] [-f pathname] [-n name] [-p PID]
#
@richie5um
richie5um / Content control basics.WORD.yaml
Created August 19, 2021 09:45
Inserts, updates, and retrieves content controls.
name: Content control basics
description: 'Inserts, updates, and retrieves content controls.'
host: WORD
api_set: {}
script:
content: >
$("#output-paragraph-controls").click(() =>
tryCatch(outputParagraphContentControls));
$("#output-selection-controls").click(() =>
@richie5um
richie5um / Content control basics.WORD.yaml
Last active August 19, 2021 10:08
Shows a bug with getSelection content controls
name: Content control basics
description: Shows a bug with getSelection content controls
host: WORD
api_set: {}
script:
content: >
$("#output-paragraph-controls").click(() =>
tryCatch(outputParagraphContentControls));
$("#output-selection-controls").click(() =>
import { getAssetFromKV, mapRequestToAsset } from "@cloudflare/kv-asset-handler";
addEventListener("fetch", (event) => {
event.respondWith(handleEvent(event));
});
async function handleEvent(event) {
try {
name: Save and Load CustomXMLParts
description: ''
host: WORD
api_set: {}
script:
content: >
$("#set-xml").click(() => tryCatch(setCustomJson));
$("#get-all-xml").click(() => tryCatch(getAllCustomJson));
@richie5um
richie5um / Search.WORD.yaml
Created July 18, 2022 13:08
Shows basic and advanced search capabilities.
name: Search
description: Shows basic and advanced search capabilities.
host: WORD
api_set: {}
script:
content: |
$("#setup").click(() => tryCatch(setup));
$("#basic-search").click(() => tryCatch(basicSearch));
$("#wildcard-search").click(() => tryCatch(wildcardSearch));
name: Read SmzCustomXml
description: ''
host: WORD
api_set: {}
script:
content: |
$("#get-xml").click(() =>
tryCatch(() => {
getCustomJson();
})