git rm --cached path_to_submodule
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 from 'react'; | |
| let lastScrollY = 0; | |
| let ticking = false; | |
| class App extends React.Component { | |
| componentDidMount() { | |
| window.addEventListener('scroll', this.handleScroll); | |
| } |
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 express = require('express') | |
| const chalk = require('chalk') | |
| const app = express() | |
| app.all('*', (req, res) => { | |
| res.send(`<h1> welcome to my homepage </h1>`) | |
| }) | |
| app.listen(3000) | |
| console.log(chalk.cyan('sever started')); |
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
| setTimeout(() => {debugger}, 3000) |
As an open source object-relational database management system, PostgreSQL available for MacOS, Linux, and Windows.
The goal will be to run the following command successfully from the command line (regardless of the OS):
psql -U postgres
This should open the psql interactive shell and print a prompt that looks like:
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
| /* Semantic UI has these classes, however they're only applicable to*/ | |
| /* grids, containers, rows and columns.*/ | |
| /* plus, there isn't any `mobile hidden`, `X hidden` class.*/ | |
| /* this snippet is using the same class names and same approach*/ | |
| /* plus a bit more but to all elements.*/ | |
| /* see https://github.com/Semantic-Org/Semantic-UI/issues/1114*/ | |
| /* Mobile */ | |
| @media only screen and (max-width: 767px) { | |
| [class*="mobile hidden"], |
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
| The bindActionCreators utility was specifically created for cases like binding methods for use in React components. In fact, straight from the bindActionCreators API reference: | |
| The only use case for bindActionCreators is when you want to pass some action creators down to a component that isn't aware of Redux, and you don't want to pass dispatch or the Redux store to it. | |
| Personally, though, I advise using the object shorthand argument for connect, instead of writing your own mapDispatch function. The object shorthand will automatically call bindActionCreators for you, and it's one less thing to worry about: | |
| export default connect(mapState, {addTodo, toggleTodo})(TodoList); | |
| So no, bindActionCreators isn't a "dangerous" pattern, and I highly recommend binding action creators so that your components aren't "aware" of Redux. When a component calls this.props.someFunction(), it shouldn't know or care whether that method is a callback from a parent component, a bound-up Redux action creator, or a mock function in |
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
| rm -rf ~/Library/Preferences/jetbrains.* | |
| rm -rf ~/Library/Caches/PhpStorm* | |
| rm -rf ~/Library/Application\ Support/PhpStorm* | |
| rm -rf ~/Library/Logs/PhpStorm* |