Check /dev/
ls /dev/tpm*
If a TPM is present, you may see:
import serial | |
def listen_serial(port, baud_rate): | |
try: | |
ser = serial.Serial(port, baud_rate) | |
print(f"Opened {port} with baud rate {baud_rate}") | |
while True: | |
# Read data from the serial port | |
if ser.in_waiting > 0: |
import os | |
import serial.tools.list_ports as list_ports | |
import stat | |
from pwd import getpwuid | |
def list_all_ports(): | |
ports = list_ports.comports() | |
for port in ports: | |
print(f"Device: {port.device:<15} Path: {port.device_path}") | |
if ( |
[Desktop Entry] | |
Type=Service | |
MimeType=image/*; | |
Actions=convertToPNG;convertToJPG | |
X-KDE-Submenu=Convert Image | |
[Desktop Action convertToPNG] | |
Name=Convert -> PNG | |
Icon=background | |
Exec=magick %u %u.png |
<!DOCTYPE html> | |
<html> | |
<body> | |
<h1 id="cereal">R U 4 Cereal?</h1> | |
</body> | |
<script> | |
var header = document.querySelector("#cereal") | |
if (navigator.serial) { |
/** | |
* K.jpg's OpenSimplex 2, smooth variant ("SuperSimplex") | |
* | |
* More language ports, as well as legacy 2014 OpenSimplex, can be found here: | |
* https://github.com/KdotJPG/OpenSimplex2 | |
*/ | |
public class OpenSimplex2S { | |
private static final long PRIME_X = 0x5205402B9270C86FL; |
reg.exe add "HKCU\Software\Classes\CLSID\{86ca1aa0-34aa-4e8b-a509-50c905bae2a2}\InprocServer32" /f /ve |
These files are backups that go in ~/.config/ | |
eg: /home/username/.config/ | |
Fix or replace the files. Then log out session and log back in. | |
In plasmashell.rc: There should never be more than monitors than are physically connected in [ScreenConnectoers] | |
You can simply delete all entries and log out and log back in and plasmashell should remake the entries for you. | |
eg: I have 3 monitors: | |
[ScreenConnectors] | |
0=HDMI-A-1 |
list applications: | |
adb shell 'pm list packages -f' | sed -e 's/.*=//' | sort | |
get path for app: | |
adb shell pm path com.app.name | |
extract app: | |
adb pull /path/to/app.apk |
::robocopy C:\source M:\destination /MIR /FFT /R:3 /W:10 | |
::/MIR option (equivalent to /E /PURGE) stands for "mirror" and is the most important option. | |
::It regards your source folder as the "master", causing it to overwrite any changes on the target side, which is a useful setting for a backup. | |
::/FFT is a very important option, as it allows a 2-second difference when comparing timestamps of files, such that minor clock differences between your computer and your backup device don't matter. This will ensure that only modified files are copied over, even if file modification times are not exactly synchronized. | |
::/R:3 specifies the number of retries, if the connection should fail, and /W:10 specifies a wait time of 10 seconds between retries. These are useful options when doing the backup over a network. | |
::/Z copies files in "restart mode", so partially copied files can be continued after an interruption. | |
::credit: superuser.com/a/831868 | |
robocopy D:\ G:\ /MIR /FFT /R:3 /W:10 /Z /XJD |