"for begginers" haha, I'd like to see friends of mine try this one out
I was too lazy to write anything remotely as clean as this so I asked Kagi's integration of Mistral Large:
Sure, here's an example of how you could create a
systemd
timer to automatically renice existing Google Chrome processes.
- First, create a new service file. You can use any text editor you like, but for this example, we'll use
nano
:sudo nano /etc/systemd/system/renice-chrome.service
- In the service file, add the following lines:
[Unit] Description=Renice Google Chrome processes [Service] Type=oneshot ExecStart=/bin/bash -c 'for pid in $(pgrep chrome); do ionice -c3 -p $pid; renice 19 -p $pid; done'
This service file defines a new service that runs a bash command to find all Google Chrome processes (using
pgrep chrome
), and then appliesionice
andrenice
to each process.
Save and close the file.
Next, create a new timer file:
sudo nano /etc/systemd/system/renice-chrome.timer
- In the timer file, add the following lines:
[Unit] Description=Run renice-chrome.service every hour [Timer] OnCalendar=hourly Persistent=true [Install] WantedBy=timers.target
This timer file defines a new timer that runs the
renice-chrome.service
every hour.
Save and close the file.
Now, enable and start the timer:
sudo systemctl enable renice-chrome.timer sudo systemctl start renice-chrome.timer
- You can check the status of the timer with:
sudo systemctl list-timers
This will show you a list of all active timers, including when they're next due to run.
Please note that this will only affect Google Chrome processes that are already running when the timer runs. If you want to also lower the priority of new Google Chrome processes as they're launched, you would need to use a different approach, such as the script I described in my previous answer.
Also, remember to replace
chrome
with the correct process name if it's different on your system. You can check the process name withpgrep chrome
. If it doesn't return anything, trypgrep chromium
orpgrep google-chrome
.
Anyway, just before announcing ssh-1.0 in July 1995, I sent this e-mail to IANA:
From ylo Mon Jul 10 11:45:48 +0300 1995 From: Tatu Ylonen ylo@cs.hut.fi
To: Internet Assigned Numbers Authority iana@isi.edu
Subject: request for port number
Organization: Helsinki University of Technology, Finland
Dear Sir, I have written a program to securely log from one machine into another over an
insecure network. It provides major improvements in security and functionality over existing
telnet and rlogin protocols and implementations. In particular, it prevents IP, DNS and
outing spoofing. My plan is to distribute the software freely on the Internet and to get it
into as wide use as possible. I would like to get a registered privileged port number for
the software.
The number should preferably be in the range 1-255 so that it can be used in the WKS field
in name servers. I'll enclose the draft RFC for the protocol below. The software has been in
local use for several months, and is ready for publication except for the port number. If
the port number assignment can be arranged in time, I'd like to publish the software already
this week. I am currently using port number 22 in the beta test.
It would be great if this number could be used (it is currently shown as Unassigned in the
lists). The service name for the software is "ssh" (for Secure Shell).
Yours sincerely, Tatu Ylonen ylo@cs.hut.fi ... followed by protocol specification
for ssh-1.0
The next day, I had an e-mail from Joyce waiting in my mailbox:
Date: Mon, 10 Jul 1995 15:35:33 -0700 From: jkrey@ISI.EDU To: ylo@cs.hut.fi Subject:
Re: request for port number Cc: iana@ISI.EDU
Tatu, We have assigned port number 22 to ssh, with you as the point of contact. Joyce
There we were! SSH port was 22!!!
Displaylink c'est vraiment de la daube
git clone git@github.com:DisplayLink/evdi.git
sudo mv evdi /usr/src/evdi
cd /usr/src
sudo mv evdi-1.12.0 evdi-1.12.0-backup
sudo ln -s evdi/module evdi-1.12.0
cd evdi-1.12.0
sudo make
sudo make install
restic.sh
#!/bin/bash
timeout 30 mount /home/backup/ && time autorestic --config /home/changeme/.autorestic.yml backup -a ; umount /home/backup
restic.service
[Unit]
Description="Restic script"
[Service]
ExecStart=/bin/bash -c "/home/changeme/restic.sh"
restic.timer
[Unit]
Description="Run restic.service 5min after boot and every 24 hours relative to activation time"
[Timer]
OnBootSec=5min
OnUnitActiveSec=24h
OnCalendar=Mon..Fri *-*-* 10:00:*
Unit=restic.service
[Install]
WantedBy=multi-user.target
/etc/fstab
storage.ip.address:/home/changeme/backup /home/backup nfs4 noauto,rw,hard,intr,rsize=8192,wsize=8192,timeo=14 0 0
~/.autorestic.yml
version: 2
locations:
home:
from: /home/changeme/
to: remote
options:
backup:
exclude:
- 'Dropbox/*'
- 'Dropbox*/*'
- '.cache'
- '.*CacheStorage.*'
- '.*CachedData.*'
- '.*Cache.*'
- '.var/app'
- '.cargo'
- '.ssh'
- '.rustup'
exclude-file: /home/changeme/.gitignore
backends:
remote:
type: local
path: "/home/backup/"
key: "changeme"
Learn how to use MySQL SQL commands with this comprehensive tutorial. Discover four subgroups of MySQL SQL commands: DDL for database schema, DML for data manipulation, DCL for access control, and TCL for transaction management.
chiant à retrouver à chaque fois pour activer le fractional scaling
Enfin un graph de conversion AQI/microgrammes https://qph.fs.quoracdn.net/main-qimg-fc087d00bff5bb9da5477ac5530c5c3e
je veux bien qu'on souhaite parler de l'impact sur la santé mais c'est chiant de convertir des pommes en oranges en permanence quand on parle de mesures
via Victor, à surveiller!