mtift

Joined 14 years ago

Karma
59
Submissions
15
Member since
Jul 19
Drupal developer and yoga teacher https://matthewtift.com
View on Hacker News

Recent submissions

Comment · 5 years ago
I agree. I am a developer and I know how to deal with special characters. But this isn't something I use professionally. I just prefer not to have to deal with special characters in the pdfs, m4as, txts, and other files that I use on a daily basis. When I write papers, I'll write ū or Ñ or ç or whatever (incidentally, I have a lot of shortcuts in my .vimrc for those). I would not say I am "afraid" to use spaces in filenames, but I get a certain satisfaction storing academic papers in the author--paper-title.pdf format and my notes in author--paper-title.md because it helps me find things.
Comment · 5 years ago
Totally inefficient. But for me it's readable and practical. This is mostly just a convenience function for me to help store files in a format I like rather than something I need optimized. If it ever started to feel slow, sure I could optimize. But for now, when I still occasionally download a file that has some weird character and I just prefer to add another line to my function.
Comment · 5 years ago
Yeah, sometimes I end up renaming things I don't want to, but it really doesn't happen all that often. And sometimes I throw caution to the wind, add some excitement to my life, and rename a bunch of files (not for anything professional) in some really old directory and hope I don't break anything. But I'm not aiming for perfect with this comment. I just mentioned in another comment, but the vast majority of times I run this is in my ~/Downloads folder on files I don't really worry about breaking.
Comment · 5 years ago
I totally agree that for some people, this could be a terrible command to have around. However, I know that it has been working for me for about 8+ years or so. I almost always run in in my ~/Downloads folder on files that I don't really care about. I download a lot of academic papers and books, and this just saves me a lot of time to put files in the format I like: author--paper-title.pdf. And that's part of the reason why I make all of the dashes the same, so if I'm opening something by an author, I can easily autocomplete and not have to remember how to make other sorts of dashes on the command line.
Comment · 5 years ago
I have an overly-aggressive function in my .bashrc to rename all files in the current directory:

  # Rename all files in a directory
  rn() {
    rename "s/ /-/g" *
    rename "s/_/-/g" *
    rename "s/–/-/g" *
    rename "s/://g" *
    rename "s/\(//g" *
    rename "s/\)//g" *
    rename "s/\[//g" *
    rename "s/\]//g" *
    rename 's/"//g' *
    rename "s/'//g" *
    rename "s/,//g" *
    rename "y/A-Z/a-z/" *
    rename "s/---/--/g" *
    rename "s/-‎--/--/g" *
  }
I use this all the time, especially when I download files.
Comment · 10 years ago
http://shop.lenovo.com/us/en/laptops/thinkpad/t-series/t460

If you need 32GB of RAM, then the ThinkPad T460 would qualify. And Lenovo claims it has 18 hours of battery life, which seems more than decent to me.

I switched from MacBook Pros to the ThinkPad T Series running GNU/Linux a few years ago and I have not been disappointed. My only caveat is that I like to run Debian stable, and that seems to work better on older ThinkPads, especially for things like video chats. In my experience, the newer ThinkPads work better with distros that use newer kernels (at least I think that is why), such as Ubuntu or Fedora.

I would have suggested the T460s, which is lighter, but that only goes up to 20GB of RAM.

Comment · 10 years ago
Comment · 12 years ago
Comment · 12 years ago
IBS is a "diagnosis of exclusion," so in some sense it is not a "real thing," but more accurately the "absence of other things." I really hated that answer, but it's the conclusion that more than a half-dozen different gastroenterologists came to after trying countless tests on me over the course of many years.

After a lifetime of trying to be gluten free (on and off), with limited success, I started a low-FODMAP diet on December 15, 2012 and it completely changed my life. I could not find many dietitians that knew much about it, so I mostly followed the advice of books like IBS: Free at Last! (http://amzn.com/0982063520). Now I feel much more empowered and in control.

Also, not all FODMAPs are equal. Each individual has to figure out which FODMAPs cause the most problems. Being "low FODMAP" is WAY different from being "gluten free." I eat FODMAPs all the time -- I just limit certain ones more than others and I know my limits. And even after 19 months of being low-FODMAP, I still have to consult my list of foods regularly.

Only after doctors have ruled out Crohn's disease, celiac disease, diverticulitis, endometriosis, cancer, etc., and suggest you have IBS, I highly recommend trying a low-FODMAP diet.

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton