Skip to content

Instantly share code, notes, and snippets.

@atifraza
atifraza / best-practices.md
Last active October 6, 2021 08:38
SSH and GPG key related stuff

Creating good SSH keys

  • ED25519
    • ssh-keygen -o -a 100 -t ed25519 -C your_email@address.com
  • RSA
    • ssh-keygen -o -a 100 -t rsa -b 4096 -C your_email@address.com

Exporting GPG keys and the owner trust db

  • Private (includes public key)
@atifraza
atifraza / conda-basics.md
Last active May 23, 2024 02:29
Basics of the conda package manager

Conda basics and best practices

Best practices

  • Don't install additional packages into the base environment
  • Give meaningful names to environments, e.g., PROJECT_NAME-env
  • Always specify package version numbers
  • Install all required packages in one command to reduce later conflicts
  • Install pip in each environment to avoid using the system default version
  • Always version control the environment.yml file
@atifraza
atifraza / export-toby.js
Last active April 17, 2020 16:07 — forked from krishpop/export-toby.js
Export data from Toby - Open developer tools and execute in the console
// code courtesy of Toby team
chrome.storage.local.get("state", o => (
((f, t) => {
let e = document.createElement("a");
e.setAttribute("href", `data:text/plain;charset=utf-8,${encodeURIComponent(t)}`);
e.setAttribute("download", f);
e.click();
})(`TobyBackup${Date.now()}.json`, o.state)
));
@atifraza
atifraza / conda-tricks.md
Created March 30, 2020 20:16
Intricacies of conda package manager

When installing a package from a non-defaults channel, we usually do:

conda install -c conda-forge packagename

This has the side effect of adding conda-forge as a higher priority channel then defaults Alternatively, we can now use

conda install conda-forge::packagename

to only have the specified packagename to be installed from conda-forge, or one could do: