Description |
#!/bin/bash | |
# This script will backup your Coolify instance and move everything to a new server. Docker volumes, Coolify database, and ssh keys | |
# 1. Script must run on the source server | |
# 2. Have all the containers running that you want to migrate | |
# Configuration - Modify as needed | |
sshKeyPath="$HOME/.ssh/your_private_key" # Key to destination server | |
destinationHost="server.example.com" |
/** | |
* We call "variance" the direction of assignability between two types | |
* (in other words, which type is a subtype of the other). | |
* | |
* The same type can have a different variance in function of his position | |
* in a larger type, and this is what makes assignability in TypeScript | |
* not always straightforwards. | |
* | |
* There are 4 kinds of variance: | |
* - Covariant: if the type `a` is assignable to `a | b`. |
// Disable anchor links | |
window.addEventListener('click', event => event.preventDefault(), false) | |
// Disable click eventlisteners | |
window.addEventListener("click", event => event.stopPropagation(), true) | |
// Enable design mode | |
document.designMode = "on" |
Thought I'd post my React Conf notes here for anyone who is interested!
-
New! Prerelease channels: In order to support other library and framework devs, and to enlist early feedback, the React team is debuting 3 new prerelease channels: Latest (stable), Next (on-deck for stable release, but doesn't adhere to semver and may intro breaking changes), and Experimental (caution! likely to contain large and breaking changes). Latest is the only channel recommended for user-facing applications.
-
New! Experimental release of Concurrent Mode: Concurrent Mode supports interruptible rendering, including suspending render in components whose data has not yet returned (Suspense API). I got a glimpse of SuspenseList in action in the context of rendering a list of photos from a remote source and it was pretty neat - I think there's a lot to be excited for here, especially for mobi
const db = [ | |
{ | |
name: 'John Doe', | |
age: 28, | |
lastModified: Date.now(), | |
lastAccessed: Date.now() | |
}, | |
{ | |
name: 'Jane Smith', | |
age: 30, |
const timing = store => next => action => { | |
performance.mark(`${action.type}_start`); | |
let result = next(action); | |
performance.mark(`${action.type}_end`); | |
performance.measure( | |
`${action.type}`, | |
`${action.type}_start`, | |
`${action.type}_end` | |
); | |
return result; |
window.__testCleanup = () => { | |
const unregisterSW = () => { | |
return navigator.serviceWorker.getRegistrations() | |
.then((registrations) => { | |
const unregisterPromise = registrations.map((registration) => { | |
return registration.unregister(); | |
}); | |
return Promise.all(unregisterPromise); | |
}); | |
}; |
const storyFiles = require.context('../src', true, /__stories__\/.+\.js$/) | |
const sources = require.context('!!raw-loader!../src', true, | |
/__stories__\/.+\.js$/) | |
const readme = require.context('!!raw-loader!../src', true, /README\.md$/) | |
const READMES = readme.keys().reduce((memo, key) => { | |
const [,baseName] = key.match(/^\.\/([^\/]+)\//) | |
memo[baseName] = readme(key) | |
return memo | |
}, {}) |