Skip to content

Instantly share code, notes, and snippets.

"https://flow.polar.com/activity/data/1.6.2015/6.12.2015"
json := Clipboard clipboardText.
data := NeoJSONReader on: json readStream.
data := data next at: 'data'.
sleep := Dictionary new.
data reverse collect: [:each |
|summary sleepTime |
summary := (each at: 'summaries') at: 1.
ts := (DateAndTime fromString: (summary at: 'datetime')) asDate.
sleepTime := ((((summary at: 'sleepTime') / 1000 / 60 / 60) asFloat * 10) rounded / 10) asFloat.

Syntax of OPS5

The following is a simplified BNF description of the syntax of OPS5. Terminals are printed in a Roman type face, and non-terminals are printed in italics. The only nonstandard meta symbol used is the star (*). The star indicates that the preceding item is to be repeated zero or more times.

production				::=		( p constant-symbolic atom Ihs --> rhs )

lhs						::=		positive-ce ce*
structure WME {copied from page 41}
fields: array [1..3] of symbol
alpha-mem-items: list of item-in-alpha-memory {the ones with wme=this WME}
tokens: list of token {the ones with wme=this WME}
negative-join-results: list of negative-join-result
end
structure token {copied from page 48}
parent: token {points to the higher token, for items 1...i-1}
wme: WME {gives item i}
@udoschneider
udoschneider / OutlookHtmlMail.vbs
Created July 16, 2013 11:25
A small VBS script to create an Outlook Mail from an HTML file.
' OutlookHtmlMail.vbs
' Open a new Outlook Mail with the content of the dropped HTML file copied verbatim.
' (c) 2007 Udo Schneider <Udo.Schneider@homeaddress.de>
Set fso = CreateObject("Scripting.FileSystemObject")
Set ts = fso.OpenTextFile(WScript.Arguments.Item(0))
strText = ts.ReadAll
Set outlook = createobject("Outlook.Application")
Set message = outlook.createitem(olMailItem)
With message
{
"selector": "source.js.cappuccino",
"working_dir": "$project_path",
// "path": "/bin:/usr/bin:/usr/local/narwhal/bin",
"cmd": ["$packages/User/sublime_jake"],
// WARNING:/Users/udos/Documents/Development/InspectKit/IKPropertiesViewController.j:13:1:Creating global variable inside function or method 'blahblah'
"file_regex": "[A-Z]+:([^:]+):([0-9]+):([0-9]+):(.*)",
"variants": [
#!/bin/bash
pushd `pwd` > /dev/null
APP_NAME=CappSourceTest
SOURCE_TEST_PATH=Frameworks/Source
SOURCE_TEST_FILE=TestFile.j
SOURCE_TEST_FILE_PATH=${SOURCE_TEST_PATH}/${SOURCE_TEST_FILE}
BUILT_TEST_PATH=Build/Release/${APP_NAME}/Frameworks/Source
BUILT_TEST_FILE_PATH=${BUILT_TEST_PATH}/${SOURCE_TEST_FILE}
#!/bin/bash
ulimit -n 1024
export PATH=/bin:/usr/bin:/usr/local/narwhal/bin
jake $* | sed -e 's/^\([A-Z]*\) line \([1-9][0-9]*\) in file:\([^:]*\): \(.*\)$/\1:\3:\2:1:\4/g'