# use for production
node bugsnag.upload.js
# use for development
node bugsnag.upload.js --dev
The package linked to from here is now pure ESM. It cannot be require()
'd from CommonJS.
This means you have the following choices:
- Use ESM yourself. (preferred)
Useimport foo from 'foo'
instead ofconst foo = require('foo')
to import the package. You also need to put"type": "module"
in your package.json and more. Follow the below guide. - If the package is used in an async context, you could use
await import(…)
from CommonJS instead ofrequire(…)
. - Stay on the existing version of the package until you can move to ESM.
RFC 3092 - Etymology of "Foo": http://www.faqs.org/rfcs/rfc3092.html
foo
bar
baz
qux
quux
corge
grault
// nullish coalescing
// if foo is null or undefined use bar, otherwise use foo
// not all browsers supported, it is a new feature
const value = foo ?? bar;
// if foo is falsy ('', "", ``, , 0, -0, 0n, null, undefined, NaN, false) use bar, otherwise use foo
const value = foo || bar;
// styling console.log
https://kentcdodds.com/blog/use-state-lazy-initialization-and-function-updates
// before
const [state, setState] = useState(getInitialHundredItems())
// after
const [state, setState] = useState(getInitialHundredItems);
This file contains 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 {Text, View} from 'react-native'; | |
import CounterApp from '../Components/CounterApp'; | |
import ErrorBoundries from '../Components/ErrorBoundries'; | |
export default class AppContainer extends Component { | |
render() { | |
return ( | |
<> | |
<Text style={{alignSelf: 'center', marginTop: 20}}>Counter App</Text> |
# tested on linux and macOS
echo $(wget whatthecommit.com -q -O -) | tr -d '\n' | sed -e 's/.*<p>\(.*\)<\/p>.*/\1/' | awk '{split($0,a,"</p>"); print a[1]}'
This file contains 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: '2' | |
services: | |
mariadb: | |
image: docker.io/bitnami/mariadb:10.3 | |
container_name: opencart-db | |
volumes: | |
- 'mariadb_data:/bitnami/mariadb' | |
env_file: | |
- production.env | |
phpmyadmin: |