Skip to content

Instantly share code, notes, and snippets.

View magicknot's full-sized avatar
🏠

David Duarte magicknot

🏠
  • Orca AG
  • Lisbon, Portugal
View GitHub Profile
@cmod
cmod / things-top-todo.json
Created July 25, 2018 08:23
Touch Bar addition: Latest todo in Things
This file has been truncated, but you can view the full file.
{
"BTTWidgetName" : "Things To Do Today",
"BTTTriggerType" : 639,
"BTTTriggerTypeDescription" : "Apple Script Widget",
"BTTTriggerClass" : "BTTTriggerTypeTouchBar",
"BTTPredefinedActionType" : 195,
"BTTPredefinedActionName" : "Run Apple Script (async in background)",
"BTTInlineAppleScript" : "tell application \"Things3\"\r\tset firstItem to item 1 of every to do of list \"Today\"\r\tset firstName to name of firstItem\r\tdisplay notification \"COMPLETED: \" & firstName\r\tset status of firstItem to completed\rend tell",
"BTTScriptType" : "AppleScript",
"BTTEnabled2" : 1,
// Inspiration : Existensial Types (Abstract type Member) Make OOP great again! Julien R. Foy
// https://www.youtube.com/watch?v=6j5kZj17aUw
// Compare this with the type class version : https://gist.github.com/wibisono/28d8808159e0c7103042d7c5c668edf7
sealed trait Animal
case class Dog(name : String) extends Animal
case class Cat(name : String) extends Animal
trait Speaking {
type A
def speak(creature : A) : String