Sass é uma linguagem de script que é interpretada ou compilada em Cascading Style Sheets (CSS). e neste GIST estarei demonstrando como usar sass com node js.
Iniciar um projecto do zero com a framework express
mkdir node_sass| ffmpeg -i jellyfish-120-mbps-4k-uhd-h264.mkv -c:v libx264 -profile:v main -vf scale=1920:1080 -b:v 50000k -an -tune fastdecode -coder 0 -flags -loop -g 30 -bf 0 -t 10 jellyfish-hd-50mbps_main_nosound_fast_short.mp4 |
| #!/bin/bash | |
| #qemu-img create -f qcow2 disk.qcow2 20G | |
| #qemu-img create -f qcow2 varstore.img 128M | |
| debian_iso=debian-9.6.0-arm64-xfce-CD-1.iso | |
| qemu-system-aarch64 -smp cpus=6 -M virt -cpu max -m 2G -nographic \ | |
| -drive file=QEMU_EFI.img,if=pflash,format=raw \ | |
| -drive file=varstore.img,if=pflash \ | |
| -drive file=disk.qcow2,if=virtio \ | |
| -drive file=$debian_iso,if=virtio,format=raw |
| // This works on all devices/browsers, and uses IndexedDBShim as a final fallback | |
| var indexedDB = window.indexedDB || window.mozIndexedDB || window.webkitIndexedDB || window.msIndexedDB || window.shimIndexedDB; | |
| // Open (or create) the database | |
| var open = indexedDB.open("MyDatabase", 1); | |
| // Create the schema | |
| open.onupgradeneeded = function() { | |
| var db = open.result; | |
| var store = db.createObjectStore("MyObjectStore", {keyPath: "id"}); |
| // Core assets | |
| let coreAssets = []; | |
| // On install, cache core assets | |
| self.addEventListener('install', function (event) { | |
| // Cache core assets | |
| event.waitUntil(caches.open('app').then(function (cache) { | |
| for (let asset of coreAssets) { | |
| cache.add(new Request(asset)); |
| // https://developer.mozilla.org/en-US/docs/Web/HTTP/CSP | |
| // https://scotthelme.co.uk/content-security-policy-an-introduction/ | |
| // scanner: https://securityheaders.com/ | |
| const rootDomain = `your-domain.com`; // or your server IP for dev | |
| const directives = { | |
| 'img-src': [ | |
| "*", | |
| "'self'", |
Disclaimer: this step-by-step GIST has been created with no guarantees, I may have missed some steps because of distraction or chiptune improvised on-chair-dancing, so be patient and let me know if I must add or fix something.
This is the way for living long and prospering!
Download and install Raspberry Imager: https://www.raspberrypi.org/software/
Today I tried to setup a small Kubernetes cluster on top of 3 Raspberry Pi 4 (4GB Memory). Here is the steps to install the cluster.
I have 3 Raspberry Pi 4 stacked with PoE headers and connected to a PoE switch at home. The are connected to Internet through a home router. All Pis are equipped with a 64GB Samsung SDXC card flushed with Ubuntu 20.04 image.
| kubectl delete "$(kubectl api-resources --namespaced=true --verbs=delete -o name | tr "\n" "," | sed -e 's/,$//')" --all |