Visit my blog or connect with me on Twitter
git init
or
| import React from 'react' | |
| class MyComponent extends React.Component { | |
| componentDidMount() { | |
| this.props.router.setRouteLeaveHook(this.props.route, this.routerWillLeave) | |
| } | |
| routerWillLeave(nextLocation) { | |
| // return false to prevent a transition w/o prompting the user |
| module.exports = 'test-file-stub' |
| machine: | |
| pre: | |
| - mkdir ~/.yarn-cache | |
| node: | |
| version: stable | |
| dependencies: | |
| pre: | |
| - curl -o- -L https://yarnpkg.com/install.sh | bash | |
| cache_directories: | |
| - ~/.yarn-cache |
Visit my blog or connect with me on Twitter
git init
or
| defmodule MyApp.Scheduler do | |
| @moduledoc """ | |
| Schedules a Mix task to be run at a given interval in milliseconds. | |
| ## Options | |
| - `:task`: The name of the Mix task to run. | |
| - `:args`: A list of arguments to pass to the Mix task's `run/1` function. | |
| - `:interval`: The time interval in millisconds to rerun the task. |
I hereby claim:
To claim this, I am signing this object:
| <?php | |
| $dob = '1965-02-01'; | |
| $age_years = floor((time() - strtotime($dob)) / 31556926); | |
| echo $age_years | |
| ?> |