One of the first commands you learn when experimenting with a command line is rm
, Utility for deleting files and directories. Deletion is the operation of a computer’s core user interface, but operating systems use the “trash” paradigm, in which files are stored before they are actually deleted. with the rm
Utility, however, files are deleted immediately and permanently.
If you’re like me and afraid to automate deleting files permanently, you can opt in A utility called trash
. This nice Node.js directory transfers files to the trash instead of instant deletion.
// Install with `yarn add trash` // Move a file to trash const trash = require('trash'); await trash('bug-report.jpg');
There are also a trash-cli
Package for using the command line utility:
yarn add trash-cli # Usage trash unicorn.png rainbow.png trash '*.png' '!unicorn.png'
rm
Can be really hard so there is a trash
The utility is helpful in providing users with a file deletion paradigm that they are used to.
CSS vs. JS Animation: What’s Faster?
How is it possible that JavaScript – based animation has always been secretly faster – or faster – than CSS transitions? And how is it possible that Adobe and Google are consistently releasing media-rich mobile sites that compete with the performance of genuine apps? This article serves as a point …
Vibration API
Many of the new APIs provided to us by browser providers are more targeted at the mobile user than the desktop user. One of those simple APIs Vibration API. Vibration API allows developers to tune the device, using JavaScript, to vibrate in …
MooTools Zebra Table plugin
I released my first MooTools lesson more than a year ago. It was a really minimalist approach to zebra tables and a great first class writing. I took some time to update and improve the class. XHTML You may have some tables like …
JQuery Link Push
A few weeks ago I wrote an article about MooTools Link Nudging, which is basically an elegant and delicate link animation achieved by adding a left pad in the mouse transfer and removing it at the exit of the mouse. Here’s how to do it using jQuery: jQuery JavaScript is important to save …
Source