🔥 Blazing fast builds
😇 CommonJS bundle
🌲 .mjs
bundle
✨ .d.ts
bundle + type-checking
🧐 Source maps
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Make sure to stop Appwrite before this backup, | |
# and make sure you have enough space on the machine. | |
# After backing up, make sure there is a file in 'backups/backup-___.tar.gz'. | |
# Also please check size of this file, it should be at least 5kb, even for small instances. | |
docker run --rm \ | |
-v appwrite_appwrite-mariadb:/backup/appwrite-mariadb \ | |
-v appwrite_appwrite-redis:/backup/appwrite-redis \ | |
-v appwrite_appwrite-cache:/backup/appwrite-cache \ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* Change from https://gist.github.com/unki2aut/4ac81c33be2e8f121e80a26eba1735d7 | |
* - Use top level await (Node.js v14.8.0+) | |
* - To use top level await, you need to write a script as ES Modules | |
* - Set chokidar options to avoid duplicate building | |
* - Define NODE_ENV (For React) | |
* - Add API proxy setting by using proxy-middleware | |
*/ | |
import chokidar from "chokidar"; | |
import esbuild from "esbuild"; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Electron CD | |
on: [push] | |
jobs: | |
build: | |
runs-on: ${{ matrix.os }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* largestRemainderRound will round each number in an array to the nearest | |
* integer but make sure that the the sum of all the numbers still equals | |
* desiredTotal. Uses largest remainder method. Returns numbers in order they | |
* came. | |
* | |
* @param {number[]} numbers - numbers to round | |
* @param {number} desiredTotal - total that sum of the return list must equal | |
* @return {number[]} the list of rounded numbers | |
* @example |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var wordwrap = function(long_string, max_char){ | |
var sum_length_of_words = function(word_array){ | |
var out = 0; | |
if (word_array.length!=0){ | |
for (var i=0; i<word_array.length; i++){ | |
var word = word_array[i]; | |
out = out + word.length; | |
} | |
}; |