Skip to content

Instantly share code, notes, and snippets.

View bohyunjung's full-sized avatar
🥑

Bohyun Jung bohyunjung

🥑
View GitHub Profile
@hanayashiki
hanayashiki / patch-arrayBuffer.js
Created December 16, 2019 04:08
Safari 13.0.4: Blob.arrayBuffer is not a function
(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);
@peteygao
peteygao / install_docker.sh
Last active February 17, 2024 05:03
Auto-Install Docker and Docker Compose on AWS Lightsail running Ubuntu 20.04
# 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