I hereby claim:
- I am christian-fei on github.
- I am christianfei (https://keybase.io/christianfei) on keybase.
- I have a public key ASAcnt8LFQRvHsT7tYdUWmkEYI2Myi8DBjbqW2hoIW4I8go
To claim this, I am signing this object:
I hereby claim:
To claim this, I am signing this object:
| function query(text) { | |
| return new Promise((resolve, reject) => { | |
| process.stdin.resume() | |
| process.stdout.write(text) | |
| process.stdin.once('data', data => resolve(data.toString().trim())) | |
| process.stdin.once('error', reject) | |
| }) | |
| } |
| main | |
| .picture-shift.fl(data-url="http://lorempixel.com/output/city-q-c-200-200-7.jpg") | |
| .picture-shift.fl(data-url="https://s3.amazonaws.com/nautilus-vertical/cosmos-a-128.jpeg") |
| 'use strict'; | |
| const isExternalLink = (url) => { | |
| const isInternalLink = /^https:\/\/pomodoro\.cc/.test(url) && url !== 'https://pomodoro.cc/docs'; | |
| return !isInternalLink; | |
| } | |
| const openUrlInExternalWindow = (event, url) => { | |
| if (isExternalLink(url)) { | |
| return false; | |
| } |
| == Compilation error on file lib/date/date_format.ex == | |
| ** (ArgumentError) defdelegate/2 only accepts function parameters, got: %DateTime{} = date | |
| (elixir) lib/kernel/utils.ex:61: Kernel.Utils.add_arg/2 | |
| (elixir) lib/kernel/utils.ex:31: Kernel.Utils.defdelegate/2 | |
| lib/date/date_format.ex:22: anonymous fn/3 in :elixir_compiler_4.__MODULE__/1 | |
| (elixir) lib/enum.ex:1623: Enum."-reduce/3-lists^foldl/2-0-"/3 |
I hereby claim:
To claim this, I am signing this object:
| describe_time :: Int -> String | |
| describe_time sec = describe_time_rec (0, 0,0,0) sec | |
| describe_time_rec :: (Int, Int, Int, Int) -> Int -> String | |
| describe_time_rec acc@(days, hours,minutes,seconds) rem | |
| | rem >= 86400 = describe_time_rec (days + 1, hours,minutes,seconds) (rem - 86400) | |
| | rem >= 3600 = describe_time_rec (days, hours + 1,minutes,seconds) (rem - 3600) | |
| | rem >= 60 = describe_time_rec (days, hours,minutes + 1,seconds) (rem - 60) | |
| | rem < 60 = describe_time_rec (days, hours, minutes, rem) 0 | |
| | rem == 0 = (show days) ++ " DAYS " ++ (show hours) ++ " HOURS " ++ (show minutes) ++ " MINUTES " ++ (show seconds) ++ " SECONDS" |
| export default function route(name, config={}) { | |
| let {url} = config | |
| url = url || `/${name}` | |
| url = normalizeRouteUrl(url) | |
| const normalizedRouteName = normalizeRouteName(name) | |
| const nameCap = normalizedRouteName[0].toUpperCase() + normalizedRouteName.slice(1) | |
| const controller = `${nameCap}Ctrl as vm` | |
| const templateUrl = `controllers/${nameCap}Ctrl.html` | |
| return { | |
| name, |