This file contains hidden or 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
const AutoSave = ({ debounceMs }) => { | |
const formik = useFormikContext(); | |
const [lastSaved, setLastSaved] = React.useState(null); | |
const debouncedSubmit = React.useCallback( | |
debounce( | |
() => | |
formik.submitForm().then(() => setLastSaved(new Date().toISOString())), | |
debounceMs | |
), |
This file contains hidden or 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
# | |
# Cobalt2 Theme - https://github.com/wesbos/Cobalt2-iterm | |
# | |
# # README | |
# | |
# In order for this theme to render correctly, you will need a | |
# [Powerline-patched font](https://gist.github.com/1595572). | |
## | |
### Segment drawing | |
# A few utility functions to make it easy and re-usable to draw segmented prompts |
This file contains hidden or 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 React, { Component } from 'react'; | |
import './App.css'; | |
import PostPerson from './PostPerson'; | |
const API_URL = 'http://jsonplaceholder.typicode.com/users/'; | |
class App extends Component { | |
state = { | |
users: [] | |
}; |
This file contains hidden or 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
# Your init script | |
# | |
# Atom will evaluate this file each time a new window is opened. It is run | |
# after packages are loaded/activated and after the previous editor state | |
# has been restored. | |
# | |
# An example hack to log to the console when each text editor is saved. | |
# | |
# atom.workspace.observeTextEditors (editor) -> | |
# editor.onDidSave -> |
This file contains hidden or 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
var readline = require('readline-sync'); | |
var Calculation = function(num1, num2, op) { | |
this.x = parseInt(num1); | |
this.y = parseInt(num2); | |
this.op = op; | |
this.result = function() { | |
var x = this.x; | |
var y = this.y; |