markusl2ll
Essentially, you just mark the code blocks with `:script name`, and then can list or execute the block from a terminal. This also keeps the script in context within whatever other notes you had on the topic, when you were figuring it out etc. And if something turns out to be a useful snippet, you move it out to an actually separate script. :)
Write all your notes to org-mode files in a git repo, sync these (selectively) to Anki. No need to depend on proprietary services.
Ironically though, the easiest way to get your cards to AnkiDroid/AnkiMobile is through ankiweb.net (a free service) then you could manually export/import cards and stats should that disappear. org-anki saves note ID within org-mode, so you can keep updating cards after an export/import.