node --help --v8-options | grep -B 1 -A 1 max-old-space
type: bool default: false
--max-old-space-size (max size of the old space (in Mbytes))
type: size_t default: 0
<?php | |
/** | |
* composer require sentry/sentry-sdk | |
*/ | |
use Sentry; | |
Env::init(); | |
// Bedrock application config... | |
if (env('SENTRY_DSN')) { | |
Sentry\init([ | |
'dsn' => env('SENTRY_DSN'), |
With the addition of ES modules, there's now no fewer than 24 ways to load your JS code: (inline|not inline) x (defer|no defer) x (async|no async) x (type=text/javascript | type=module | nomodule) -- and each of them is subtly different.
This document is a comparison of various ways the <script>
tags in HTML are processed depending on the attributes set.
If you ever wondered when to use inline <script async type="module">
and when <script nomodule defer src="...">
, you're in the good place!
Note that this article is about <script>
s inserted in the HTML; the behavior of <script>
s inserted at runtime is slightly different - see Deep dive into the murky waters of script loading by Jake Archibald (2013)
on linux 4.19, I get
error creating new backup file '/var/lib/dpkg/status-old': Invalid cross-device link
when trying to install stuff on a ubuntu docker container. this seems to be an issue with metacopy https://www.spinics.net/lists/linux-unionfs/msg06109.html
issue can be worked around by running
import React from 'react' | |
const PostListing = ({post}) => ( | |
<article> | |
<h3>{post.frontmatter.title}</h3> | |
<span>{post.frontmatter.date}</span> | |
<p>{post.excerpt}</p> | |
</article> | |
) |
<?php namespace App\NavWalker; | |
use Roots\Soil\Nav\NavWalker as SoilNavWalker; | |
/** | |
* @author QWp6t | |
* @license OSL-3.0 | |
*/ | |
class Bootstrap extends SoilNavWalker | |
{ |
worker_processes 1; | |
error_log logs/error.log; | |
events { | |
worker_connections 1024; | |
} | |
http { | |
init_worker_by_lua_block { | |
redis = require("resty.redis") | |
} | |
server { |
- For your local dev, create a
Dockerfile
that is based on your production image and simply installxdebug
into it. Exemple:
FROM php:5
RUN yes | pecl install xdebug \
&& echo "zend_extension=$(find /usr/local/lib/php/extensions/ -name xdebug.so)" > /usr/local/etc/php/conf.d/xdebug.ini \
/* Sometimes it's pretty easy to run ito troubles with React ES6 components. | |
Consider the following code: */ | |
class EventStub extends Component { | |
componentDidMount() { | |
window.addEventListener('resize', this.onResize.bind(this)); //notice .bind | |
} | |
componentWillUnmount() { | |
window.removeEventListener('resize', this.onResize.bind(this)); |