# create
dd if=/dev/zero of=/tmp/sparse_file bs=1 count=0 seek=512M
sudo losetup /dev/loop10 /tmp/sparse_file
sudo zpool create test /dev/loop10
sudo zpool status test
# write
sudo zfs create test/fs
sudo dd if=/dev/urandom of=/test/fs/bigfile bs=1M count=400 status=progress
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
| <!DOCTYPE html> | |
| <html> | |
| <head> | |
| <meta charset="utf-8"> | |
| <title>maplibre-gl: getCameraAltitude() on the globe, before and after the fix for #6584</title> | |
| <meta name="viewport" content="width=device-width, initial-scale=1"> | |
| <link href="https://cdn.jsdelivr.net/npm/maplibre-gl@6.7.0/dist/maplibre-gl.css" rel="stylesheet"> | |
| <style> | |
| html, body { margin: 0; height: 100%; background: #141418; color: #eee; font: 15px/1.45 system-ui, sans-serif; } | |
| #panel { padding: 12px 16px; background: #1c1c22; border-bottom: 1px solid #2c2c34; } |
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
| <!DOCTYPE html> | |
| <html> | |
| <head> | |
| <meta charset="utf-8"> | |
| <title>maplibre-gl: stale terrain drape textures after a zoom animation</title> | |
| <meta name="viewport" content="width=device-width, initial-scale=1"> | |
| <link href="https://unpkg.com/maplibre-gl@6.6.0/dist/maplibre-gl.css" rel="stylesheet"> | |
| <style> | |
| html, body { margin: 0; height: 100%; } | |
| #map { position: absolute; inset: 0; } |
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
| #!/usr/bin/env bash | |
| ## move away CR2 and AAE files | |
| cd /data/ | |
| SRC="./Fotos-Mediathek.photoslibrary/Masters/" | |
| DEST="./additional-files/Masters/" | |
| sudo mkdir -p "$DEST" | |
| sudo rsync -av \ | |
| --remove-source-files \ |
sudo apt install --no-install-recommends msmtp msmtp-mta bsd-mailx
sudo touch /var/log/msmtp
sudo chown root:users /var/log/msmtp
sudo chmod 664 /var/log/msmtp
echo 'set mta=/usr/bin/msmtp' | sudo tee -a /etc/mail.rc
sudo vi /etc/msmtprc
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
| # fix for: | |
| # perl: warning: Setting locale failed. | |
| # perl: warning: Please check that your locale settings: | |
| # LANGUAGE = (unset), | |
| # LC_ALL = (unset), | |
| # LC_CTYPE = "UTF-8", | |
| # LANG = "C.UTF-8" | |
| # are supported and installed on your system. | |
| # perl: warning: Falling back to a fallback locale ("C.UTF-8"). |
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
| /** | |
| * Asserts that the provided Uint8Array is backed by an ArrayBuffer. | |
| * | |
| * Throws an error if the buffer is a SharedArrayBuffer or any other type. | |
| * This is useful for ensuring (type) compatibility with APIs that require Uint8Array<ArrayBuffer>. | |
| * Usage: | |
| * // bytes: Uint8Array<ArrayBufferLike> | |
| * assertArrayBuffer(bytes); | |
| * // bytes: Uint8Array<ArrayBuffer> | |
| * |
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
| # /etc/systemd/system/led.service | |
| [Unit] | |
| Description=Turn off boot button LED | |
| After=multi-user.target | |
| [Service] | |
| Type=oneshot | |
| ExecStart=/bin/bash -c "echo 0 > /sys/class/leds/chromeos:white:power/brightness" | |
| RemainAfterExit=true | |
| User=root |
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
| package main | |
| import ( | |
| "io" | |
| "log" | |
| "net/http" | |
| "net/http/httputil" | |
| "net/url" | |
| ) |
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
| var topojsonClient = require("topojson-client") | |
| ch = await fetch("https://swiss-maps.vercel.app/api/v0?format=topojson&projection=wgs84&year=2022&shapes=lakes").then(res => res.json()) | |
| geo = topojsonClient.feature(ch, ch.objects.lakes) | |
| console.log(JSON.stringify(geo, null, 2)) |
NewerOlder