Command Line trash
One of the first commands you learn when experimenting with command line is
rm, the utility for deleting files and directories. Deletion is a core computer UI operation but operating systems use a "Trash" paradigm, where files are stored before truly deleted. With the
rm utility, however, files are immediately, permanently deleted.
If you're like me and afraid to automate permanent file deletion, you can opt for a utility named
trash. This nice Node.js library moves files to the trash instead of instant deletion.
// Install with `yarn add trash`
// Move a file to trash
const trash = require('trash');
There's also a
trash-cli package for using the utility from command line:
yarn add trash-cli
trash unicorn.png rainbow.png
trash '*.png' '!unicorn.png'
rm can be really harsh so having a
trash utility is helpful in providing users a file deletion paradigm that they're used to.
I was inspired when I first saw Addy Osmani's original ShineTime blog post. The hover sheen effect is simple but awesome. When I started my blog redesign, I really wanted to use a sheen effect with my logo. Using two HTML elements and...
In 2001 I had just graduated from a small town high school and headed off to a small town college. I found myself in the quaint computer lab where the substandard computers featured two browsers: Internet Explorer and Mozilla. It was this lab where I fell...
As broadband speed continues to get faster, the web continues to be more media-centric. Sometimes that can be good (Netflix, other streaming services), sometimes that can be bad (wanting to read a news article but it has an accompanying useless video with it). And every social service does...
I was recently visiting MooTools Developer Christoph Pojer's website and noticed a sexy link hover effect: when you hover the link, the the link animates and tilts to the left or the right. To enhance the effect, the background color of the link is...