Skip to content

Instantly share code, notes, and snippets.

Bradley Wright bradwright

Block or report user

Report or block bradwright

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
@bradwright
bradwright / Instructions.md
Created Oct 24, 2015
Copy all files from one place to another, recursively, sleeping between runs
View Instructions.md
  1. Download the above file and save it somewhere (eg ~/Downloads)
  2. Open Terminal.app, and go to where it's saved (eg cd ~/Downloads)
  3. Run the script, with the HDD volume as the first argument, eg: python sleep-and-copy.py /Volumes/Thing/Path/to/itunes /Library/Local-path-to-itunes
View keybase.md

Keybase proof

I hereby claim:

  • I am bradwright on github.
  • I am bradwright (https://keybase.io/bradwright) on keybase.
  • I have a public key whose fingerprint is 79EE 15F3 67EA 61C6 4F98 69AE C101 6131 8826 6237

To claim this, I am signing this object:

@bradwright
bradwright / clear-available-flags.scpt
Last active Aug 29, 2015
Clear the flagged state of all available tasks
View clear-available-flags.scpt
-- Unflag every available task in every context (it has to be assigned a context)
tell application "OmniFocus"
tell default document
set flagged of (every available task of every flattened context whose flagged is true) to false
end tell
end tell
@bradwright
bradwright / README.md
Last active Aug 29, 2015
Send current Evernote link to clipboard
View README.md

Add this script in Automator as a service for "Evernote".

@bradwright
bradwright / content-api.json
Last active Aug 29, 2015
Example output from GOV.UK APIs
View content-api.json
{
"id":"https://www.gov.uk/api/bank-holidays.json",
"web_url":"https://www.gov.uk/bank-holidays",
"title":"UK bank holidays",
"format":"custom-application",
"updated_at":"2014-06-27T13:14:21+01:00",
"tags":[
{
"id":"https://www.gov.uk/api/tags/section/working%2Ftime-off.json",
"slug":"working/time-off",
@bradwright
bradwright / versioning-api.md
Created May 13, 2014
GOV.UK versioning API
View versioning-api.md

Summary

An append-only datastore with API to store all published versions of a document.

User needs

  • As a citizen, I need to see change history of a document so I can see how a policy or official document evolves over time (TRUST)
  • As someone whose job relies on historical versions (e.g a tax accountant, lawyer), I need to be able to see older versions of documents from specific points in time, so I can refer to them

Technical sketch

@bradwright
bradwright / private.xml
Last active Aug 29, 2015
KeyRemap4MacBook XML configuration for the Tarmak transitional layout
View private.xml
<?xml version="1.0"?>
<root>
<item>
<name>Tarmak transitional layout</name>
<!-- http://forum.colemak.com/viewtopic.php?pid=8786#p8786 -->
<item>
<name>Tarmak1(E) transitional layout (E&gt;K&gt;N&gt;J)</name>
<identifier>private.tarmak.tarmak_1_e</identifier>
<autogen>__KeyToKey__ KeyCode::K, KeyCode::E</autogen>
<autogen>__KeyToKey__ KeyCode::N, KeyCode::K</autogen>
@bradwright
bradwright / send-mail-to-omnifocus-and-archive.scpt
Last active Aug 25, 2016
Take current Mail.app message, send its subject and 'message:<>' URL to OmniFocus, and then Archive the email
View send-mail-to-omnifocus-and-archive.scpt
-- Send currently selected Mail.app message to OmniFocus 2 quick entry box, then archive it
-- Archive behaviour found at: http://vemedio.com/blog/posts/my-archive-email-apple-script
tell application "Mail"
set theSelectedMessages to selection
set the selected_message to item 1 ¬
of the theSelectedMessages
set message_id to the message id of the selected_message
set my_subject to the subject of the selected_message
set message_url to "message://%3c" & message_id & "%3e"
View keybase.md

Keybase proof

I hereby claim:

  • I am bradleywright on github.
  • I am bradwright (https://keybase.io/bradwright) on keybase.
  • I have a public key whose fingerprint is 79EE 15F3 67EA 61C6 4F98 69AE C101 6131 8826 6237

To claim this, I am signing this object:

@bradwright
bradwright / send-chrome-tab-to-omnifocus.scpt
Created Feb 19, 2014
Send current Chrome tab to OmniFocus
View send-chrome-tab-to-omnifocus.scpt
on run {input, parameters}
tell application "Google Chrome"
set theName to title of active tab of front window
set theUrl to URL of active tab of front window
tell application "OmniFocus"
set theTask to theName
set theNote to theUrl
tell quick entry
set NewTask to make new inbox task with properties {name:theTask, note:theNote}
You can’t perform that action at this time.