- Model: Lenovo Chromebook IdeaPad Flex 5i 14''
- Hardware ID: TAEKO-QSHQ
- CPU: Intel Pentium Gold 8505
- Alder Lake
- 1 performance core (2 threads) + 4 efficient cores = 6 threads
- Virtualization Technology, Quick Sync, AVX2
- Storage: 64 GB eMMC
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
#!/bin/bash | |
set -eu | |
OLD_PASSWORD="old_endoded_pwd" | |
NEW_PASSWORD="new_endoded_pwd" | |
filter='(.resource.sources | (.sqlsource, .sqlsources[])? | select(.password == $old).password) |= $new' | |
for file in */resource.xml; do |
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
# Pick a random private port, start caddy and start cloudflared: | |
# p=$((RANDOM%16383+49152)); caddy file-server -bl :$p & cloudflared tunnel --url [::1]:$p | |
# Use nix-shell: | |
# nix-shell -p cloudflared -p caddy --run 'p=$((RANDOM%16383+49152)); caddy file-server -bl :$p & cloudflared tunnel --url [::1]:$p' | |
# Or use podman (or Docker) with nixery.dev: | |
# podman run --rm --network host -ti -v $PWD:/data:ro --workdir /data nixery.dev/bash/caddy/cloudflared /bin/bash -c 'p=$((RANDOM%16383+49152)); caddy file-server -bl :$p & cloudflared tunnel --url [::1]:$p' | |
# Create an alias: | |
alias staticserve="nix-shell -p cloudflared -p caddy --run 'p=$((RANDOM%16383+49152)); caddy file-server -bl :\$p & cloudflared tunnel --url [::1]:\$p'" |
How to solve Could not initialize GLX
and similar errors?
export QT_XCB_GL_INTEGRATION=none
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
#!/bin/bash -e | |
# Install RavenPro as user on Linux using proot | |
# Download the installer in advance and set the correct version | |
# Do not start RavenPro from the installer | |
VERSION=1.6.5 | |
mkdir -p ravenpro | |
proot -0 -b ravenpro:/opt ./RavenPro-${VERSION}-linux-x64-installer.run |
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
repos: | |
- repo: https://github.com/lorenzwalthert/precommit | |
rev: v0.4.3 | |
hooks: | |
- id: style-files |
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
#!/bin/bash | |
set -eu | |
lon=10.407 | |
lat=63.431 | |
echo "# seNorge GDAL test" | |
echo | |
echo "## Test info" |
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
#!/bin/bash | |
set -xeu | |
export max=$((8*1024*1024*1024)) # 8 GB | |
memory_max() { | |
requested=$1 | |
total=$( | |
find /sys/fs/cgroup/user.slice/ -wholename "*/run-*.*/cgroup.procs" | |
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
vcl 4.1; | |
import dynamic; | |
backend default none; | |
sub vcl_init { | |
new d = dynamic.director(port = "80"); | |
} | |
sub vcl_recv { |
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
// Add incremental Call Number | |
let items = Zotero.getActiveZoteroPane().getSelectedItems(); | |
let callNumberLength = items.length.toString().length; | |
for (i=0; i<items.length; i++) { | |
let item = items[i]; | |
if (!items[i].isRegularItem()) continue; | |
item.setField("callNumber", (i+1).toString().padStart(callNumberLength, "0")); | |
await item.saveTx(); | |
} |
NewerOlder