Skip to content

Instantly share code, notes, and snippets.

@jamesmartin
Last active January 28, 2020 07:59
Show Gist options
  • Select an option

  • Save jamesmartin/935b9c89c89413db98204e2e91140ef3 to your computer and use it in GitHub Desktop.

Select an option

Save jamesmartin/935b9c89c89413db98204e2e91140ef3 to your computer and use it in GitHub Desktop.
Alfred Convert plugin unit definitions for computer units
# Add your custom definitions to this file. See the Pint documentation for
# information on the necessary format:
# http://pint.readthedocs.org/en/latest/defining.html
# You can see the default definitions built in to Pint here:
# https://github.com/hgrecco/pint/blob/master/pint/default_en.txt
gigabyte = 1000 * megabyte = gb = GB
megabyte = 1024 * kilobyte = mb = MB
kilobyte = 1024 * byte = kb = KB
byte = 8 * bit = B
bit = [data] = b
@jamesmartin
Copy link
Copy Markdown
Author

I use these in an Alfred workflow called convert.

@michbsd
Copy link
Copy Markdown

michbsd commented Jul 19, 2019

Thanks for this. However converting bytes to kilobytes is not working..

Any idea why that is ?

Screenshot 2019-07-19 11 27 36

@jamesmartin
Copy link
Copy Markdown
Author

🤔 @michbsd, sorry I'm not sure what's happening there. I no longer use Alfred so you might have more luck contacting the developers of the convert plugin.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment