DJ Adams

Blog posts tagged "til"

  1. 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.

  2. Using ARG in a Dockerfile - beware the gotcha

    Learning about the subtle gotcha with ARG and FROM instruction ordering in Dockerfile definitions.

  3. Controlling automatic HTTP requests in CAP Node.js design time loops

    Controlling automatic HTTP requests during CAP Node.js design time development loops.

  4. Using @cap-js/sqlite in CF for your CAP services

    Using the cap-js/sqlite package in Cloud Foundry for lightweight CAP service deployments.

  5. Running non-production CAP services in CF

    Running non-production CAP services in Cloud Foundry without the overhead of production infrastructure.

  6. 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.

  7. 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.

  8. TIL - Two Tmux Plugin Manager features

    Discovering two useful Tmux Plugin Manager features while revisiting my working environment setup.

  9. Bash shell expansion inside double quotes

    Exploring which Bash shell expansions still work inside double quotes in the context of an API challenge.

  10. Bash notes 3

    Discovering more Bash language features from community solutions to Exercism exercises.

  11. Bash notes 2

    Picking up more Bash insights from Exercism solutions including case statement features.

  12. Bash notes

    Learning a few things from reading through a neat solution to a Bash track exercise in Exercism.

  13. Controlling Chrome from the CLI

    Using the chrome-cli tool to open URLs in different tabs from the command line.

  14. Sourcing vs executing in Bash

    Checking the value of $0 to determine whether to source rather than execute a script.

  15. Today's TIL trio

    Three mini TILs from today on minimum JSON, using tee, and netstat options.

  16. 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.

  17. 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.

  18. 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.

  19. Columnar layout with AWK

    A breakdown of a simple AWK script to format values into neatly aligned columns.

  20. 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.

  21. 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.

  22. MID$ and shell parameter expansion

    The rich and varied abilities in Bash for accessing and manipulating values in variables through shell parameter expansion.

  23. Understanding declare

    Exploring the Bash builtin declare, its relationship to typeset and local, and how it can be used to set variable attributes.

  24. Desnowballification with set -o errexit

    Using set -o errexit at the start of scripts to make them more robust and prevent error snowballing.

  25. curl and multipart/form-data

    Discovering how curl handles multipart/form-data including reading from standard input.

  26. Checking a command is available before use

    Learning a useful pattern for checking whether a command is available before using it.

  27. Using exec to jump

    Exploring how the exec builtin in Bash replaces the current process with a new one.

  28. Shell parameter expansion with :+ is useful

    Using the shell parameter expansion form :+ for expanding optional values.

  29. 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.

  30. The open square bracket [ is an executable

    In a shell script, the open square bracket symbol is not syntax but an executable.

  31. Why we have /bin/ and /usr/bin/

    The simple historic reason why Unix systems have both /bin/ and /usr/bin/ directories.

  32. String.prototype.replace() can take a function

    You can use a function to dynamically provide the replacement value in a JavaScript replace operation.

  33. 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.

  34. 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.

  35. 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.

  36. Terminal Tip: a CF remote monitor script

    Building a script to find and remotely monitor an ongoing Cloud Foundry multi-target app deployment.

  37. Terminal Tip: remotely monitor a CF deployment

    Remotely monitoring an ongoing Cloud Foundry MTA deployment from the terminal.

  38. Terminal Tip: switching CF targets

    Switching between Cloud Foundry targets efficiently from the command line.

  39. Terminal Tip: parsing CF app logs

    Parsing Cloud Foundry application log output with shell tools for better readability.

  40. Terminal Tip: truncating CF output

    Truncating wide Cloud Foundry CLI output to make it more readable in the terminal.

  41. Excluding with vim's wildignore

    Getting the wildignore setting to work properly in vim for excluding directories like node_modules from file searches.

  42. Moving between Mozilla tabs with the keyboard

    An answer to my question on keyboard controllable Mozilal features.

  43. Top tip

    On falling down the stairs.

  44. ETag-enabled wget

    Adding ETag awareness to the venerable wget utility.

See all tags.