ffmeg as worker can be found at https://github.com/Kagami/ffmpeg.js/
Final build can be obtained via wget https://unpkg.com/ffmpeg.js@3.1.9001/ffmpeg-worker-mp4.js
ffmeg as worker can be found at https://github.com/Kagami/ffmpeg.js/
Final build can be obtained via wget https://unpkg.com/ffmpeg.js@3.1.9001/ffmpeg-worker-mp4.js
If you use server rendering, keep in mind that neither useLayoutEffect
nor useEffect
can run until the JavaScript is downloaded.
You might see a warning if you try to useLayoutEffect
on the server. Here's two common ways to fix it.
If this effect isn't important for first render (i.e. if the UI still looks valid before it runs), then useEffect
instead.
function MyComponent() {
TypeScript 2 hrs 30 mins █████████████████▉░░░ 85.6% | |
JSON 21 mins ██▌░░░░░░░░░░░░░░░░░░ 12.2% | |
PHP 3 mins ▍░░░░░░░░░░░░░░░░░░░░ 2.1% | |
JavaScript 0 secs ░░░░░░░░░░░░░░░░░░░░░ 0.1% | |
Other 0 secs ░░░░░░░░░░░░░░░░░░░░░ 0.0% |
#!/bin/bash | |
if [ -z "$1" ]; then | |
echo "waiting for the following arguments: username + max-page-number" | |
exit 1 | |
else | |
name=$1 | |
fi | |
if [ -z "$2" ]; then |
React recently introduced an experimental profiler API. This page gives instructions on how to use this API in a production release of your app.
Table of Contents
React DOM automatically supports profiling in development mode for v16.5+, but since profiling adds some small additional overhead it is opt-in for production mode. This gist explains how to opt-in.
In production, it is recommended to minify any JavaScript code that is included with your application. Minification can help your website load several times faster, especially as the size of your JavaScript source code grows.
Here's one way to set it up:
npm init -y
in your project folder (don't skip this step!)npm install terser
Now, to minify a file called like_button.js
, run in the terminal:
# From .NET Core 3.0 you can use the command: `dotnet new gitignore` to generate a customizable .gitignore file | |
*.swp | |
*.*~ | |
project.lock.json | |
.DS_Store | |
*.pyc | |
# Visual Studio Code | |
.vscode |
let cache = new Map(); | |
let pending = new Map(); | |
function fetchTextSync(url) { | |
if (cache.has(url)) { | |
return cache.get(url); | |
} | |
if (pending.has(url)) { | |
throw pending.get(url); | |
} |
This is a story about how I tried to use Go for scripting. In this story, I’ll discuss the need for a Go script, how we would expect it to behave and the possible implementations; During the discussion I’ll deep dive to scripts, shells, and shebangs. Finally, we’ll discuss solutions that will make Go scripts work.
While python and bash are popular scripting languages, C, C++ and Java are not used for scripts at all, and some languages are somewhere in between.