{
"providers": {
"zai": {
"baseUrl": "https://api.z.ai/api/coding/paas/v4",
"api": "openai-completions",
"apiKey": "ZAI_API_KEY",
"models": [
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 | |
| # | |
| # herdr-session.sh — pick or create a herdr session, then launch it. | |
| # | |
| # • Type to search existing sessions; Enter attaches to the selection. | |
| # • Type a name and press Ctrl-N to create + launch a new session. | |
| # • Esc cancels. | |
| # | |
| # Requires: herdr, fzf, jq |
I have a project to control the battery but at the end of the day I needed something that just works. As I'm using auto-cpufreq I removed the TLP and therefore needed this battery limiter. Help planet and your pocket by preserving your laptop battery life.
Create systemd service file (/etc/systemd/system/battery-threshold.service) to run as root:
sudo nano /etc/systemd/system/battery-threshold.service
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
| #Battery Threshold | |
| # Add these Aliases to ~/.bashrc to be able to set battery charging levels to 50-60-70-80-90-100. | |
| #(It appears that lower values than 53 will be ignored) | |
| #Requires SUDO access | |
| # Sources: | |
| # https://www.linuxuprising.com/2021/02/how-to-limit-battery-charging-set.html | |
| # https://askubuntu.com/questions/1006778/set-battery-thresholds-on-ubuntu-asus | |
| # Alias: |
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 | |
| now=`date +"%Y-%m-%d %H-%M-%S"` | |
| gnome-screenshot -a -f "Pictures/gnome-screenshot/${now}.png" | |
| # One can use keyboard shortcuts to call above script and ... |
This can be placed on an scheduler and logs your traffic like every hour or so.
{
:set $tx ([/interface get ether1 tx-byte]/1048576)
:set $rx ([/interface get ether1 rx-byte]/1048576)
:log debug "Traffic log,TX,$tx,RX,$rx;"
}