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
if (require.main === module) {
console.info(
- parseYamlish(
- fs.readFileSync(__dirname + '/../node/README.md', 'utf8')
- )
+ parseYamlish(fs.readFileSync(__dirname + '/../node/README.md', 'utf8'))
);
}
];
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,
// 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)) {
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
## 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:
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
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
darwin: 'macos'
};
var archMap = {
- '386': 'x86'
+ 386: 'x86'
};
function getAllReleases(request) {
## 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:
# 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
## 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
```
### 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
```
## 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
```
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;
});
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,
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
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,
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.
// </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" }
var express = require('express');
var app = express();
-app.use('/', function(req, res, next) {
+app.use('/', function (req, res, next) {
res.end('Hello, World!');
});
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());
});
```
## 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
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));
+ });
}
- [vim-spell](/vim-spell)
- [vim-lastplace](/vim-lastplace)
- [vim-viminfo](/vim-viminfo)
-- [vim-syntastic](/vim-syntastic)
+- [vim-ale](/vim-ale)
- [vim-prettier](/vim-prettier)
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
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.
> `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
~/.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`:
### 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:
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));
+ });
}