Neat output to show you the #lxd lxc containers used for #snapcraft :
alias snapcraft_lxc='lxc list --project snapcraft --columns nstS --format compact'
Neat output to show you the #lxd lxc containers used for #snapcraft :
alias snapcraft_lxc='lxc list --project snapcraft --columns nstS --format compact'
If you use CloudFlare to reverse proxy to your server, they add the header "CF-Connecting-IP" and "CF-Connecting-IPv6"to supply you with the originator IP address.
In NGINX, you can access these headers via:
$http_CF_Connecting_IP
$http_CF_Connecting_IPv6

When your website traffic is routed through the Cloudflare network, we act as a reverse proxy. This allows Cloudflare to speed up page load time by routing packets more efficiently and caching static resources (images, JavaScript, CSS, etc.). As a result, when responding to requests and logging them, your origin server returns a Cloudflare IP address.
A few of us (@foobarry , @bigcalm ) have been tinkering with Firefox tab unloading.
Noteworthy settings:
⚙️ browser.tabs.fadeOutUnloadedTabs will fade the tabs icons
⚙️ browser.tabs.min_inactive_duration_before_unload sets the minimum time the tab will live before the unloader does it's thing. general consensus is that this is the number of milliseconds, with the default being 10 minutes (mine is much less than that now)
⚙️ browser.tabs.unloadOnLowMemory will account for low ram
⚙️ browser.tabs.unloadTabInContextMenu enables manual unloading of tabs via a context menu action
📄 There's a page called about:unloads with useful metrics, which references this page of information https://firefox-source-docs.mozilla.org/browser/tabunloader/
🛠️ Pinned tabs are deprioritized in the eyes of the unloader. Which is a setting I'd like to change.
Pictures attached for reference
I wish this sort of thing was more well-known.
#Firefox
#WebBrowser
#UnloadTabs
#AboutUnloads
#AboutConfig
#DWDsTips
💡 #DWDsTips Minicom logging + options
#Minicom can annotate the received data.
Here I add timestamps to my sensor data and create a log file with the data in it
now=-$(date '+%F_%T' --utc | tr -d -- '-:')
logfile="${HOME}/Logs/minicom-capture-${now}"
minicom \
--baudrate 115200 \
--device /dev/ttyACM0 \
--option timestamp \
--capturefile "${logfile}"
💡 #DWDsTips use pv to monitor the loading of data into a database table
command-to-generate-data |
pv --line-mode --size ESTIMATED_NO_OF_LINES --progress --rate |
psql DB_NAME -c "\copy TABLE_NAME (...COLUMNS... FROM STDIN with (format 'csv', header false)"
My data is generated from a command which reads and transforms files - last time it took a few seconds shy of 90 minutes.
Having a progress estimate is really helpful
💡 #DWDsTips Convert some NDJSON to CSV on the #CLI using #jq
jq -r '[.name, .description] | @csv' << 'EOF'
{"name": "dwd", "description": "tips"}
{"name": "not-dwd", "description": "unhelpful tips"}
EOF
✅ Yielding
"dwd","tips"
"not-dwd","unhelpful tips"
Had to do this for a lot of data yesterday, did not want to program a solution.
💡 #DWDsTips: limit the resources available to a program using systemd-run
systemd-run --user --scope --property MemoryMax=250M --property MemorySwapMax=0M YourProgram
Take that, you RAM guzzling, Electron based, applications
Docs:
- https://www.freedesktop.org/software/systemd/man/latest/systemd-run.html
- https://www.freedesktop.org/software/systemd/man/latest/systemd.resource-control.html