This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// | |
// TableViewController.m | |
// BlogReader | |
// | |
// Created by Matthew Spear on 21/06/2014. | |
// Copyright (c) 2014 Matthew Spear. All rights reserved. | |
// | |
#import "TableViewController.h" | |
#import "BlogPost.h" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(* | |
File: OmniFocus_Due_List.scpt | |
Revision: 1.0 | |
Revised: 2015-07-01 | |
Summary: Create taskpaper list of tasks due +/- 7d from current date. | |
----------------------------------------------------------- | |
Script based on Justin Lancy (@veritrope) from Veritrope.com |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
tell application "OmniFocus" | |
tell default document | |
set flagged of (every flattened task whose flagged is true) to false | |
end tell | |
end tell |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//: Playground - noun: a place where people can play | |
func fizzBuzz(n: Int) -> String | |
{ | |
let divThree = (n % 3 == 0) | |
let divFive = (n % 5 == 0) | |
var numberName = "" | |
if (divThree && divFive) | |
{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
tell application "Calendar" | |
tell calendar "Timetable" | |
--reload calendars | |
set theEvents to {} | |
set AllEvents to events | |
repeat with anEvent in AllEvents | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Functional FizzBuzz Generator in Python | |
def fizz_buzz(num): | |
if num % 3 == 0 and num % 5 == 0: | |
return 'FizzBuzz' | |
elif num % 3 == 0: | |
return 'Fizz' | |
elif num % 5 == 0: | |
return 'Buzz' | |
else: | |
return str(num) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Add these lines to ~/.bash_profile or ~/.zshrc: | |
# SelfControl | |
alias sc-read="defaults read org.eyebeam.SelfControl" | |
alias sc-run="sudo /Applications/SelfControl.app/Contents/MacOS/org.eyebeam.SelfControl $(id -u $(whoami)) --install" | |
alias sc-check="sudo /Library/PrivilegedHelperTools/org.eyebeam.SelfControl $(id -u $(whoami)) --checkup" | |
sc-set() | |
{ | |
if [ "$1" = "" ]; then |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import Foundation | |
// Setup Standard Output, Error | |
let stderr = NSFileHandle.fileHandleWithStandardError() | |
let stdout = NSFileHandle.fileHandleWithStandardOutput() | |
func writeToStd(handle: NSFileHandle, _ str: String) | |
{ | |
if let data = str.dataUsingEncoding(NSUTF8StringEncoding) | |
{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import UIKit | |
class Person | |
{ | |
let name: String | |
let birthday: NSDate | |
lazy var age: Double = self.calculateAge() | |
init(name: String, birthday: NSDate) | |
{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
### Keybase proof | |
I hereby claim: | |
* I am matthewspear on github. | |
* I am matthewspear (https://keybase.io/matthewspear) on keybase. | |
* I have a public key whose fingerprint is 7430 C437 5A47 3405 AB10 D169 F8D6 8498 7F65 3D4E | |
To claim this, I am signing this object: |
OlderNewer