This file contains hidden or 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
| (function () { | |
| File.prototype.arrayBuffer = File.prototype.arrayBuffer || myArrayBuffer; | |
| Blob.prototype.arrayBuffer = Blob.prototype.arrayBuffer || myArrayBuffer; | |
| function myArrayBuffer() { | |
| // this: File or Blob | |
| return new Promise((resolve) => { | |
| let fr = new FileReader(); | |
| fr.onload = () => { | |
| resolve(fr.result); |
This file contains hidden or 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
| # Create a 1GiB Swap File | |
| # Lightsail ubuntu image doesn't boot with swap. | |
| # If you run out of RAM, the system hangs OOM. | |
| sudo fallocate -l 1G /swapfile | |
| sudo chmod 600 /swapfile | |
| sudo mkswap /swapfile | |
| sudo swapon /swapfile | |
| sudo cp /etc/fstab /etc/fstab.bak | |
| echo '/swapfile none swap sw 0 0' | sudo tee -a /etc/fstab |
OlderNewer