- Needs a 3rd party app (there's no platform browser, that is)
- Renders fully on the watch
- Even if connection to phone is lost (e.g. the watch is on its own), browser app still works
- Though annoyingly the browser app disallows launching the browser again if closed
- Uses the phone for network communications (over BTLE)
- HTML5 AppCache works
- Confirmed with all network access (except Bluetooth) shut off from the phone
- Even if connection to phone is lost (e.g. the watch is on its own), browser app still works
- Seems to be cached on the watch, as AppCache'd resources are available even without connection to phone
function PromiseQueue() { | |
var tail = Promise.resolve(); | |
return { | |
enqueueOperation(op) { | |
return tail = tail.then(op, op); | |
} | |
}; | |
} |
FROM ubuntu:latest | |
# Install Haskell Platform | |
RUN apt-get update && \ | |
apt-get install -y make haskell-platform | |
# Install Haskell dependencies | |
RUN cabal update && cabal install quickcheck | |
# Place us in the host-mounted working directory |
Server-Sent events is a specification for implementing server-side-push for web frontend applications, through plain-old HTTP.
It is best contrasted with WebSockets, which offer a full-duplex messaging channel over a custom protocol, operating within a single TCP connection (with an HTTP-compatible handshake).
- Clone this gist
node server.js
# -*- mode: ruby -*- | |
# vi: set ft=ruby : | |
# Vagrantfile API/syntax version. Don't touch unless you know what you're doing! | |
VAGRANTFILE_API_VERSION = "2" | |
Vagrant.configure(VAGRANTFILE_API_VERSION) do |config| | |
# This is kinda ghetto, but the simplest way to print a message to the user | |
puts "\nNOTE: After the box boots, your app will be available at e.g. http://192.168.50.1:8080" |
/** | |
* Converts the given string representation of WGS84 coordinates into a standard lat/lng object. | |
* | |
* @example 60 deg 08.2151' N, 24 deg 25.6136' E | |
* @example 43°38'19.39"N,116°14'28.86"W | |
* @example +43.6387194°, -116.2413500° | |
* | |
* For convenience (and to avoid "Cannot read property 'lat' of undefined" errors), always returns an | |
* object with the aforementioned keys. For invalid input, the VALUES of the keys will be undefined. | |
* |
/** | |
* Utility function for generating HTML/XML DOM trees in the browser. | |
* | |
* Returns a node with the given name. The rest are var-args, so that: | |
* | |
* - an object sets attributes as key/value-pairs | |
* - a string/number/boolean sets the text content of the node | |
* - a node is treated as a child node | |
* - an array is treated as a list of child nodes | |
* |
This is a relatively hacky solution, but simplest one that works, so writing it down for my own reference. If the Grunt plugin was aware of nvm (or configurable to use a custom environment before launching the "grunt" command) this would be a LOT easier, but if such config options exist I'm unaware of them. Also note that this will NOT switch your node
version dynamically between projects as nvm
would.
To link your current node as the global one:
$ sudo ln -s $(which node) /usr/bin/node
$ sudo ln -s $(which npm) /usr/bin/npm
Conversion script between the TTML & SRT subtitle formats. This is particularly useful with Adobe Premiere, as it doesn't understand the SRT format (which is joyously simple and interoperable). TTML-XML is probably the most straightforward subtitle format it does understand, hence this tool.
Note that due to the simplicity of the SRT format, this conversion is extremely lossy for all the bells and whistles supported by TTML. Not like you'd want fixed-pixel font sizes etc in your subtitles anyway, but you've been warned.
A small bash-script for geotagging videos. Generates an SRT subtitle file with a running timestamp and GPS coordinates, indicating when and where the footage was shot. As the metadata's in a separate track (not burned onto the footage for example), you can hide it when it's not needed.
exiftool >= 9.52
is needed for reading video file metadata, and performing GPS interpolation.