From: AJ ONeal Date: Sun, 15 Aug 2021 05:10:54 +0000 (+0000) Subject: chore: make Prettier + fix spelling, update upgrade/switch instructions, prefer ale... X-Git-Url: https://git.josue.xyz/?p=webi-installers%2F.git;a=commitdiff_plain;h=dfb477380c1c9118d4e2361ecd26ceedfdb10098 chore: make Prettier + fix spelling, update upgrade/switch instructions, prefer ale to syntastic --- diff --git a/_npm/scripts/install-webi.js b/_npm/scripts/install-webi.js index 0718c1f..e8cf189 100755 --- a/_npm/scripts/install-webi.js +++ b/_npm/scripts/install-webi.js @@ -21,21 +21,20 @@ if (/^win/i.test(os.platform())) { return; } -exec('curl -fsS https://webinstall.dev/webi | bash', function ( - err, - stdout, - stderr -) { - if (err) { - console.error(err); - } - if (stdout) { - console.info(stdout); - } - if (stderr) { - console.error(stderr); +exec( + 'curl -fsS https://webinstall.dev/webi | bash', + function (err, stdout, stderr) { + if (err) { + console.error(err); + } + if (stdout) { + console.info(stdout); + } + if (stderr) { + console.error(stderr); + } } -}); +); /* .then(function () { // nada diff --git a/_webi/frontmarker.js b/_webi/frontmarker.js index 34a2495..ca56721 100644 --- a/_webi/frontmarker.js +++ b/_webi/frontmarker.js @@ -80,8 +80,6 @@ module.exports.parse = parseYamlish; if (require.main === module) { console.info( - parseYamlish( - fs.readFileSync(__dirname + '/../node/README.md', 'utf8') - ) + parseYamlish(fs.readFileSync(__dirname + '/../node/README.md', 'utf8')) ); } diff --git a/_webi/normalize.js b/_webi/normalize.js index 5232c27..1c247f7 100644 --- a/_webi/normalize.js +++ b/_webi/normalize.js @@ -39,7 +39,8 @@ var arches = [ ]; var archMap = { //amd64: /(amd.?64|x64|[_\-]64)/i, - amd64: /(\b|_|amd|(dar)?win(dows)?|mac(os)?|linux|osx|x)64([_\-]?bit)?(\b|_)/i, + amd64: + /(\b|_|amd|(dar)?win(dows)?|mac(os)?|linux|osx|x)64([_\-]?bit)?(\b|_)/i, //x86: /(86)(\b|_)/i, x86: /(\b|_|amd|(dar)?win(dows)?|mac(os)?|linux|osx|x)(86|32)([_\-]?bit)(\b|_)/i, ppc64le: /(\b|_)(ppc64le)/i, diff --git a/_webi/ua-detect.js b/_webi/ua-detect.js index 315046c..6b972cb 100644 --- a/_webi/ua-detect.js +++ b/_webi/ua-detect.js @@ -57,7 +57,7 @@ function getArch(ua) { // quick hack for Apple Silicon M1 // Native: Darwin boomer.local 20.2.0 Darwin Kernel Version 20.2.0: Wed Dec 2 20:40:21 PST 2020; root:xnu-7195.60.75~1/RELEASE_ARM64_T8101 arm64 // Resetta: Darwin boomer.local 20.2.0 Darwin Kernel Version 20.2.0: Wed Dec 2 20:40:21 PST 2020; root:xnu-7195.60.75~1/RELEASE_ARM64_T8101 x86_64 - ua = ua.replace(/xnu-.*RELEASE_[^\s]*/, '') + ua = ua.replace(/xnu-.*RELEASE_[^\s]*/, ''); if (/aarch64|arm64|arm8|armv8/i.test(ua)) { return 'arm64'; } else if (/aarch|arm7|armv7/i.test(ua)) { diff --git a/bat/README.md b/bat/README.md index 090f165..b263334 100644 --- a/bat/README.md +++ b/bat/README.md @@ -35,7 +35,8 @@ Update your `.bashrc`, `.zshrc`, or `.profile` alias cat="bat --style=plain" ``` -For situations in which you must use `cat` exactly, remember that you can escape the alias: +For situations in which you must use `cat` exactly, remember that you can escape +the alias: ```bash \cat foo diff --git a/dotenv-linter/README.md b/dotenv-linter/README.md index 4306f86..30a7140 100644 --- a/dotenv-linter/README.md +++ b/dotenv-linter/README.md @@ -22,8 +22,8 @@ You need to download and install the ## Cheat Sheet -> Dotenv Linter is a lightning-fast check for your `.env` files. -> It can rapidly detect and automatically fix issues. +> Dotenv Linter is a lightning-fast check for your `.env` files. It can rapidly +> detect and automatically fix issues. By default, `dotenv-linter` checks all `.env` files in the current directory: @@ -43,7 +43,8 @@ To lint .env files recursively, use `-r`: dotenv-linter -r ``` -For the complete usage, see the official [Dotenv Linter Usage Guide](https://dotenv-linter.github.io/#/usage). +For the complete usage, see the official +[Dotenv Linter Usage Guide](https://dotenv-linter.github.io/#/usage). ### How to automatically fix errors @@ -53,8 +54,8 @@ Use the `--fix` flag. dotenv-linter --fix ``` -Backup files in the format of `.env_0000000000` will be created by default. -You can use `--no-backup` to skip this. +Backup files in the format of `.env_0000000000` will be created by default. You +can use `--no-backup` to skip this. ### How to toggle linter rules diff --git a/golang/releases.js b/golang/releases.js index a9ad7de..2e8a078 100644 --- a/golang/releases.js +++ b/golang/releases.js @@ -4,7 +4,7 @@ var osMap = { darwin: 'macos' }; var archMap = { - '386': 'x86' + 386: 'x86' }; function getAllReleases(request) { diff --git a/gprox/README.md b/gprox/README.md index f8650bb..ae9e6cf 100644 --- a/gprox/README.md +++ b/gprox/README.md @@ -11,7 +11,13 @@ tagline: | ## Cheat Sheet -`gprox` was built to be a no-dependency development tool for simply proxying HTTPS traffic to a local HTTP endpoint. It was written as a port of [local-ssl-proxy](https://github.com/cameronhunter/local-ssl-proxy), a perfectly good NodeJS app for the same purpose. But the benefit is that you can install `gprox` very simply from `webi` or `go` (if you must), and you dont have to worry at all about NodeJS versions, etc! Plus there isn't any elevated access given to an interpreter you dont know much about if you're using `webi`. +`gprox` was built to be a no-dependency development tool for simply proxying +HTTPS traffic to a local HTTP endpoint. It was written as a port of +[local-ssl-proxy](https://github.com/cameronhunter/local-ssl-proxy), a perfectly +good NodeJS app for the same purpose. But the benefit is that you can install +`gprox` very simply from `webi` or `go` (if you must), and you dont have to +worry at all about NodeJS versions, etc! Plus there isn't any elevated access +given to an interpreter you dont know much about if you're using `webi`. The fastest way to get started is just by running: @@ -20,25 +26,33 @@ gprox # example output # 9:12PM INF Running proxy! from=https://localhost:9001 to=http://localhost:9000 ``` + And you're off to the races! -That is... if you're app happens to be running on port `9000`. If not, no worries! Simply pass the target port option `-t, --target` and specify the port your app _is_ running on. +That is... if you're app happens to be running on port `9000`. If not, no +worries! Simply pass the target port option `-t, --target` and specify the port +your app _is_ running on. ```bash gprox -t 8080 ``` -Feeling like you should save this magic built-in cert so you can inspect it for anything? +Feeling like you should save this magic built-in cert so you can inspect it for +anything? + ```bash gprox --dropcert ``` Want to use your own cert/key? + ```bash gprox -c testcert.crt -k testkey.key ``` -And for anything else, just use the `-h, --help` flag to get a little more information or refer to the [README](https://github.com/creedasaurus/gprox/blob/main/README.md): +And for anything else, just use the `-h, --help` flag to get a little more +information or refer to the +[README](https://github.com/creedasaurus/gprox/blob/main/README.md): ``` ❯ gprox --help diff --git a/k9s/README.md b/k9s/README.md index c2bbd07..7bc72ed 100644 --- a/k9s/README.md +++ b/k9s/README.md @@ -13,19 +13,24 @@ Use the `@beta` tag for pre-releases. ## Cheat Sheet -The information in this section is a copy of the preflight requirements and common command line arguments from k9s (https://github.com/derailed/k9s). +The information in this section is a copy of the preflight requirements and +common command line arguments from k9s (https://github.com/derailed/k9s). -> `k9s` aim is to make it easier to navigate, observe and manage your applications in the wild. K9s continually watches Kubernetes for changes and offers subsequent commands to interact with your observed resources. +> `k9s` aim is to make it easier to navigate, observe and manage your +> applications in the wild. K9s continually watches Kubernetes for changes and +> offers subsequent commands to interact with your observed resources. ### Preflight check -K9s uses 256 colors terminal mode. On `Nix system make sure TERM is set accordingly. +K9s uses 256 colors terminal mode. On `Nix system make sure TERM is set +accordingly. ```bash export TERM=xterm-256color ``` To run k9s: + ```bash k9s ``` @@ -33,26 +38,31 @@ k9s ### Command line arguments List all available CLI options + ```bash k9s help ``` To get info about K9s runtime (logs, configs, etc..) + ```bash k9s info ``` To run K9s in a given namespace + ```bash k9s -n mycoolns ``` Start K9s in an existing KubeConfig context + ```bash k9s --context coolCtx ``` Start K9s in readonly mode - with all cluster modification commands disabled + ```bash k9s --readonly ``` diff --git a/kind/README.md b/kind/README.md index 4ff23d9..59e7742 100644 --- a/kind/README.md +++ b/kind/README.md @@ -9,47 +9,58 @@ To update or switch versions, run `webi kind@stable` (or `@v2`, `@beta`,etc). ## Cheat Sheet -> Kind uses a single docker container to run a lightweight kubernetes cluster for testing and shenanigans +> Kind uses a single docker container to run a lightweight kubernetes cluster +> for testing and shenanigans User Guide - Quick Start: https://kind.sigs.k8s.io/docs/user/quick-start To create a cluster with default name + ```bash kind create cluster ``` Create a cluster with a specific name + ```bash kind create cluster --name foo ``` List clusters + ```bash kind get clusters ``` Specify Kubernetes version + ```bash kind create cluster --image "kindest/node:$favoriteTag" ``` -- pick your $favoriteTag from here: https://hub.docker.com/r/kindest/node/tags?page=1&ordering=last_updated + +- pick your \$favoriteTag from here: + https://hub.docker.com/r/kindest/node/tags?page=1&ordering=last_updated Export all logs from a cluster + ```bash kind exports logs $HOME/somedir ``` To delete a cluster with default name + ```bash kind delete cluster ``` To delete a cluster with specific name + ```bash kind delete cluster --name foo ``` Get the kubeconfig of a cluster + ```bash kind get kubeconfig --name foo ``` diff --git a/lsd/releases.js b/lsd/releases.js index 24ae092..f436a10 100644 --- a/lsd/releases.js +++ b/lsd/releases.js @@ -7,7 +7,7 @@ var repo = 'lsd'; module.exports = function (request) { return github(request, owner, repo).then(function (all) { all.releases = all.releases.filter(function (rel) { - return !/(-musl\.)|(-msvc\.)|(\.deb$)/.test(rel.name) + return !/(-musl\.)|(-msvc\.)|(\.deb$)/.test(rel.name); }); return all; }); diff --git a/mariadb/releases.js b/mariadb/releases.js index 0c3ca30..4c0c446 100644 --- a/mariadb/releases.js +++ b/mariadb/releases.js @@ -38,10 +38,11 @@ module.exports = function (request) { date: ver.date, os: 'linux', arch: 'amd64', - download: 'http://archive.mariadb.org/mariadb-{{ v }}/bintar-linux-x86_64/mariadb-{{ v }}-linux-x86_64.tar.gz'.replace( - /{{ v }}/g, - ver.version - ) + download: + 'http://archive.mariadb.org/mariadb-{{ v }}/bintar-linux-x86_64/mariadb-{{ v }}-linux-x86_64.tar.gz'.replace( + /{{ v }}/g, + ver.version + ) }); all.releases.push({ version: ver.version, @@ -50,10 +51,11 @@ module.exports = function (request) { date: ver.date, os: 'linux', arch: 'amd64', - download: 'http://archive.mariadb.org/mariadb-{{ v }}/bintar-linux-x86/mariadb-{{ v }}-linux-x86.tar.gz'.replace( - /{{ v }}/g, - ver.version - ) + download: + 'http://archive.mariadb.org/mariadb-{{ v }}/bintar-linux-x86/mariadb-{{ v }}-linux-x86.tar.gz'.replace( + /{{ v }}/g, + ver.version + ) }); // windows @@ -64,10 +66,11 @@ module.exports = function (request) { date: ver.date, os: 'windows', arch: 'amd64', - download: 'http://archive.mariadb.org/mariadb-{{ v }}/winx64-packages/mariadb-{{ v }}-winx64.zip'.replace( - /{{ v }}/g, - ver.version - ) + download: + 'http://archive.mariadb.org/mariadb-{{ v }}/winx64-packages/mariadb-{{ v }}-winx64.zip'.replace( + /{{ v }}/g, + ver.version + ) }); all.releases.push({ version: ver.version, @@ -76,10 +79,11 @@ module.exports = function (request) { date: ver.date, os: 'windows', arch: 'x86', - download: 'http://archive.mariadb.org/mariadb-{{ v }}/win32-packages/mariadb-{{ v }}-win32.zip'.replace( - /{{ v }}/g, - ver.version - ) + download: + 'http://archive.mariadb.org/mariadb-{{ v }}/win32-packages/mariadb-{{ v }}-win32.zip'.replace( + /{{ v }}/g, + ver.version + ) }); // Note: versions are sorted most-recent first. @@ -139,7 +143,8 @@ module.exports = function (request) { // 10.0.362018-08-01Stable // // To this: - var reVer = /.*mariadb\/(10[^\/]+)\/">.*(20\d\d-\d\d-\d\d)<\/td>(\w+)<\/td>/; + var reVer = + /.*mariadb\/(10[^\/]+)\/">.*(20\d\d-\d\d-\d\d)<\/td>(\w+)<\/td>/; // // { "version": "10.0.36", "date": "2018-08-01", "channel": "stable" } diff --git a/node/README.md b/node/README.md index bd80d10..bfbd5b3 100644 --- a/node/README.md +++ b/node/README.md @@ -82,7 +82,7 @@ npm install --save express var express = require('express'); var app = express(); -app.use('/', function(req, res, next) { +app.use('/', function (req, res, next) { res.end('Hello, World!'); }); @@ -97,7 +97,7 @@ module.exports = app; var http = require('http'); var app = require('./app.js'); -http.createServer(app).listen(8080, function() { +http.createServer(app).listen(8080, function () { console.info('Listening on', this.address()); }); ``` diff --git a/pandoc/README.md b/pandoc/README.md index 55d1c50..f31bdca 100644 --- a/pandoc/README.md +++ b/pandoc/README.md @@ -15,7 +15,8 @@ Use the `@beta` tag for pre-releases. ## Cheat Sheet -> Pandoc is a Haskell library for converting from one markup format to another, and a command-line tool that uses this library. +> Pandoc is a Haskell library for converting from one markup format to another, +> and a command-line tool that uses this library. ```bash pandoc -o output.html input.txt diff --git a/shfmt/releases.js b/shfmt/releases.js index e6cb017..85aa276 100644 --- a/shfmt/releases.js +++ b/shfmt/releases.js @@ -4,16 +4,16 @@ var github = require('../_common/github.js'); var owner = 'mvdan'; var repo = 'sh'; -module.exports = function(request) { - return github(request, owner, repo).then(function(all) { - return all; - }); +module.exports = function (request) { + return github(request, owner, repo).then(function (all) { + return all; + }); }; if (module === require.main) { - module.exports(require('@root/request')).then(function(all) { - all = require('../_webi/normalize.js')(all); - all.releases = all.releases.slice(0, 5); - console.info(JSON.stringify(all, null, 2)); - }); + module.exports(require('@root/request')).then(function (all) { + all = require('../_webi/normalize.js')(all); + all.releases = all.releases.slice(0, 5); + console.info(JSON.stringify(all, null, 2)); + }); } diff --git a/vim-beyondcode/README.md b/vim-beyondcode/README.md index 08c48a1..b556c56 100644 --- a/vim-beyondcode/README.md +++ b/vim-beyondcode/README.md @@ -22,5 +22,5 @@ It includes many of the vim plugins available on webinstall.dev such as: - [vim-spell](/vim-spell) - [vim-lastplace](/vim-lastplace) - [vim-viminfo](/vim-viminfo) -- [vim-syntastic](/vim-syntastic) +- [vim-ale](/vim-ale) - [vim-prettier](/vim-prettier) diff --git a/vim-go/README.md b/vim-go/README.md index 1e1f31a..7b4e6ab 100644 --- a/vim-go/README.md +++ b/vim-go/README.md @@ -5,19 +5,16 @@ tagline: | vim-go adds Go language support for Vim. --- -## Updating `vim-go` - -```bash -webi vim-go -``` +To update (replacing the current version) run `webi vim-go`. ## Cheat Sheet -> `vim-go` provides integration with various official and 3rd part go tooling +> `vim-go` provides integration with various official and 3rd party go tooling > for linting, vetting, etc. -You'll also need `ALE`, [`syntastic`](https://webinstall.dev/vim-syntastic), or -similar. +You'll also need to install [`ALE`](https://webinstall.dev/vim-ale) (part of +[`vim-essentials`](https://webinstall.dev/vim-essentials)) or +[`syntastic`](https://webinstall.dev/vim-syntastic) first. ### How to install by hand diff --git a/vim-leader/README.md b/vim-leader/README.md index fc45b46..63092f9 100644 --- a/vim-leader/README.md +++ b/vim-leader/README.md @@ -14,7 +14,7 @@ To update (replacing the current version) run `webi vim-leader`. The `` key is typically used for your own custom shortcuts. By default it's mapped to `\` (backslash) - a legacy from a time when `\` was in -a more accessible place - but most people remap it to `,` or ` ` (space). +a more accessible place - but most people remap it to `,` or `` (space). This vim-leader plugin makes Space the Leader key, but also remaps `\` and `,` as aliases. diff --git a/vim-prettier/README.md b/vim-prettier/README.md index f030aaa..275f83f 100644 --- a/vim-prettier/README.md +++ b/vim-prettier/README.md @@ -12,8 +12,9 @@ To update (replacing the current version) run `webi vim-prettier`. > `vim-prettier` is a vim plugin wrapper for prettier, pre-configured with > custom default prettier settings. -You'll also need `ALE`, [`syntastic`](https://webinstall.dev/vim-syntastic), or -similar. +You'll also need to install [`ALE`](https://webinstall.dev/vim-ale) (part of +[`vim-essentials`](https://webinstall.dev/vim-essentials)) or +[`syntastic`](https://webinstall.dev/vim-syntastic) first. ### How to install by hand diff --git a/webi/README.md b/webi/README.md index 872a9d6..da5585b 100644 --- a/webi/README.md +++ b/webi/README.md @@ -68,8 +68,9 @@ These are the files that are installed when you use [webinstall.dev](/): ~/.local/opt/pathman-* ``` -Assuming that you don't use `pathman` for anything else, you can safely remove all of them. -If you use [webinstall.dev](/) again in the future they will be reinstalled. +Assuming that you don't use `pathman` for anything else, you can safely remove +all of them. If you use [webinstall.dev](/) again in the future they will be +reinstalled. Additionally, these files may be modified to update your `PATH`: @@ -84,13 +85,15 @@ It's probably best to leave them alone. ### How to uninstall Webi-installed programs -Except where noted otherwise (such as `wsl`) Webi installs everything into `~/.local/bin` and `~/.local/opt`. +Except where noted otherwise (such as `wsl`) Webi installs everything into +`~/.local/bin` and `~/.local/opt`. -Some programs also use `~/.local/share` or `~/.config` - such as `postgres` and `fish` - and -some use program-specific directories - such as Go, which uses `~/go/bin`. +Some programs also use `~/.local/share` or `~/.config` - such as `postgres` and +`fish` - and some use program-specific directories - such as Go, which uses +`~/go/bin`. -If you want to remove any of them, simply deleting them should do well enough - just check the Cheat Sheet -for any special notes. +If you want to remove any of them, simply deleting them should do well enough - +just check the Cheat Sheet for any special notes. Here are some examples: diff --git a/yq/releases.js b/yq/releases.js index 8ef95a7..cf78b08 100644 --- a/yq/releases.js +++ b/yq/releases.js @@ -4,16 +4,16 @@ var github = require('../_common/github.js'); var owner = 'mikefarah'; var repo = 'yq'; -module.exports = function(request) { - return github(request, owner, repo).then(function(all) { - return all; - }); +module.exports = function (request) { + return github(request, owner, repo).then(function (all) { + return all; + }); }; if (module === require.main) { - module.exports(require('@root/request')).then(function(all) { - all = require('../_webi/normalize.js')(all); - all.releases = all.releases.slice(0, 5); - console.info(JSON.stringify(all, null, 2)); - }); + module.exports(require('@root/request')).then(function (all) { + all = require('../_webi/normalize.js')(all); + all.releases = all.releases.slice(0, 5); + console.info(JSON.stringify(all, null, 2)); + }); }