Skip to content

Instantly share code, notes, and snippets.

View mgreiner's full-sized avatar

Mike Greiner mgreiner

View GitHub Profile
#!/usr/bin/env xcrun swift
import Foundation
let kDelayUSec : useconds_t = 500_000
func DragMouse(p0: CGPoint, p1: CGPoint) {
let mouseDown = CGEventCreateMouseEvent(nil, .LeftMouseDown, p0, CGMouseButton.Left)
let mouseDrag = CGEventCreateMouseEvent(nil, .LeftMouseDragged, p1, CGMouseButton.Left)
let mouseUp = CGEventCreateMouseEvent(nil, .LeftMouseUp, p1, CGMouseButton.Left)
tell application "Notes"
repeat with thisAccount in accounts
repeat with thisFolder in folders of thisAccount
repeat with thisNote in notes of thisFolder
set myTitle to the name of thisNote
set myText to the body of thisNote
set myCreateDate to the creation date of thisNote
set myModDate to the modification date of thisNote
tell application "Evernote"
set importedNote to create note with html myText Â
@mgreiner
mgreiner / pre-commit
Last active August 29, 2015 13:57
Pre-commit hook to prevent committing anything that references Reveal.
#!/bin/sh
if git diff --cached | grep "Reveal\.\(app\|framework\)" > /dev/null
then
echo "Your project contains references to Reveal. Remove the references before commiting."
exit 1
fi