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| // 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)); |
| // 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"}); |
| #!/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 |
| 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 -x | |
| # make_arm64_rpi_kernel_debs.sh | |
| # Builds arm64 debian packages from the CURRENT rpi firmware repository kernel which is installed by: | |
| # sudo rpi-update | |
| # This runs on an arm64 host with arm64 compilation tools... | |
| # or with some sort of cross-compilation setup. | |
| # Debs are put in $workdir/build | |
| # | |
| # This will NOT work in Raspbian unless you have an arm64 compilation | |
| # environment setup. Appears to work on |
| #!/bin/bash | |
| # Note that there's no libdrm because this lib cause errors | |
| sudo apt update -y && sudo apt upgrade -y | |
| sudo apt-get -y install \ | |
| autoconf \ | |
| automake \ | |
| libgstreamer1.0-dev \ |
| # Kernel | |
| kernel=zImage | |
| #initramfs ramdisk.img 0x01f00000 | |
| # Audio | |
| dtparam=audio=on | |
| # Camera | |
| #disable_camera_led=1 | |
| #gpu_mem=128 |
| #!/bin/bash | |
| # Compile and install/update (or install via Apt) FFmpeg Codecs | |
| # Compile and install/update FFmpeg suite | |
| # Compile with hardware acceleration | |
| # Modified from https://retroresolution.com/compiling-ffmpeg-from-source-code-all-in-one-script/ | |
| echo "Begining Installation of FFmpeg Suite" | |
| #Update APT Repository | |
| echo "Updating the APT repository information" |