1
0
mirror of https://github.com/jbranchaud/til synced 2026-01-17 05:58:01 +00:00

Compare commits

...

3 Commits

Author SHA1 Message Date
nick-w-nick
67ddb9b29d Merge 295fe153ad into 5ebdd9a1a9 2024-10-16 14:30:36 -04:00
jbranchaud
5ebdd9a1a9 Add Convert JPEG To PNG With ffmpeg as a Unix TIL 2024-10-16 12:43:18 -05:00
nick-w-nick
295fe153ad added mention of ES6 compatibility
Hello, I've added a small blockquote below the description to indicate that this method of accessing an indefinite number of function arguments has been superseded by the use of the spread operator via rest parameters for ES6+ compatibility.
2022-01-06 11:39:04 -05:00
3 changed files with 24 additions and 1 deletions

View File

@@ -10,7 +10,7 @@ pairing with smart people at Hashrocket.
For a steady stream of TILs, [sign up for my newsletter](https://crafty-builder-6996.ck.page/e169c61186).
_1470 TILs and counting..._
_1471 TILs and counting..._
---
@@ -1386,6 +1386,7 @@ _1470 TILs and counting..._
- [Command Line Length Limitations](unix/command-line-length-limitations.md)
- [Compare Two Variables In A Bash Script](unix/compare-two-variables-in-a-bash-script.md)
- [Configure cd To Behave Like pushd In Zsh](unix/configure-cd-to-behave-like-pushd-in-zsh.md)
- [Convert JPEG To PNG With ffmpeg](unix/convert-jpeg-to-png-with-ffmpeg.md)
- [Convert SVG To Favicon](unix/convert-svg-to-favicon.md)
- [Copying File Contents To System Paste Buffer](unix/copying-file-contents-to-system-paste-buffer.md)
- [Copying Nested Directories With Ditto](unix/copying-nested-directories-with-ditto.md)

View File

@@ -5,6 +5,8 @@ an array-like object with all of the arguments to the function. Even if not
all of the arguments are referenced in the function signature, they can
still be accessed via the `arguments` object.
> For ES6+ compatibility, the `spread` operator used via [rest parameters](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Functions/rest_parameters) is preferred over the `arugments` object when accessing an abritrary number of function arguments.
```javascript
function argTest(one) {
console.log(one);

View File

@@ -0,0 +1,20 @@
# Convert JPEG To PNG With ffmpeg
The `ffmpeg` utility "is a universal media converter." That means we can use it
to convert, for instance, a JPEG file to a PNG file.
There is not a lot to a conversion like this. We use `-i` to specify the
existing input file (a JPEG) and then the other argument is the name and
extension of the output file.
```bash
$ ls
profile.jpg
$ ffmpeg -i profile.jpg profile.png
$ ls
profile.jpg profile.png
```
See `man ffmpeg` for more details.