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
get = -> { | |
secret_callback = -> { | |
secret_squirrly_function = -> {secret_callback(err, res, body)} | |
# Do something asynchronous | |
setTimeout secret_squirrly_function, 5000 | |
# and return a function | |
(callback) -> {secret_callback = callback} | |
} | |
} |
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
update : Msg -> Model -> Model | |
update msg model = | |
case msg of | |
CanvasResized canvasSize -> | |
model | |
|> :canvas | |
|> updateCanvasSize canvasSize | |
|> updateVisibleTiles |
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
/* | |
[The "BSD licence"] | |
Copyright (c) 2013 Terence Parr | |
All rights reserved. | |
Redistribution and use in source and binary forms, with or without | |
modification, are permitted provided that the following conditions | |
are met: | |
1. Redistributions of source code must retain the above copyright | |
notice, this list of conditions and the following disclaimer. |
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
#!/bin/bash | |
# | |
# DESCRIPTION: | |
# | |
# Set the bash prompt according to: | |
# * the branch/status of the current git repository | |
# * the branch of the current subversion repository | |
# * the return value of the previous command | |
# | |
# USAGE: |
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 java.time.ZoneId; | |
import java.time.ZonedDateTime; | |
import java.time.temporal.ChronoUnit; | |
/* | |
output: | |
Earliest midpoint in LA: 1984-01-26T17:13-08:00[America/Los_Angeles] | |
Latest midpoint in LA: 1984-01-27T05:13-08:00[America/Los_Angeles] |
OlderNewer