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
{"lastUpload":"2020-08-16T13:25:04.868Z","extensionVersion":"v3.4.3"} |
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
version: '3.1' | |
services: | |
wordpress: | |
depends_on: | |
- db | |
image: wordpress:latest | |
container_name: wordpress_avada | |
restart: always | |
volumes: |
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
using System; | |
using System.Collections.Generic; | |
using System.Text; | |
using static System.Console; | |
namespace DesignPatterns | |
{ | |
public enum OutputFormat | |
{ | |
Markdown, |
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
static propTypes = { | |
data: PropTypes.array.isRequired, | |
title: PropTypes.string.isRequired, | |
len: PropTypes.number, | |
keyName: PropTypes.string.isRequired, | |
showLess: PropTypes.bool.isRequired, | |
containerStlye: PropTypes.object, | |
children: PropTypes.node, | |
} | |
static defaultProps = { |
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 { is } from "immutable"; | |
function CompareFn(objA, objB) { | |
if (objA === objB || is(objA, objB)) { | |
return true; | |
} | |
if ( | |
typeof objA !== "object" || | |
objA === null || | |
typeof objB !== "object" || |
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 indexByKey = key => pipe( | |
indexBy(prop(key)), | |
map(omit([key])) // eslint-disable-line | |
); |
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 indexByKey = key => pipe( | |
indexBy(prop(key)), | |
map(omit([key])) // eslint-disable-line | |
); |
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
// ... | |
lifecycle({ | |
componentWillMount() { | |
const { subscribeToMessages } = this.props; | |
return subscribeToMessages(); | |
}, | |
}) | |
)(ChatMessages); |
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
// Async/Await requirements: Latest Chrome/FF browser or Babel: https://babeljs.io/docs/plugins/transform-async-to-generator/ | |
// Fetch requirements: Latest Chrome/FF browser or Github fetch polyfill: https://github.com/github/fetch | |
// async function | |
async function fetchAsync () { | |
// await response of fetch call | |
let response = await fetch('https://api.github.com'); | |
// only proceed once promise is resolved | |
let data = await response.json(); | |
// only proceed once second promise is resolved |
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 arr = [0,1,2,3,4]; | |
var g = arr.join(', ').replace(/,(?!.*,)/gmi, ' and'); | |
// result 0, 1, 2, 3 and 4 |
NewerOlder