2021-05-05 17:07:22
Can’t start Snap: 'cannot change profile for the next exec call: No such file or directory'

sudo apparmor_parser -r /var/lib/snapd/apparmor/profiles/*
2018-04-06 17:40:25
Terminal colours

perl -e 'for(my $j=0; $j<2;$j++) {for(my $i=30; $i < 38; $i++){print "\033[$j;${i}$j;$i \033[0m\n"}}'
2018-04-06 17:38:22
List latest 15 modified files recursively

find . -type f -printf '%T@ %TY-%Tm-%Td %TH:%TM:%.2TS %P\n' | sort -nr | head -n 15 | cut -f2- -d" "
2018-04-06 17:36:21
Start deattached screen job that won't terminate itself when done

screen -dmS screen_name bash -c 'echo waiting 5 seconds...; sleep 5; exec bash'
2018-04-06 17:31:50
MySQL output to a CSV file (files land in /var/lib/mysql/db_name/ and are owned by mysql)

SELECT order_id,product_name,qty FROM orders WHERE foo = 'bar' INTO OUTFILE 'orders.csv' FIELDS TERMINATED BY ',' ENCLOSED BY '"' LINES TERMINATED BY '\n';
2018-04-06 16:32:42
Install CPAN module with 'yes' to all questions

PERL_MM_USE_DEFAULT=1 perl -MCPAN -e 'install This::Is::Module::Name'
2015-07-31 19:40:00
How to recover WiFi password in Windows

Run cmd as Administrator

netsh wlan show profile name=MY_SSID key=clear
2013-07-08 11:09:42
Change permissions for files and directories separately

find . -type f -print0 | xargs -0 chmod 644
find . -type d -print0 | xargs -0 chmod 755

2013-06-07 12:50:50
Disable hibernation in Windows 7

powercfg -h off
2013-04-11 16:19:49
Resetting root MySQL password

Stopping MySQL server:
# /etc/init.d/mysql stop
Starting MySQL server without password:
# mysqld_safe --skip-grant-tables &
Connecting to mysql server:
# mysql -u root mysql
Setting up new MySQL root user password
mysql> update user set password=PASSWORD("NEW-ROOT-PASSWORD") where User='root';
mysql> flush privileges;
mysql> quit

Stopping MySQL Server:
# /etc/init.d/mysql stop
Starting MySQL server and test it
# /etc/init.d/mysql start