til icon indicating copy to clipboard operation
til copied to clipboard

Today I Learned: collection of notes, tips and tricks and stuff I learn from day to day working with computers and technology as an open source contributor and product manager

Today I Learned

Markdownlint Action Status Badge Spellcheck Action Status Badge

Table of Contents

  • Categories
    • ack - an alternative to grep
    • afplay - play audio files from the commandline on macOS
    • ag - also known as the Silversurfer, fast alternative to ack and grep
    • Bash - the Bourne Again Shell
    • Bootstrap - web framework for fast prototyping
    • Bruno - an alternative to Postman
    • carton - tools for handling Perl distributions and dependencies local to a project
    • chezmoi - dot filer manager
    • chrome - browser also known as chromium
    • clang - project for tools for building C, C++ and Objective-C
    • colortail - colorful variation of tail
    • CPAN - Perl packages and distributions repository
    • cpanm - a fast CPAN module installer
    • cpm - alternative to cpanm
    • crates - Rust packages
    • cron - schedule and repeat jobs
    • css - cascading style sheets, used for styling HTML
    • curl - a commandline tool for transferring data with URL syntax
    • Dash.app - an alternative browser to the built-in documentation in macOS and other resources
    • date - see dates and time on the command line
    • Debian - popular Linux distribution
    • diff-so-fancy - a diff alternative
    • DigitalOcean - a hosting provider, caring about open source
    • Docker - containerization
    • DockerHub - a repository for Docker images
    • Dropbox - a cloud storage provider, integrates well with macOS
    • dzil - Dist::Zilla, a Perl distribution builder
    • EditorConfig - tool for generic text editor configuration
    • entr - run arbitrary commands when files change
    • exa/eza - an alternative to the ls command
    • FileMerge.app - a diff tool for macOS
    • find - find files and directories on the command line
    • Git - version control system
    • git-delta - an commandline diff tool, also known as delta
    • GitHub - platform for hosting Git repositories
    • GitHub Actions - automate your GitHub work and repositories
    • GnuPG - PGP tools, GNU variant
    • Go - compiled programming language
    • grep - see also ag or ack
    • Hacking - No Comment
    • Homebrew - package manager for macOS (and Linux)
    • HTML - HyperText Markup Language
    • httpie - an alternative to curl
    • irssi - for all your IRC needs
    • iTerm.app - an alternative to Terminal.app
    • JavaScript - see also Node.js
    • Jenkins - a continuous integration server
    • Jira - issue tracking and project management
    • jq - a lightweight and flexible command-line JSON processor
    • JSON - see also XML and YAML
    • Kali - a Linux distribution focused on security and penetration testing
    • Liquid Prompt - see also Starship
    • macOS - see OSX
    • Mail.app - the default mail client on macOS
    • Markdown - basic markup language, great for documentation
    • markdownlint - a tool for linting Markdown
    • Mermaid - awesome tool for generating diagrams from text
    • Mojolicious - a Perl web framework
    • MySQL - a relational database
    • Nginx - a webserver, proxy and load-balancer
    • npm - Node.js package manager
    • OpenAPI - a specification for describing RESTful APIs, see also Swagger
    • OpenSSL - a toolkit for SSL and TLS
    • Oracle - a relational database
    • OSX - the operating system for Macs - now known as macOS
    • Perl - Swiss Army Knife of programming languages
    • Perlbrew - a tool for managing multiple Perl installations
    • Perltidy - tidy all your Perl
    • Postgresql - a relational database
    • Programming - general programming tips
    • Probot - a framework for building GitHub Apps
    • Prolog - a logic programming language
    • Python - an interpreted programming language
    • qalc - an easy to use command line calculator
    • Regexp - regular expressions
    • Renovate - a bot for automating dependency updates
    • REST - Representational State Transfer, a popular approach to building APIs
    • rm - remove files and directories on the command line
    • Ruby - an interpreted programming language
    • Rust - a compiled programming language
    • sed - stream editor
    • Shell - general shell tips
    • shellcheck - a linter for shell scripts
    • Slack - a collaboration tool
    • smartcd - a tool for running commands when changing directories
    • Sublime Text 3 - see also VSCode
    • Subversion - do see Git
    • SQL - Structured Query Language
    • SQL Developer - a GUI tool for Oracle
    • SQLite - a lightweight relational database
    • sqlplus - the CLI tool for Oracle
    • SSH - Secure Shell
    • Starship - nifty prompt and an alternative to Liquid Prompt
    • Swagger - tool for describing RESTful APIs, see also OpenAPI
    • Swift - a compiled programming language from Apple
    • tar - a tool for archiving files
    • Terminal.app - do see iTerm.app
    • tldr - Too Long; Didn't Read, so use tldr
    • tmux - an alternative to screen
    • tokei - language statistics - fast
    • Ubuntu - a Linux distribution based on Debian
    • ufw - Uncomplicated Firewall
    • vim - a text editor
    • VSCode / Visual Studio Code
    • VMware Fusion - a virtualization tool for macOS
    • Vue - a JavaScript framework
    • WSL 1/2 - Windows Subsystem for Linux
    • wtf util - a tool for the command line for visualising important information
    • XML - see also YAML and JSON
    • YAML - see also XML and JSON
    • z - for jumping around in the file structures, an alternative to cd
    • zoxide - an alternative to z
    • zsh - another shell than bash
  • About
  • Additional TIL Collections
  • License

Categories

ack - an alternative to grep

  • Install ack
  • Define a custom search filetype scope

afplay - play audio files from the commandline on macOS

  • RTFM

ag - also known as the Silversurfer, fast alternative to ack and grep

  • Use ag

Bash - the Bourne Again Shell

  • Use bash
  • Implement tab completions
  • Inputting danish characters
  • Repeating an executable continuously
  • Slimming history
  • Reading arguments from the command line
  • Copy a file to multiple directories
  • Replace a file in multiple directories
  • Create directory for own bash completions
  • Edit Complex CLI in Editor
  • Use fzf
  • Use Colours In Terminal Output
  • How to get last return value
  • Getting Process-id of a Child Proces
  • Grep STDERR
  • Use Bashmarks
  • Use z
  • Write safe shell scripts
  • Glob expanding to all files in current directory recursively

Bootstrap - web framework for fast prototyping

  • Prevent wrapping of contents of code tags

Bruno - an alternative to Postman

  • Use Bruno

carton - tools for handling Perl distributions and dependencies local to a project

  • Use carton
  • Pass flags to arguments to exec
  • Update snapshot cpanfile
  • Use PERL_CARTON_MIRROR

chezmoi - dot filer manager

  • Install chezmoi
  • Use chezmoi

chrome - browser also known as chromium

  • Add search shortcuts

clang - project for tools for building C, C++ and Objective-C

  • Diagnostic flags in Clang

colortail - colorful variation of tail

  • use colortail

CPAN - Perl packages and distributions repository

  • Use CPAN
  • Data::FormValidator
  • File::Find
  • Test::Pretty
  • Parsing Gitignore
  • Install DateTime::Astro

cpanm - a fast CPAN module installer

  • Use cpanm
  • Use cpanm with cpanfile
  • Use cpanm with Module::Build
  • Use cpanm with CPAN::Mini
  • Use cpanm with carton
  • Tailing cpanm build log file

cpm - alternative to cpanm

  • Use cpm
  • Use cpm with cpanfile

crates - Rust packages

  • colored

cron - schedule and repeat jobs

  • Scheduling with cron

css - cascading style sheets, used for styling HTML

  • Making sure you are using alt tags
  • CSS Properties

curl - a commandline tool for transferring data with URL syntax

  • More POST Parameters
  • Handling shell sensitive characters in URL
  • Pipe output to less
  • Use a cheatsheet
  • Using curl with Graphql server
  • Specify method
  • Get statuscode
  • Handle gzip
  • How to handle location header
  • Ignore self signed certificates

Dash.app - an alternative browser to the built-in documentation in macOS and other resources

  • Query Dash from the CLI

date - see dates and time on the command line

  • Getting time in another timezone

Debian - popular Linux distribution

  • How to enquire version
  • Add user to sudoers group
  • Resolve conflicting values in Debian package
  • Install unauthenticated package
  • Translate release names

diff-so-fancy - a diff alternative

  • use diff-so-fancy
  • One-time Disable of diff-so-fancy for Git

DigitalOcean - a hosting provider, caring about open source

  • Monitor billing
  • Use doctl
  • Serving Static Files From a Go App

Docker - containerization

  • Use Docker
  • Mount shared folder
  • Use shell to inspect filesystem of layer
  • How to read files and stdout from a running docker container
  • Use ctop
  • Define default network addresses used for containers
  • Copy a file from your container to the host operating system
  • Caching Docker build step
  • Show layers of Docker image
  • What is the difference between RUN and CMD
  • Automatically Clean up after Docker Daily
  • Customize your docker ps output
  • Use docker-compose-wait
  • Silence Warnings from Postgres
  • Debugging a b0rken Docker build step
  • exec error
  • Docker on Windows

DockerHub - a repository for Docker images

  • Publish an image to DockerHub
  • Use Long Names for Your Base Images
  • Use hub-tool

Dropbox - a cloud storage provider, integrates well with macOS

  • Download instead of playing multimedia file from Dropbox
  • Ignore certain files

dzil - Dist::Zilla, a Perl distribution builder

  • Make coverage tests
  • Use cpanfile
  • Run a single test

EditorConfig - tool for generic text editor configuration

  • Use EditorConfig
  • Enforce EditorConfig using eclint
  • Perl
  • XML
  • Markdown

entr - run arbitrary commands when files change

  • Run arbitrary commands when files change using entry

exa/eza - an alternative to the ls command

  • Use exa

FileMerge.app - a diff tool for macOS

  • User Filemerge from the commandline

find - find files and directories on the command line

  • Searching Found Files in Found Directories

Git - version control system

  • Resolve conflicts involving binary files
  • Delete local and remote branch
  • Set your email for a repository
  • Delete local and remote tags
  • Create a branch from a tag
  • Correct a commit message
  • Update a branch from master
  • Rename branch
  • Get a cheatsheet
  • Update fork from original repository
  • Tag a specific revision
  • Make a branch new master
  • List merged branches
  • Git Alias to Show Affected Files in Last N Commits
  • Output your branches and tags as a tree on the command line
  • Compare a single file between branches
  • Rollback a repository to a specific commit
  • Avoid being prompted for password
  • Rename a tag
  • Rewrite the last commit message
  • Use Git Repository Viewer: grv
  • Use tig
  • Update submodule
  • Squash merge
  • Maintain Multiple Git Identities
  • Find Out Who Created a Branch
  • See a given file at a given commit
  • Create a branch from an older commit
  • Get Name of Current Branch
  • Use pre-commit
  • Ignore Git

git-delta - an commandline diff tool, also known as delta

  • Use git-delta

GitHub - platform for hosting Git repositories

  • Ignore whitespace changes
  • Test Markdown rendering before making public
  • How to get the email address of a github user
  • Use hub
  • Use emojis
  • GitHub Action Badges
  • Use dependabot
  • Use renovate bot
  • Providing Suggestions in Reviews
  • Use CLI

GitHub Actions - automate your GitHub work and repositories

  • Use spellcheck
  • Use macOS
  • Use EditorConfig
  • Schedule runs
  • Use Dependabot for GitHub Actions
  • Use Dependabot for Docker
  • Use Dependabot for Ruby
  • Use Dependabot for Python
  • Detect What Files Have Changed

GnuPG - PGP tools, GNU variant

  • Homebrew GnuPG vs. GPG Mail

Go - compiled programming language

  • Use Go
  • Learn Go
  • Go Resources
  • Reading Documentation
  • Reading benchmark results
  • Skipping tests
  • Colorful test output
  • Enriched test output
  • How to sleep
  • Test Main Function
  • Get to know the standard library
  • structs
  • Running specific tests
  • Read from STDIN
  • Use gocritic
  • Working with local packages
  • Panic: Flag redefined
  • Multiline strings

grep - see also ag or ack

  • Add colour to grep output

Hacking - No Comment

  • Change password on Window 7 Using Kali Linux
  • Wipe a Hard Drive Using Kali Linux

Homebrew - package manager for macOS (and Linux)

  • Stop brew from calling home
  • Cleaning your homebrew cellar
  • Installing bash
  • Migrate installation
  • Remove tap

HTML - HyperText Markup Language

  • Add and Remove classes using JavaScript
  • Execute JavaScript from a button
  • How Can I Get HTML value using JavaScript

httpie - an alternative to curl

  • Use httpie
  • Using httpie with Graphql server

irssi - for all your IRC needs

  • use irssi
  • Use password authentication on Freenode

iTerm.app - an alternative to Terminal.app

  • Use themes
  • Use it
  • Use triggers

JavaScript - see also Node.js

  • Use JavaScript
  • Learn JavaScript
  • Use a styleguide
  • Beware of eval
  • Default Parameters for Functions
  • Console.log
  • Dynamic properties
  • Format Numbers
  • SyntaxError: Unexpected token o in JSON at position 1

Jenkins - a continuous integration server

  • Use a script for freestyle projects

Jira - issue tracking and project management

  • Get a List of Linked Issues
  • How to escape curly brackets within code tags

jq - a lightweight and flexible command-line JSON processor

  • Use jq
  • Concatenate two fields
  • Sort using jq
  • Count elements
  • Find and Extract object
  • Specify Colours
  • Generate CSV file
  • Convert a number to a string

JSON - see also XML and YAML

  • Beware of eval
  • Check out JSON Schema
  • Prettify JSON on the command line

Kali - a Linux distribution focused on security and penetration testing

  • Set Keyboard Layout

Liquid Prompt - see also Starship

  • Install Liquid Prompt

macOS - see OSX

Mail.app - the default mail client on macOS

  • Mail file from the commandline

Markdown - basic markup language, great for documentation

  • Use Markdown
  • How do I escape a backtick
  • How do I escape a numbersign
  • How do I escape asterisk and other characters
  • Read Markdown in terminal
  • Use Markdownlint

markdownlint - a tool for linting Markdown

  • Issue with enabledrules

Mermaid - awesome tool for generating diagrams from text

  • Diagram with Mermaid

Mojolicious - a Perl web framework

  • Redirecting from one URL to another
  • Setting up a new application
  • Enable logging
  • Mojolicious::Controller respond_to and template parameter
  • Enable syntax highlighting for configuration files
  • Mojolicious::Plugin::Config

MySQL - a relational database

  • Setting the prompt

Nginx - a webserver, proxy and load-balancer

  • Install Nginx
  • Listen on both IPv4 and IPv6
  • Serve static files and proxy
  • Limit served HTTP methods

npm - Node.js package manager

  • Install dependencies from package-lock.json

OpenAPI - a specification for describing RESTful APIs, see also Swagger

  • Validating OpenAPI and Swagger definitions

OpenSSL - a toolkit for SSL and TLS

  • How to get information from a P12 file

Oracle - a relational database

  • Convert string to date
  • ORA-21561: OID generation failed
  • Beware of force for creation
  • How to see Oracle version
  • Executing a function or procedure
  • Comments in tnsnames.ora
  • See grants for a specific user
  • See What a Record Looked Like

OSX - the operating system for Macs - now known as macOS

  • Lock screen shortcuts
  • Speak when long running job is done
  • List available voices for speechsynthesis
  • Set hostname permanently
  • Access iCloud from the cli
  • Install Homebrew
  • Debugging Issues with Dynamic Libraries
  • Uninstall MacPorts
  • Scheduling Timed Jobs
  • Enabling at
  • Playing Sound from the Command Line
  • Keyboard Symbols
  • Use JavaScript
  • Set Default Browser From the Command Line
  • No telnet use netcat
  • What ports are listened on
  • Reset Bluetooth
  • Inspecting dynamic libraries
  • Install OpenSSL using MacPorts
  • Translate Release Names
  • Find timezones
  • Remove backgrounds from images

Perl - Swiss Army Knife of programming languages

  • Use Perl
  • View generated SQL when using DBIx::Class
  • Create Test Coverage Report Using Dist::Zilla
  • Avoid issues with META.yml with Module::Install
  • Install XML::LibXML on MacOS
  • Get ExtUtils::MakeMaker to install in local/ like carton
  • Mojolicious::Plugin::OpenAPI Tutorial
  • Read Input via Pipe
  • Find out if a given Perl distribution is included in core
  • Find out what your perl minimum version requirement is
  • Use cpm
  • Format numbers

Perlbrew - a tool for managing multiple Perl installations

  • Install perlbrew
  • Eliminate compilation warnings on OSX
  • Uninstall perlbrew
  • Install a new perl and clone modules from an existing installation
  • Using perlbrew in Shell scripts

Perltidy - tidy all your Perl

  • Tidy a file inline

Postgresql - a relational database

  • Setting the prompt

Programming - general programming tips

  • Round float to 2 decimals

Probot - a framework for building GitHub Apps

  • Probot: auto-assign
  • Probot: delete merged branch
  • Probot: todo

Prolog - a logic programming language

  • Prolog resources

Python - an interpreted programming language

  • Use Python
  • Old-school string formatting
  • What is wheel
  • How to detect pipe
  • strptime: Convert a string representing date and time to an object
  • strftime: Convert a DateTime object to a string in a given format
  • Zen of Python

qalc - an easy to use command line calculator

  • Calculate Download Time
  • Eliminate Locale Warnings

Regexp - regular expressions

  • Regex Posix

Renovate - a bot for automating dependency updates

  • Use Renovate
  • Use Renovate for Perl
  • Hide the config

REST - Representational State Transfer, a popular approach to building APIs

  • Prototype with dummy APIs
  • Use proper headers
  • Check out OpenAPI
  • Use verbs

rm - remove files and directories on the command line

  • Delete files with names resembling cli options

Ruby - an interpreted programming language

  • Use Ruby
  • Dump objects attributes
  • Use rbenv
  • Use rvm
  • Use bundler
  • ignore in Git

Rust - a compiled programming language

  • Setting Up a Rust Development Environment
  • What is an empty parens
  • Get a Cheatsheet
  • Installing Dependencies
  • Learn Rust
  • Formatting code
  • Declaring a constant

sed - stream editor

  • Test Command Using echo
  • Remove empty lines
  • Remove comments
  • Chaining actions

Shell - general shell tips

  • Suppress Coloring via env
  • Get your shell command explained visually

shellcheck - a linter for shell scripts

  • Use shellcheck
  • Ignore shellcheck error

Slack - a collaboration tool

  • Mark all as read

smartcd - a tool for running commands when changing directories

  • Install smartcd
  • Use smartcd with tabs
  • Silence smartcd

Sublime Text 3 - see also VSCode

  • Set colour scheme per language

Subversion - do see Git

  • Do something with every repository
  • See in what revision a branch was created
  • Use Filemerge as diff tool
  • Use commit message from file

SQL - Structured Query Language

  • Counting NULL and non-NULL values in a single query
  • How to group by month in a year
  • How to query data where you are unsure of the casing

SQL Developer - a GUI tool for Oracle

  • Setting UI fontsize
  • Setting dateformat
  • View Compilation Log
  • Creating folders
  • View text instead of Worksheet

SQLite - a lightweight relational database

  • Emulate schemas
  • Inserting dates
  • Defaulting to now for date
  • VARCHAR is just text

sqlplus - the CLI tool for Oracle

  • Output to a file
  • How to pass hostname and port parameters

SSH - Secure Shell

  • Permissions on SSH folder and files
  • Hardening SSH server

Starship - nifty prompt and an alternative to Liquid Prompt

  • Use Starship
  • Increase Interval for Slow Commands

Swagger - tool for describing RESTful APIs, see also OpenAPI

  • Edit and Validate online

Swift - a compiled programming language from Apple

  • Learn Swift

tar - a tool for archiving files

  • Using tar

Terminal.app - do see iTerm.app

  • Opening files in an application from the command line

tldr - Too Long; Didn't Read, so use tldr

  • use tldr

tmux - an alternative to screen

  • Use tmux
  • Install tmux
  • Standard Layouts
  • Use tmux Resurrect
  • Use tmux plugin manager

tokei - language statistics - fast

  • use tokei

Ubuntu - a Linux distribution based on Debian

  • Install updates via command line
  • How to enquire version
  • Translate release names
  • How to add a user to sudoers
  • How to add a user
  • How to check if a package is installed

ufw - Uncomplicated Firewall

  • Use ufw
  • How to set up ufw
  • Enable or disable IPv6
  • Allow HTTPS
  • Allow HTTP on another port

vim - a text editor

  • Use vim-plug
  • Cannot install vim plugin

VSCode / Visual Studio Code

  • Stop vscode from calling home
  • Integrate vscode with Shell / CLI
  • Synchronize Setttings across machines
  • Use Markdownlint
  • Todo Tree Extension
  • Issue with integrated terminal on macOS
  • Themes

VMware Fusion - a virtualization tool for macOS

  • Install VMware Tools
  • Configure Debian 7

Vue - a JavaScript framework

  • Get Started with Vue

WSL 1/2 - Windows Subsystem for Linux

  • Configure Git
  • Developing in Visual Studio Code
  • Up and Downgrade WSL
  • bashrc not being sourced

wtf util - a tool for the command line for visualising important information

  • Play around with wtf
  • Placing elements

XML - see also YAML and JSON

  • Avoid entity expansion
  • Fast XML/XSD validation on the command line

YAML - see also XML and JSON

  • Learning YAML
  • How to syntax check a YAML file

z - for jumping around in the file structures, an alternative to cd

  • Jumping Around Using z

<a id="zoxide>

zoxide - an alternative to z

  • Use zoxide

zsh - another shell than bash

  • Use zsh
  • Set Environment from File

About

I have for a long time maintained notes in a public wiki, finding the TIL of Josh Branchaud jbranchaud/til was an eye-opener and I immiediately wanted to try it out, so after a few months I have finally set it up.

I plan to migrate my earlier notes, so they are more easily accessible here as TIL snippets, this will be done when I have the time, one TIL at a time :-)

Additional TIL Collections

License

© 2016-2024 jonasbn

This repository is licensed under the MIT license. See LICENSE file for details. Much is lifted from elsewhere and might by copyrighted under other licenses by the respective authors. I will mention this where applicable and I will link to original sources when and if possible.