I've recently had to create a script to migrate a large amount of data post-deployment. This presented a couple issues; one being that the script needed to be performant, another being that since it took at least a few minutes to run on a couple hundred thousand rows, I needed to display the status of the script for devops so it didn't appear to be hungup or failed.
Laravel 5.5 just recently got released, and ships with the current stable version of Bootstrap, which is version 3. However, Bootstrap 4 recently hit beta, and should now be solid enough to start development with, especially for new Laravel projects that are just now getting started.
Bootstrap 4 can be easily enabled following these steps. First, remove the Laravel-supplied version of bootstrap-sass from npm:
npm uninstall --save-dev bootstrap-sass
PHP 7 introduced the null coalesce operator. Basically, it's syntactical sugar and shorthand when checking for the existence of a variable and then falling back to some value.
For example, this small script outputs
$foo is not yet defined.
echo $foo ?? 'bar';
It's the same thing as writing the following, just much more readable and succinct:
By default, Docker for Mac ships with the default filesystem being
aufs. This is a fairly antiquated filesystem and is quite slow if you deal with lots of files and filesystem reads and writes. You can see the results of a filesystem benchmark to compare.
The easiest task to do to get better filesystem performance in Docker is to switch to the
overlay2 filesystem. This achieves better performance by optimizing how layers are created and managed.
Learn new libraries, npm packages, and development methodologies, but don't apply them to your current projects until best practices are formed. This might take some time, hence the next rule...
I'll show you a stupid fast and simple way to create an express app with NodeJS, then deploy it with Docker. All you need is a simple text editor.
Install node with n:
npm i -g n n latest
Install Docker by pulling out the appropriate build from https://docs.docker.com/engine/installation/.
Let's now get our express app setup. Create a new directory and initialize your package.json file:
Mobx is a really simple state manager that can be used really nicely with React, when you don't need the complexity of a Redux implementation.
Using Mobx is pretty straight-forward, however their getting started documentation uses
stage-0 class properties, which are currently not supported with Meteor 1.3. The simple fix is to use ES6 formatting.
Meteor 1.3 introduces custom
package.json support, which allows you to use custom NPM packages within your Meteor app. This is great, because up to Meteor 1.2 you needed to use oddly formatted "NPM wrapper" packages.
This setup does include a slightly different build process though, as we need to install these custom NPM packages within our production Meteor app.