Blog posts tagged "til"
-
Array.prototype.reduce and the optional initial value
Today I learned about the subtlety of the optional initialValue parameter for the Array prototype's reduce method in JavaScript.
-
Using ARG in a Dockerfile - beware the gotcha
Learning about the subtle gotcha with ARG and FROM instruction ordering in Dockerfile definitions.
-
Controlling automatic HTTP requests in CAP Node.js design time loops
Controlling automatic HTTP requests during CAP Node.js design time development loops.
-
Using @cap-js/sqlite in CF for your CAP services
Using the cap-js/sqlite package in Cloud Foundry for lightweight CAP service deployments.
-
Running non-production CAP services in CF
Running non-production CAP services in Cloud Foundry without the overhead of production infrastructure.
-
Easily add an explicit cds.requires.db to your CAP project's package.json
Using jq to easily add an explicit cds.requires.db entry to a CAP project's package.json.
-
Avoid design time CAP server restarts when maintaining local data files
Avoiding unnecessary CAP server restarts when maintaining local CSV data files during design time.
-
TIL - Two Tmux Plugin Manager features
Discovering two useful Tmux Plugin Manager features while revisiting my working environment setup.
-
Bash shell expansion inside double quotes
Exploring which Bash shell expansions still work inside double quotes in the context of an API challenge.
-
Bash notes 3
Discovering more Bash language features from community solutions to Exercism exercises.
-
Bash notes 2
Picking up more Bash insights from Exercism solutions including case statement features.
-
Bash notes
Learning a few things from reading through a neat solution to a Bash track exercise in Exercism.
-
Controlling Chrome from the CLI
Using the chrome-cli tool to open URLs in different tabs from the command line.
-
Sourcing vs executing in Bash
Checking the value of $0 to determine whether to source rather than execute a script.
-
Today's TIL trio
Three mini TILs from today on minimum JSON, using tee, and netstat options.
-
Reopening pull requests and GITHUB_ACTOR
The GITHUB_ACTOR on a re-opened pull request reflects the person re-opening it, not the original creator.
-
New tmux panes and windows in the right directory
How to be in the right directory when creating a new window or pane in tmux.
-
Aborting a script with parameter expansion
Using the :? form of shell parameter expansion to abort a script if a required parameter value is not set.
-
Columnar layout with AWK
A breakdown of a simple AWK script to format values into neatly aligned columns.
-
Implicit values in Bash for loop construct
Bash's for loop construct can use implicit values by iterating over the positional parameters when no list is specified.
-
Case modification operators in parameter substitution
In addition to the usual ways of uppercasing strings, Bash 4 brought case modification operators to the parameter substitution family.
-
MID$ and shell parameter expansion
The rich and varied abilities in Bash for accessing and manipulating values in variables through shell parameter expansion.
-
Understanding declare
Exploring the Bash builtin declare, its relationship to typeset and local, and how it can be used to set variable attributes.
-
Desnowballification with set -o errexit
Using set -o errexit at the start of scripts to make them more robust and prevent error snowballing.
-
curl and multipart/form-data
Discovering how curl handles multipart/form-data including reading from standard input.
-
Checking a command is available before use
Learning a useful pattern for checking whether a command is available before using it.
-
Using exec to jump
Exploring how the exec builtin in Bash replaces the current process with a new one.
-
Shell parameter expansion with :+ is useful
Using the shell parameter expansion form :+ for expanding optional values.
-
You can mask sensitive hostnames with wildcards and host aliases
The HOSTALIASES feature works well when combined with wildcard host definitions in SSH config to mask sensitive hostnames.
-
The open square bracket [ is an executable
In a shell script, the open square bracket symbol is not syntax but an executable.
-
Why we have /bin/ and /usr/bin/
The simple historic reason why Unix systems have both /bin/ and /usr/bin/ directories.
-
String.prototype.replace() can take a function
You can use a function to dynamically provide the replacement value in a JavaScript replace operation.
-
continue-on-error can prevent a job step failure causing an action failure
Using continue-on-error in a GitHub Actions job spec to prevent failures from being flagged when a job step fails.
-
git diff can emit different exit codes
Combining git diff exit codes and the POSIX negation operator to control GitHub Actions job step execution based on git changes.
-
In an mta.yaml file you can use the service-name parameter to point to an existing resource
In mta.yaml files you can use the service-name parameter to point to an existing service instance with a different name than the resource.
-
Terminal Tip: a CF remote monitor script
Building a script to find and remotely monitor an ongoing Cloud Foundry multi-target app deployment.
-
Terminal Tip: remotely monitor a CF deployment
Remotely monitoring an ongoing Cloud Foundry MTA deployment from the terminal.
-
Terminal Tip: switching CF targets
Switching between Cloud Foundry targets efficiently from the command line.
-
Terminal Tip: parsing CF app logs
Parsing Cloud Foundry application log output with shell tools for better readability.
-
Terminal Tip: truncating CF output
Truncating wide Cloud Foundry CLI output to make it more readable in the terminal.
-
Excluding with vim's wildignore
Getting the wildignore setting to work properly in vim for excluding directories like node_modules from file searches.
-
Moving between Mozilla tabs with the keyboard
An answer to my question on keyboard controllable Mozilal features.
-
Top tip
On falling down the stairs.
-
ETag-enabled wget
Adding ETag awareness to the venerable wget utility.
See all tags.