Helpful Migration Guides:
/* | |
Copy this into the console of any web page that is interactive and doesn't | |
do hard reloads. You will hear your DOM changes as different pitches of | |
audio. | |
I have found this interesting for debugging, but also fun to hear web pages | |
render like UIs do in movies. | |
*/ | |
const audioCtx = new (window.AudioContext || window.webkitAudioContext)() |
Example of deployment process which I use in my Nuxt.js projects. I usually have 3 components running per project: admin-panel SPA, nuxt.js renderer and JSON API.
This manual is relevant for VPS such as DigitalOcean.com or Vultr.com. It's easier to use things like Now for deployment but for most cases VPS gives more flexebillity needed for projects bigger than a landing page.
UPD: This manual now compatible with nuxt@2.3. For older versions deployment, see revision history.
Let's assume that you have entered fresh installation of Ubuntu instance via SSH. Let's rock:
This is a CFP for the ⚡️Lightning⚡️ talk at awesome ReactiveConf 2017. If you'd like to see this talk, please 🌟 star🌟 this summary and retweet my tweet 🙂 #ReactiveConf
Functional reactive programming (FRP) is very popular nowadays. The JavaScript community provides us with excellent tools like RxJS, Bacon, and Kefir. But, as we know, they have nothing to do with React. So how we can use the power of FRP in our React application? Using the correct state management, we can make friends with FRP and React and make our application truly reactive. In my lightning talk, I will talk about Focal
var fPrev, fCurr; | |
function fib (n) { | |
var result; | |
if (n < 0) throw Error('invalid given number'); | |
if (n <= 1) { | |
return n; | |
} |
'use strict'; | |
(function() { | |
const shmem = new SharedArrayBuffer(1024 * 100000); // 25600000 | |
const sync = new Int32Array(shmem); | |
const cores = [...new Array(navigator.hardwareConcurrency)]; | |
const sync_shift = cores.length; | |
const core_shift = (sync.length - sync_shift) / sync_shift; | |
let doneCount = 0; |
@kangax created a new interesting quiz, this time devoted to ES6 (aka ES2015). I found this quiz very interesting and quite hard (made myself 3 mistakes on first pass).
Here we go with the explanations:
(function(x, f = () => x) {
NOTE: the content is out-of-date. All development is moved to the https://github.com/yurydelendik/wasmception
# locations, e.g.
export WORKDIR=~/llvmwasm; mkdir -p $WORKDIR
export INSTALLDIR=$WORKDIR
Hacky way to detect if app was launched in standalone mode in Chromium (with manifest.json) without problems with AppCache
(and possibly ServiceWorker
).
As suggested on one of the Google Developers sites, one may use search params in start_url
of the manifest.json
to notify page about that it was launched in standalone mode: start_url: '/?standalone'
.
This works well unless your page uses AppCache
(or ServiceWorker
). In case of AppCache
, every url with different search params is treated as separate entry in cache. So if you have listed /
path in AppCache
and naively used start_url: '/?standalone'
in your manifest.json
, then your Web App won't work offline from the Home Screen.
_With ServiceWorker
, however, there is few ways to fix this directly in its code, like ignoreSearch
option for match()
method (currently not supported in Chromium) or just traversing cache entries manually and comparing new URL(event.request.url).pathname
with stored request `new URL(...).path