cookbook.geuer-pollmann.de
  • Introduction
  • Command line utilities
    • bash scripting
    • cURL command line utility
    • ffmpeg - Processing Media
    • JOSE from the command line
    • jq
    • Misc. command line tools
    • Zettelkasten / Markdown
  • Azure
    • Logging in to Azure
    • Working with the REST API
    • Tracing HTTP requests with Fiddler
    • Upload a file from bash
    • Azure CLI
    • terraform
    • Azure Logic Apps
    • Azure Web Apps
    • Azure Python code snippets
    • SSH keys in ARM
    • Minimal "Azure AD Workload identity federation"
    • Federated credentials from GitHub and GitLab pipelines to Azure
    • Azure Marketplace Metered Billing- Picking the correct ID when submitting usage events
    • Manually submitting values to the Azure Metering API
    • How can a publisher/ISV access the data plane of an Azure managed application?
    • The checkZonePeers API: Is your availability zone "1" equal to my "1"?
    • Token authentication with "Azure Verizon Premium CDN"
    • Getting the right storage container name in a Bicep template
    • Event-sourcing into working memory to improve data access latency
    • Postgrex on Azure - Connecting to Azure PostgreSQL from Elixir
  • Productivity
    • Excel
    • Desktop Setup
    • Time handling and Scheduling
    • Elgato from the shell
    • Typora
Powered by GitBook
On this page
  • Base64 encoding
  • Text encodings
  • Windows / WSL interop
  • git tips
  • Image renaming
Edit on GitHub
  1. Command line utilities

Misc. command line tools

Misc command line tools

PreviousjqNextZettelkasten / Markdown

Last updated 3 years ago

Base64 encoding

  • Without whitespace: base64 --wrap=0

Text encodings

  • Convert ASCII to UTF8: iconv --from-code=ascii --to-code=utf-8

Windows / WSL interop

  • Copy WSL text into the Windows clipboard: echo "Hello äöü" | iconv -f utf-8 -t utf-16le | clip.exe

    • This converts it to UTF16 little endian and pipes it to the Windows clipboard :-)

  • Start a web browser on Windows from WSL: cmd.exe /C "start $( echo "https://github.com/" )"

git tips

chmod +x in git

git update-index --chmod=+x ./sample.sh

Image renaming

Use to extract EXIF metadata, and rename image files.

For example, this renames all images based on the date-taken EXIF metadata

jhead -n%Y-%m-%d--%H-%M-%S_%f *.jpg
  • -n[format-string]

    • %Y-%m-%d Year (4 digit 1980-2036) / month number / day of month

    • %H-%M-%S hour (24h) / minute / second

    • %f original file name

jhead