chore: make Prettier + fix spelling, update upgrade/switch instructions, prefer ale to syntastic

This commit is contained in:
AJ ONeal
2021-08-15 05:56:56 +00:00
parent aae813df48
commit dfb477380c
21 changed files with 135 additions and 93 deletions
+13 -14
View File
@@ -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);
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);
}
}
if (stdout) {
console.info(stdout);
}
if (stderr) {
console.error(stderr);
}
});
);
/*
.then(function () {
// nada
+1 -3
View File
@@ -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'))
);
}
+2 -1
View File
@@ -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,
+1 -1
View File
@@ -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)) {
+2 -1
View File
@@ -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
+6 -5
View File
@@ -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
+1 -1
View File
@@ -4,7 +4,7 @@ var osMap = {
darwin: 'macos'
};
var archMap = {
'386': 'x86'
386: 'x86'
};
function getAllReleases(request) {
+18 -4
View File
@@ -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
+13 -3
View File
@@ -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
```
+13 -2
View File
@@ -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
```
+1 -1
View File
@@ -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;
});
+22 -17
View File
@@ -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) {
// </tr><tr><td><a href="/mariadb/10.0.36/">10.0.36</a></td><td>2018-08-01</td><td>Stable</td>
//
// To this:
var reVer = /<tr>.*mariadb\/(10[^\/]+)\/">.*(20\d\d-\d\d-\d\d)<\/td><td>(\w+)<\/td>/;
var reVer =
/<tr>.*mariadb\/(10[^\/]+)\/">.*(20\d\d-\d\d-\d\d)<\/td><td>(\w+)<\/td>/;
//
// { "version": "10.0.36", "date": "2018-08-01", "channel": "stable" }
+2 -2
View File
@@ -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());
});
```
+2 -1
View File
@@ -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
+9 -9
View File
@@ -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));
});
}
+1 -1
View File
@@ -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)
+5 -8
View File
@@ -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
+1 -1
View File
@@ -14,7 +14,7 @@ To update (replacing the current version) run `webi vim-leader`.
The `<Leader>` 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.
+3 -2
View File
@@ -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
+10 -7
View File
@@ -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:
+9 -9
View File
@@ -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));
});
}