Authenticating your Npm CLI
Npm has recently been making a lot of changes around package publish security because of recent supply-chain attacks targeting Npm.
What does this mean for the lonely dev self-publishing packages from their local CLI?
Npm has recently been making a lot of changes around package publish security because of recent supply-chain attacks targeting Npm.
What does this mean for the lonely dev self-publishing packages from their local CLI?
For a long time I, someone on my team, would wait for backend pipelines to finish before manually publishing deploys from Netlify. I finally automated it: here's how! (If you have auto-publish turned on for your production deploys, you don't need this.)
This how to enable up/down arrow auto-complete navigation instead of basic history navigation, without installing plugins.
nano ~/.inputrc
Paste in:
"\e[A": history-search-backward
"\e[B": history-search-forward
Run:
bind -f ~/.inputrc
Put the following into your ~/.zshrc:
autoload -Uz up-line-or-beginning-search down-line-or-beginning-search
zle -N up-line-or-beginning-search
zle -N down-line-or-beginning-search
bindkey '^[[A' up-line-or-beginning-search # Up arrow
bindkey '^[[B' down-line-or-beginning-search # Down arrow
To run cron jobs with your user env so that it's actually possible for them to run anything, add this to the top of your cron file (edit with crontab -e):
SHELL=/bin/bash
HOME=/home/<username>
BASH_ENV=$HOME/.bashrc
Then look at your ~/.bashrc file and make sure to remove any code (usually at the top) that exits early if found in a non-interactive shell.
The tools we use as developers make us more effective (or at least hopefully faster) developers. So why not spend some time to make one of the most common dev tools much more useful? Here's a way to give any terminal app a personalized and awesome experience (fwiw I use the default app included with macOS). Features covered will be the following:
A simple script:
grep -rl '<search-string>' <search/dir> | xargs code -r
Between two different directories:
cd <first-path> && grep -rl '<search-string>' <search/dir> | (cd <second-path>; xargs code -r)
ffmpeg -i video.mp4 -c:v libvpx -crf 30 -b:v 0 -c:a libvorbis video.webm