cat /etc/nv_tegra_release
dpkg-query --show nvidia-l4t-core
dpkg -l | grep 'nvidia-l4t-core'
#!/bin/sh | |
echo "== Check required programs ==" | |
if ! [ -x "$(command -v nala)" ]; then | |
echo 'Error: NALA is not installed. Please install it with "apt install nala"' >&2 | |
exit 1 | |
fi | |
if ! [ -x "$(command -v snap)" ]; then | |
echo 'Error: SNAP is not installed. Please install it with "nala install snap"' >&2 |
apt purge wolfram-engine scratch scratch2 nuscratch sonic-pi idle3 -y | |
apt purge smartsim java-common minecraft-pi libreoffice* geany -y | |
apt clean | |
apt autoremove -y | |
echo "deb http://packages.azlux.fr/debian/ bullseye main" | sudo tee /etc/apt/sources.list.d/azlux.list | |
wget -qO - https://azlux.fr/repo.gpg.key | sudo apt-key add - | |
apt update | |
apt install unclutter xscreensaver ssmtp mailutils ufw log2ram |
SELECT | |
l.*, | |
( | |
6371 | |
* acos( | |
cos( | |
radians( $input_latitude ) | |
) | |
* cos( | |
radians( l.latitude ) |
#!/bin/sh | |
# Show a dialog to switch between available php versions on your ubuntu 18.04 linux system | |
# found at https://www.ostechnix.com/how-to-switch-between-multiple-php-versions-in-ubuntu/ | |
sudo update-alternatives --config php |
-- anonymize the following tables | |
UPDATE `users` | |
SET | |
name = CONCAT('Anonymized ', id), | |
email = CONCAT('anonymized+', id, "@example.com"), | |
password = SHA1(CONCAT('secret', id, RAND())) | |
WHERE 1; | |
UPDATE `ls_sponsors` |
-- # Convert block type CMS entries to Rich HTML Textarea entries - with JSON objects too # | |
-- Because there will be large joins make this size ridiculous | |
SET SESSION group_concat_max_len = 6000000; | |
-- String variable replacement in mysql is handy | |
SET @uploads_target_path = CAST('/storage/uploads/' AS CHAR CHARACTER SET utf8); | |
-- this inserts rows with concatenated formatted blocks | |
-- from source_db.page and source_db.block |
-- https://stackoverflow.com/a/22669310/1531963 | |
-- Assuming that the comma separated list is in table data.list, | |
-- and it contains listing of codes from other table classification.code, you can do something like: | |
SELECT | |
d.id, d.list, c.code | |
FROM | |
classification c | |
JOIN data d | |
ON d.list REGEXP CONCAT('[[:<:]]', c.code, '[[:>:]]'); |
If composer runs out of memory on digitalocean or another RAM limited cloud VM You need to create a swap drive
Create and activate the swapdrive as superuser And get back to the normal shell
sudo /bin/dd if=/dev/zero of=/var/swap.1 bs=1M count=8192
sudo chmod 600 /var/swap.1
sudo /sbin/mkswap /var/swap.1
sudo /sbin/swapon /var/swap.1