===============================================================
FIND ALL DUPLICATE FILES IN THE CURRENT DIRECTORY RECURSIVELY:
fdupes -r .
===============================================================
FIND ALL FILES CONTAINING FOO IN THEIR NAME IN THE CURRENT DIRECTORY RECURSIVELY:
case-sensitive: find -name "*foo*"
case-insensitive: find -iname "*foo*"
===============================================================
SEARCH THE BASH HISTORY:
Press Ctrl+r and type a string.
Press Ctrl+r again to continue the search.
===============================================================
CLONE AUTOKEY:
cd Desktop
git clone https://github.com/autokey/autokey.git
cd autokey; cd lib; python3 -m autokey.gtkui -c;
cd autokey; cd lib; python3 -m autokey.qtui -c;
===============================================================
CLONE A FORK:
cd Desktop
git clone https://github.com/Elliria/autokey.git
cd autokey; cd lib; python3 -m autokey.gtkui -c;
cd autokey; cd lib; python3 -m autokey.qtui -c;
===============================================================
CLONE A PULL REQUEST AND RUN IT IN A VENV: ❤️ ❤️❤️
cd Desktop
git clone https://github.com/autokey/autokey.git
cd autokey
git fetch origin pull/1004/head:pull_1004
git checkout pull_1004
python3 -m venv venv
source venv/bin/activate
pip install -r pip-requirements.txt
pip install packaging
cd lib
python3 -m autokey.gtkui -cl
... or...
python3 -m autokey.qtui -cl
deactivate
============================================================
CLONE A RELEASE
cd Desktop
git clone https://github.com/autokey/autokey.git
cd autokey
git fetch --all --tags --prune
git checkout tags/v0.96.0
cd lib
python3 -m autokey.gtkui -cl
... or ...
python3 -m autokey.qtui -cl
... and when you're finished ...
git switch -
============================================================
CLONE A PR AND RUN IT IN A VENV:
cd Desktop && git clone https://github.com/autokey/autokey.git && cd autokey && git fetch origin pull/1004/head:pull_1004 && git checkout pull_1004 && python3 -m venv venv && source venv/bin/activate && pip install -r pip-requirements.txt && pip install packaging && cd lib && python3 -m autokey.gtkui -cl
...or...
cd Desktop && git clone https://github.com/autokey/autokey.git && cd autokey && git fetch origin pull/1004/head:pull_1004 && git checkout pull_1004 && python3 -m venv venv && source venv/bin/activate && pip install -r pip-requirements.txt && pip install packaging && cd lib && python3 -m autokey.qt -cl
============================================================
SHORTCUTS -- RUN AN AUTOKEY CLONE:
cd ~/Desktop/autokey/lib && python3 -m autokey.gtkui -c
...or...
cd ~/Desktop/autokey/lib && python3 -m autokey.qtui -c
============================================================
SHORTCUTS --RUN AN AUTOKEY CLONE IN A VENV:
cd Desktop && cd autokey && source venv/bin/activate && cd lib && python3 -m autokey.gtkui -cl
...or...
cd Desktop && cd autokey && source venv/bin/activate && cd lib && python3 -m autokey.qtui -cl
===============================================================
TEST AUTOKEY WITH TOX:
tox
...or...
tox -e clean,coverage
...or...
tox -e lint
===============================================================
TEST AUTOKEY WITH PYTEST:
~/Desktop/autokey/.tox/test/bin/pytest --cov=.
Note that this can only be run after the tox command has already been run so that the .tox directory will exist.
===============================================================
LINT THE AUTOKEY CODE:
* Lint a file: flake8 /path/to/file.py
* Lint a directory recursively: flake8 /path/to/directory
* Lint the current directory recursively: flake8
* Lint the Python files in the current directory non-recursively: flake8 *.py
* More information on flake8: https://flake8.pycqa.org/en/latest/
The flake8 command is tethered to the Python version. You can force a certain Python version, like version 3 in this example: python3 -m flake8
There are lots of command-line options for making flake8 accept certain line-lengths, ignore certain errors or warnings, etc.
* Accept line lengths of up to 127 characters:
flake8 --max-line-length=127 foo.py
* Accept line lengths of up to 127 characters and go up to the specified max-complexity:
flake8 --max-line-length=127 --max-complexity=10 dialogs.py
How to read the results:
* The max-complexity option sets the maximum-allowed McCabe complexity-value for a block of code. The flake8 command uses the McCabe complexity threshold. A score of 10 or less is considered pretty simple and easy to maintain, 11-20 is a somewhat-complex program, 21-50 is a very-complex program, and over 50 is so complex that it's untestable.
* All C90 class violations are reported when the user specifies flake8 --max-complexity
* All E class violations are “errors” reported by pycodestyle
* All F class violations are reported by pyflakes
* All W class violations are “warnings” reported by pycodestyle
AutoKey's linter:
* AutoKey only lints the /lib/autokey directory.
* AutoKey's linting command is:
flake8 --count --select=E9,F63,F7,F82 --show-source --statistics --builtins=_ --max-complexity=10 --max-line-length=127 lib/autokey
Explanation of AutoKey's linter:
* --count displays the total number of errors/warnings
* --select=E9,F63,F7,F82 checks for syntax errors/warnings
* --show-source shows the line number of each error/warning
* --statistics shows the total number of each error/warning type
* --builtins=_ checks for the specified builtins being used as variables or parameters
* --max-complexity=10 sets the maximum-allowed McCabe complexity-value for a block of code to 10 (simple)
* --max-line-length=127 sets the specified maximum number of characters allowed in a line
* lib/autokey sets the specified directory that's being linted
A variation of AutoKey's linting command that doesn't specify what to test for:
flake8 --count --show-source --statistics --builtins=_ --max-complexity=10 --max-line-length=127
Get all the information: flake8
The following line gives all information, but accepts line-lengths of up to 127 characters: flake8 --max-line-length=127
============================================================
CLAMAV:
* Update:
sudo service clamav-freshclam stop
sudo freshclam -v
sudo service clamav-freshclam start
* Scan the current directory:
clamscan
* Scan the current directory recursively:
clamscan -r
* Scan the specified file:
clamscan foo.txt
* Get help:
clamscan help
clamscan --help
============================================================
SNAP:
* Check for Snap updates and list them if there are any:
sudo snap refresh --list
* Check when last refreshed and when it's due to refresh again:
snap refresh --time
* Display the current Snap revision:
snap list firefox
* Update the Firefox Snap manually:
sudo snap refresh firefox
============================================================
# My personal aliases:
alias cleanupinaislenine1="sudo apt update && sudo apt full-upgrade && sudo snap refresh"
alias cleanupinaislenine2="sudo apt autoremove --purge && sudo apt clean"
============================================================
Last active
January 17, 2026 20:38
-
-
Save Elliria/3dbb7abad342f55b427cb61cbb50a8f1 to your computer and use it in GitHub Desktop.
AutoKey VM Notes
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment