{"id":22703472,"url":"https://github.com/iharkatkavets/terminal-snippets","last_synced_at":"2025-06-30T20:01:58.940Z","repository":{"id":65775263,"uuid":"77276296","full_name":"iharkatkavets/terminal-snippets","owner":"iharkatkavets","description":"Useful snippets","archived":false,"fork":false,"pushed_at":"2025-04-03T19:14:34.000Z","size":1062,"stargazers_count":14,"open_issues_count":0,"forks_count":3,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-04-10T05:46:52.970Z","etag":null,"topics":["bash","ipa","shortcuts","snippets-collection","xcode"],"latest_commit_sha":null,"homepage":"","language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/iharkatkavets.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2016-12-24T09:38:38.000Z","updated_at":"2025-04-03T19:14:38.000Z","dependencies_parsed_at":"2024-02-11T18:26:46.348Z","dependency_job_id":"063d1e41-8419-4e6a-8e40-bcebd6a3fa7c","html_url":"https://github.com/iharkatkavets/terminal-snippets","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/iharkatkavets%2Fterminal-snippets","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/iharkatkavets%2Fterminal-snippets/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/iharkatkavets%2Fterminal-snippets/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/iharkatkavets%2Fterminal-snippets/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/iharkatkavets","download_url":"https://codeload.github.com/iharkatkavets/terminal-snippets/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248691344,"owners_count":21146335,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["bash","ipa","shortcuts","snippets-collection","xcode"],"created_at":"2024-12-10T08:10:56.692Z","updated_at":"2025-04-13T09:35:46.722Z","avatar_url":"https://github.com/iharkatkavets.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# 💻 Terminal Snippets\n\n\nVariables\n\nStrip the directory path from a shell variable string and leave the last part of the path (the filename)\n```\n$ FILE=${PATHTOFILE##*/}\n```\nStrip the file name from a shell variable string and leave the dir part of the path\n```\n$ DIR=${PATHTOFILE%/*}\n```\n\n### Ediff shortcuts\n\u003cdetails\u003e\n  \u003csummary\u003eEdiff shortcuts expand\u003c/summary\u003e\n\n  `a` - apply changes from buffer A\u003cbr\u003e\n  `b` - apply changes from buffer B\u003cbr\u003e\n  `d` - keep both variants (A+B)\u003cbr\u003e\n  `n` - show next changes\u003cbr\u003e\n  `p` - show previous changes\u003cbr\u003e\n  `r` - recover the original difference region in buffer C\u003cbr\u003e\n  `C-x o` - change focused buffer window\u003cbr\u003e\n  `v` - scroll bottom\u003cbr\u003e\n  `M-v` - scroll up\u003cbr\u003e\n  `q` - end ediffing\u003cbr\u003e\n\u003c/details\u003e\n\n---\n\n\u003cdetails\u003e\n  \u003csummary\u003e$ base64\u003c/summary\u003e\n  \n    $ base64 -i IN_FILE_PATH -o OUT_FILE_PATH\n   Examples\u003cbr\u003e\n     \n    $ base64 -i CertificateSigningRequest.certSigningRequest -o encodedbase64.txt\n\n   Encode string\u003cbr\u003e\n     \n     $ base64 -D \u003c\u003c\u003c STRING\n   \n    `base64 \u003c\u003c\u003c LS0tLS1CRUdJTiBDRVJUSUZJ`\n    \n    `$ base64 -D \u003c\u003c\u003c STRING`\n    Decode string\u003cbr\u003e\n   `base64 -D \u003c\u003c\u003c LS0tLS1CRUdJTiBDRVJUSUZJ== \u003e file.bin`\n\u003c/details\u003e\n\n---\n  \n\u003cdetails\u003e\n  \u003csummary\u003e$ convert\u003c/summary\u003e\n  \n   Resize the image \u003cbr/\u003e\n    ```$ convert image.png -resize 33% resized.png ``` \u003cbr/\u003e\n\u003c/details\u003e\n      \n---\n  \n\u003cdetails\u003e\n  \u003csummary\u003e$ echo\u003c/summary\u003e\n\n   List all files matching pattern in current directory\u003cbr\u003e\n     \n     $ echo *.txt\n     $ echo .*\n\u003c/details\u003e\n\n---\n\n\u003cdetails\u003e\n\u003csummary\u003e$ git\u003c/summary\u003e\n    \n  Clean up submodules\n  ```bash \n  $ git submodule foreach --recursive git clean -xfd\n  $ git submodule update -f --init --recursive --remote\n  ```\n  Cherry pick diffs which are contained only in the `ANY_BRANCH`\n  ```bash\n  $ git cherry -v master ANY_BRANCH \u003e only-feature-chages.txt\n  $ git cherry-pick 64f0e89e718aa034704c5895f9de858afae9da97 f415a7d8c1599021761bab852109ef6389918...\n  $ git status\n  $ git cherry-pick --continue\n  ```\n  Git find \"string\" in the history of diffs\n  ```bash\n  $ git log -p -S string_for_searching\n  ```\n  Git print diff between mybranch and master in the file 'myfile.cs'\n  ```\n  $ git diff mybranch..master -- myfile.cs\n  ```\n  Find the file in the history\n  ```\n  $ git log --all --name-status  -- \"**/filename.*\"\n  ```\n  Show the file changes in the commit \n  ```\n  $ git show \u003cSHA\u003e -- \u003cpath-to-file\u003e\n  ```\n  Restore the file in the working copy\n  ```\n  $ git checkout \u003cSHA\u003e^ -- \u003cpath-to-file\u003e\n  ```\n  Apply reverted changes from a commit\n  ```bash\n  $ git show \u003cSHA\u003e -- \u003cpath-to-file\u003e | git apply -3 --whitespace=fix -R\n  ```\n  Add custom ssh identity file to the repository\n  ```bash\n  $ git config core.sshCommand \"ssh -i ~/.ssh/not_default_id_rsa -F /dev/null\"\n  ```\n  Log all particular file commits\n  ```bash\n  $ git log --follow -- FILE_PATH\n  ```\n  Revert 3 last commits in with one commit\n  ```\n  $ git revert --no-commit HEAD~3..\n  ```\n  Use custom key\n  ```bash\n  git -c core.sshCommand=\"ssh -i ~/.ssh/mycustomkey\" pull\n  ```\n\u003c/details\u003e\n  \n\n---\n\n\u003cdetails\u003e\n  \u003csummary\u003e$ hexdump\u003c/summary\u003e\n  \n  Generate 16 `hex` bytes\u003cbr\u003e\n  ```\n  hexdump -vn16 -e'4/4 \"%08X\" 1 \"\\n\"' /dev/urandom\n  ```\n\u003c/details\u003e\n\n\n## Bash\n### Files editing \nDisplay file changes in real time \u003cbr/\u003e\n```$ tail -f FILE``` \u003cbr/\u003e\nRemove new line and escape \" symbols in the file \u003cbr/\u003e\n```$ cat ORIGINFILE.TXT | tr -d '\\n' | sed 's/\"/\\\\\"/g' \u003e NEWFILE.TXT``` \u003cbr/\u003e\nFind a string recursively at path \u003cbr/\u003e\n```$ grep -ir SEARCHABLE_STRING PATH``` \u003cbr/\u003e\n```$ grep -A NUMBER_OF_LINES_AFTER -ir SEARCHABLE_STRING PATH```\u003cbr/\u003e\nCreate a file from hex string \u003cbr/\u003e\n```$ writehex 8ade18f6 00000001 00000000 51aabd81 \u003e FILENAME.EXT``` \u003cbr/\u003e\nСount characters in string \u003cbr/\u003e\n```$ echo 'abc...1235abc..' | wc -c``` \u003cbr/\u003e\n\n### $ zip\n`$ zip -er ZIP.zip file1 dir1 file2` - Zip files with password protecting \u003cbr/\u003e\n\nzip files in directory with the same name as parent dir\n```bash\n$ zip -erv \"$(basename `pwd`).zip\" production.*\n$ Enter password:\n$ Verify password:\n$ rsync -v \"$(basename `pwd`).zip\" USER_NAME@SERVER:PATH \u0026\u0026 rm -rvf \"$(basename `pwd`).zip\"\n$ Password:\n```\n  \n  \n  \u003cdetails\u003e\n  \u003csummary\u003e$ swiftc\u003c/summary\u003e\n  \n   Compilte swift file with generating dSym file \u003cbr/\u003e\n    ```$ swiftc -g file.swift``` \u003cbr/\u003e\n   Run executable using lldb debugger\u003cbr/\u003e\n    ```$ lldb file``` \u003cbr/\u003e\n   Load dSym file \u003cbr/\u003e\n    ```(lldb) add-dsym \u003cPathTo.dSYM\u003e``` \u003cbr/\u003e\n   Print backtrace \u003cbr/\u003e\n    ```(lldb) thread backtrace``` \u003cbr/\u003e\n\u003c/details\u003e\n      \n---\n\n\u003cdetails\u003e\n  \u003csummary\u003e$ find\u003c/summary\u003e\n  \n   Find files matched pattern `*.ipa` and extract to directory named `filename.unz` \u003cbr/\u003e\n    ```$ find . -name '*.ipa' -exec sh -c 'unzip -d `basename {}`.unz {}' \\; ``` \u003cbr/\u003e\n   Find files with matched patterh `*.txt` and copy to CGL-28825 directory \u003cbr/\u003e\n    `$ find ./UnitTests/ -name '*.txt' -exec sh -c 'cp {} CGL-28825/{}' \\; ` \u003cbr/\u003e\n   Find duplicated files in the directory \u003cbr\u003e\n    `$ find . ! -empty -type f -exec md5 {} + | sort | uniq -d` \u003cbr/\u003e\n   Find in current folder the folders that were modified 182 days ago and delete them \u003cbr/\u003e\n    `$ find ./ -maxdepth 1 -type d -ctime +182 -exec rm -rfv {} \\;` \u003cbr/\u003e\n   Find in current folder PNG images and remove alpha channel. Adds white color to background. Overwrites!\u003cbr/\u003e\n    `$ find . -name '*.png' -exec sh -c 'convert {} -background white -alpha remove -alpha off {}' \\;` \u003cbr/\u003e\n   Find all Info.plist files and add new boolean false value \u003cbr/\u003e\n    `$ find ./ -name Info.plist -exec sh -c '/usr/libexec/PlistBuddy -c \"Add :test bool false\" {}'  \\;` \u003cbr/\u003e\n    `$ find ./ -name Info.plist -exec sh -c '/usr/libexec/PlistBuddy -c \"Add :my_key string \\\"\\\"\" {}' \\;` \u003cbr/\u003e\n   Find example \u003cbr/\u003e\n    `$ find ./ -type f -name '*.xib' -exec sed -i '' -e 's/\u003cdevice[a-z=\\\"0-9_ ]*\\/\u003e/\u003cdevice id=\\\"appleTV\\\" appearance=\\\"light\\\"\\/\u003e/g' {} +` \u003cbr/\u003e\n    Resize *\\*.png* images to size 800x600 and append to new file suffix 800x600.png\u003cbr/\u003e\n    `$ find ./ -name '*.png' -exec sh -c 'convert {} -resize 800x600! {}%.*_800x600.png' \\;`\n    Find in `Info.plist` file and print 1 line *A*fter\u003cbr/\u003e\n    `$ find ./ios/ -name 'Info.plist' -exec sh -c 'grep -A 1 -ir receiver_id {}' \\;`\u003cbr/\u003e\n    Find unique files in directory and copy in another\u003cbr/\u003e\n    ```$ find ./ -type f -exec md5sum {} + | sort | awk '!c[substr($0, 1, 32)]++' | awk '{print $2}' | xargs -I _ cp _ another_dir```\u003cbr/\u003e\n    Find file in the current directory which contains the multiple strings STR1,STR2,STR3\u003cbr/\u003e\n    ```$find ./ -type f -exec grep -l 'STR1' {} \\; | xargs grep -l 'STR2' | xargs grep -l 'STR3' ```\n\u003c/details\u003e\n      \n---\n\n\u003cdetails\u003e\n  \u003csummary\u003e$ ls\u003c/summary\u003e\n  \n   list files in one line \u003cbr/\u003e\n    ```$ ls | tr \"\\n\" \" \"\n    ```\u003cbr/\u003e\n\u003c/details\u003e\n\n---\n\n\u003cdetails\u003e\n  \u003csummary\u003e$ jq\u003c/summary\u003e\n  \n   Remove new lines from json \u003cbr/\u003e\n    ```$ jq -c .\n    ```\u003cbr/\u003e\n   Pretty print JSON \u003cbr/\u003e\n    ```$ jq '.'\n    ```\n\u003c/details\u003e\n\n---\n\n\u003cdetails\u003e\n  \u003csummary\u003e$ sed\u003c/summary\u003e\n  \n  Find all \\*.txt files in dir and execute sed without backuping \u003cbr\u003e\n  ```bash\n  $ find ./UnitTests/ -type f -name '*.txt' -exec sed -i '' -e 's/video_url_android/dash/g' {} +\n  ```\n  Extract minor number from version\n  ```bash\n  $ echo '1.2.3' | sed 's/\\([0-9]\\).[0-9].[0-9]/\\1/'\n  ```\n  Extract substring `\"Bench press\"` from a string `\"title\": \"Bench press\"` \n  ```bash\n  $ echo '\"title\": \"Bench press\"' | sed -ne 's/\"title\": \\([a-z]+\\)*//p'\n  ```\n  |   |   |   |\n  |---|---|---|\n  |`[[:space:]]*`|match the whitespace characters `\u003ctab\u003e` and `\u003cspace\u003e`|   |\n  |   |   |   |\n  |   |   |   |\n  \n  Extract version from `podspec` file\n  ```bash\n  $ sed -rn \"s/.*([0-9]+\\.[0-9]+\\.[0-9]+).*/\\1/p\" [FILE].podspec\n  ```\n  Replace string from the stdin input\n  ```bash\n  $ sed 's/\\\u0026amp;/\\\u0026/g'\n  ```\n  Replace digits A0 to \"A0\",\n  ```bash\n  $ pbpaste| sed 's/\\([0-9A-F][0-9A-F]\\) /\"\\1\",/g'\n  ```\n  ```\n  $ pbpaste| sed 's/\\([0-9A-F]\\{2,3\\}\\)[[:space:]]\\{0,1\\}/\"\\1\",/g'\n  ```\n  Convert md5 sum string to list of bytes in hex format\n  ```bash\n  md5 -q Tests/Resources/1Mb | sed 's/\\([0-9a-z][0-9a-z]\\)/0x\\1,/g'\n  ```\n\u003c/details\u003e\n\n---\n\n\u003cdetails\u003e\n  \u003csummary\u003e$ top\u003c/summary\u003e\n  \n   Run `top` in non-interactive(batch) mode \u003cbr/\u003e\n    ```$ top -l 1``` \u003cbr/\u003e\n\u003c/details\u003e\n\n---\n\n\u003cdetails\u003e\n  \u003csummary\u003e$ clang\u003c/summary\u003e\n  \n   Compile single `main.m` file to executable `prog` \u003cbr/\u003e\n    ```$ clang -fobjc-arc main.m -o prog1``` \u003cbr/\u003e\n\u003c/details\u003e\n\n---\n\n\u003cdetails\u003e\n  \u003csummary\u003e$ printf\u003c/summary\u003e\n  \n   Tool for formatted output \u003cbr/\u003e\n    ```$ printf '%-10.10s = %4.2f\\n' 'Gigahertz' 1.92735``` \u003cbr/\u003e\n\u003c/details\u003e\n\n---\n\n\u003cdetails\u003e\n  \u003csummary\u003e$ curl\u003c/summary\u003e\n  \n   Download and find and count occurances of `regex_pattern` in response (by adding new line `\\\\\\n`)\n   ```bash\n   $ curl  -v --silent 'http://awesome.com' 2\u003e\u00261 | sed $'s/regex_pattern/regex_pattern\\\\\\n/g' | grep -c 'regex_pattern'\n   ```\n   An example with query parameters \u003cbr/\u003e\n   ```bash\n   curl -X POST -H \"Accept: application/json\" -H \"Authorization: Basic xxxxxxxx\" -H \"Content-Type: application/x-www-form-urlencoded\" --data          'grant_type=clone\u0026refresh_token=xxx-xxx\u0026scope=client'  'https://SERVER_URL'\n   ```\n\u003c/details\u003e\n\n---\n\n\u003cdetails\u003e\n  \u003csummary\u003e$ grep\u003c/summary\u003e\n  \n   Extract substring from string:\n   ```bash\n   $ grep -o -E '^[H](H|T|t)+-[0-9]{4}'\n   ```\n   Extract `123` from `versionCode 123`\n   ```bash\n   $ cat build.gradle | grep 'versionCode ' | grep -o -E '[0-9]+'\n   ```\n   Extract `\"1.2.3\"` from `versionName \"1.2.3\"`\n   ```bash\n   $ cat build.gradle | grep 'versionName ' | grep -o -E '\\\"[0-9].[0-9].[0-9]\\\"'\n   ```\n   Extract URL from `file`\n   ```bash\n   $ grep -o -E 'https://url.com/[?=;\u0026_a-z0-9-]+' ../photos.txt\n   ```\n   Exclude directories during search\n   ```bash\n   $ grep --exclude-dir=Pods --exclude-dir=fastlane -ir 'https://' ./\n   ```\n   Find multiple patterns\n   ```\n   $ grep -e 'pattern1' -e 'pattern2' file\n   ```\n\u003c/details\u003e\n\n---\n\n\u003cdetails\u003e\n  \u003csummary\u003e$ nc\u003c/summary\u003e\n  \n   Establish socket connection\n   ```bash\n   nc IP PORT \n   ```\n\u003c/details\u003e\n\n---\n\n\u003cdetails\u003e\n  \u003csummary\u003e$ telnet\u003c/summary\u003e\n  \n   Establish socket connection\n   ```bash\n   telnet IP PORT \n   ```\n\u003c/details\u003e\n\n---\n\n\u003cdetails\u003e\n  \u003csummary\u003e$ nettop\u003c/summary\u003e\n  \n   Listen the socket connection created by process with PID\n   ```bash\n   nettop -n -p PID\n   ```\n\u003c/details\u003e\n\n---\n\n\u003cdetails\u003e\n  \u003csummary\u003e$ venv\u003c/summary\u003e\n  \n   Create python virtual envrironment\n   ```bash\n   python3 -m venv venv\n   ```\n   Activate virtual environment\n   ```bash\n  source env/bin/activate\n  ```\n  Stop virtual environment\n  ```bash\n  deactivate\n  ```\n\u003c/details\u003e\n\n---\n\n### $ rsync\nSync images(png, PNG, jpg, JPG)  in 2 local folders\n```bash\n$  rsync -r --include=\"*.[Jj][Pp][Gg]\" --include=\"*.[Pp][Nn][Gg]\" --include=\"*/\" --exclude=\"*\" -av --progress FromDir1/ ToDir2/\n```\n\n\n### Formatting\nPretty print JSON string\n```bash\n$ echo '{\"foo\": \"lorem\", \"bar\": \"ipsum\"}' | python -m json.tool\n```\n```bash\necho $(python3 -c \"import sys,json; print(json.load(sys.stdin)['fields']['summary'])\" \u003c\u003c\u003c ${RESPONSE})\n```\nPretty print XML string\n```bash\n$ echo '\u003croot\u003e\u003cfoo a=\"b\"\u003elorem\u003c/foo\u003e\u003cbar value=\"ipsum\" /\u003e\u003c/root\u003e' | xmllint --format -\n```\n\n\n### Emacs\n`select region then M-| pbcopy RET` - copy from Emacs to OS X clipboard\u003cbr/\u003e\n`M-x hexl-find-file` - editing binary files (`delete-window`)\u003cbr/\u003e\n`M-x hexl-mode` - translate an existing buffer into hex\u003cbr/\u003e\n\n### Git-Emacs\n`m` - mark the file the cursor is on ATM\u003cbr/\u003e\n`M` - mark all files in buffer\u003cbr/\u003e\n`u/DEL` - unmark file below/above\u003cbr/\u003e\n`R` - resolve conflicts during merge\u003cbr/\u003e\n`a` - add file to repository\u003cbr/\u003e\n`r` - remove file\u003cbr/\u003e\n`i` - add file to ignore list\u003cbr/\u003e\n`c` - commit\u003cbr/\u003e\n`U` - Undo -\u003e revert file\u003cbr/\u003e\n`l` - see log file\u003cbr/\u003e\n`g` - refresh the status buffer\u003cbr/\u003e\n`q` - quit status buffer\u003cbr/\u003e\n`?` - get help!\u003cbr/\u003e\n\n### Emacs-Magit\n\n\u003cdetails\u003e\n  \u003csummary\u003eEmacs-Magit\u003c/summary\u003e\n\n  `M-x magit-process-buffer` - to show the output of recently run git commands\u003cbr\u003e\n  `M-x magit-section-cycle-diffs` - to expand all diffs\u003cbr\u003e\n  `l-l b-b` - checkout selected commit in history\u003cbr\u003e\n\u003c/details\u003e\n\n### Midnight Commander\n`ESC+o` - open directory in another panel \n\n### Xcode. Setup template commands\nRename class prefix occurances in the folder.\n``` bash\n$ find ./ -type f -exec sed -i \"\" -e 's/CLConfirmLogout/___VARIABLE_productName:identifier___/g' {} \\;\n```\n\n## Xcode debugger\n### Update view on debug\n```objective-c\n// stash a view (0x7f84c74ca870 address)\n(lldb) e UIView *$cell = (UIView *)[0x7f84c74ca870 superview]\n// set a new frame\n(lldb) e (void)[$cell setFrame:(CGRect){0.f, 324.f, 10.f, 54.f}]\n// set a new frame\n(lldb) e (void)[$cell setFrame:(CGRect){0.f, 324.f, 10.f, 54.f}]\n// update\n(lldb) caflush frame\n```\n\n### Examining Variables\nShow the contents of the local variable bar formatted as hex.\n```\n(lldb) frame variable --format x bar\n(lldb) fr v -f x bar\n```\n\n### FFMPEG\nCut video of [duration]\n```bash\n$ ffmpeg -ss [start] -i in.mp4 -t [duration] -c copy out.mp4\n```\n\nCreate gif image from movie\n```\n$ ffmpeg -ss 30 -t 3 -i input.mp4 -vf \"fps=10,scale=320:-1:flags=lanczos,split[s0][s1];[s0]palettegen[p];[s1][p]paletteuse\" -loop 0 output.gif\n```\n```\nffmpeg -ss 00:00:39.000 -i Screen\\ Recording\\ .mov -pix_fmt rgb24 -r 10 -s 320x240 -t 00:00:10.000 output.gif\n```\n* This example will skip the first 30 seconds (-ss 30) of the input and create a 3 second output (-t 3).\n* fps filter sets the frame rate. A rate of 10 frames per second is used in the example.\n* scale filter will resize the output to 320 pixels wide and automatically determine the height while preserving the aspect ratio. The lanczos scaling algorithm is used in this example.\n* palettegen and paletteuse filters will generate and use a custom palette generated from your input. These filters have many options, so refer to the links for a list of all available options and values. Also see the Advanced options section below.\n* split filter will allow everything to be done in one command and avoids having to create a temporary PNG file of the palette.\n* Control looping with -loop output option but the values are confusing. A value of 0 is infinite looping, -1 is no looping, and 1 will loop once meaning it will play twice. So a value of 10 will cause the GIF to play 11 times.\nMore info http://blog.pkh.me/p/21-high-quality-gif-with-ffmpeg.html\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fiharkatkavets%2Fterminal-snippets","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fiharkatkavets%2Fterminal-snippets","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fiharkatkavets%2Fterminal-snippets/lists"}