Skip to content

Instantly share code, notes, and snippets.

View cpjhenry's full-sized avatar

Paul Henry cpjhenry

View GitHub Profile
@cpjhenry
cpjhenry / Send to nvAlt
Created May 26, 2016 12:57
AppleScript to send current url from Google Chrome to nvAlt
on run {input, parameters}
tell application "Google Chrome"
set noteTitle to get title of active tab of first window
set noteURL to get URL of active tab of first window
display dialog "Set title:" with title "Send to nvAlt" default answer noteTitle
set noteTitle to the text returned of the result
display dialog "Enter a comment:" default answer ""
@cpjhenry
cpjhenry / Send to Notes
Last active October 21, 2016 00:19
AppleScript to send current url from Google Chrome to Mac Notes
on run {input, parameters}
tell application "Google Chrome"
set noteTitle to get title of active tab of first window
set noteURL to get URL of active tab of first window
if noteTitle is "" then
display dialog "Enter a title for the new note:" ¬
with title "Send to Notes" ¬
default answer "Untitled note"
@cpjhenry
cpjhenry / todo
Last active October 16, 2016 13:23
TODO
#!/bin/bash
# Check for TODO notes in script directory
# 2015-02-06
# 2015-03-03 : filter out symbolic link, add formatting to display
searchloc="bin/*"
for i in $searchloc; do
[ ! -h $i ] && td=$(grep -s --exclude todo "TODO" $i)
[ ! -h $i ] && fm=$(grep -s --exclude todo "FIXME" $i)