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'; | |
| import debounce from 'lodash/debounce'; | |
| /** | |
| * Usage example: | |
| * export default rerenderOnResize()(Header); | |
| */ | |
| export default () => (WrappedComponent) => { | |
| class ReRenderOnResize extends React.PureComponent { | |
| componentDidMount() { |
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'; | |
| import PropTypes from 'prop-types'; | |
| export default class Image extends React.Component { | |
| constructor () { | |
| super(); | |
| this.state = { | |
| loaded: false | |
| }; |
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
| Take the following steps: | |
| 1- First install ffmpeg with brew: | |
| $ brew install ffmpeg | |
| 2- Then run the following command: | |
| $ ffmpeg -i "HLS STREAM URL" -c copy -bsf:a aac_adtstoasc output.mp4 | |
| (don't forgot to replace "HLS STREAM URL" with your stream URL and also double quote the url) |
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
| <?php | |
| add_action( 'wp_enqueue_scripts', function () { | |
| $fileURI = trailingslashit( get_template_directory_uri() ) . 'styles.css'; | |
| $filePath = trailingslashit( get_template_directory() ) . 'styles.css'; | |
| // Or wp_enqueue_style | |
| wp_enqueue_script( | |
| 'some-script', | |
| $fileURI, |