Skip to content

Commit 6576839

Browse files
committed
chore: add Vale
1 parent 9244c97 commit 6576839

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

64 files changed

+102286
-15
lines changed

.vale.ini

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
StylesPath = styles
2+
3+
MinAlertLevel = suggestion
4+
5+
Packages = https://github.com/bencromwell/irwell/releases/latest/download/irwell.zip, Readability, proselint
6+
7+
Vocab = sshush
8+
9+
[*.{md}]
10+
BasedOnStyles = Readability, proselint, Irwell

README.md

Lines changed: 97 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,33 +1,50 @@
11
# sshush
22

3-
## Documentation
4-
53
Full docs can be found here: https://sshush.bencromwell.com
64

75
## Intro
86

9-
Takes a YAML defined set of SSH configs and produces an SSH config file from it.
7+
Sshush takes a bunch of `YAML` and produces an SSH config file.
8+
9+
### Defaults
10+
11+
- *Source*: `~/.ssh/config.yml`
12+
- *Destination*: `~/.ssh/config`
13+
14+
### Premise
15+
16+
I wanted a way to manage my SSH config file based on inheritance.
17+
18+
This lets you group together hosts and common options, that can be optionally and selectively overridden.
1019

11-
Defaults to `~/.ssh/config.yml` for the source and `~/.ssh/config` for the destination.
20+
For example:
1221

13-
#### Premise
22+
- All my servers at cloud provider have the same port.
23+
- All my servers at other cloud provider share a common username.
24+
- All my local Unifi devices share a specific SSH key.
25+
- All my ancient Cisco hardware at work shares an outdated Cipher configuration.
1426

15-
I wanted a way to manage my SSH config file that allowed me to define an inheritance based structure. This allows you to group hosts together, apply common options and be able to override the options if needs be. For example, maybe you have everything in DigitalOcean on a particular port with a particular user and SSH key, but everything in AWS is different. Or they share ports but not keys.
27+
## Installation
1628

17-
#### Globals
29+
Download a release from the GitHub releases page. Place it somewhere in your `$PATH`.
30+
31+
## Configuration
32+
33+
### Globals
1834

1935
Options that apply to the catch-all `Host *`.
2036

21-
#### Defaults
37+
### Defaults
2238

23-
Basic options such as a default User or IdentityFile. Can be overridden by group or individual host entries.
39+
Basic options such as a default `User` or `IdentityFile`.
2440

25-
#### Example
41+
Can be overridden by group or individual host entries.
2642

27-
Example config demonstrating the use of the global and default options:
43+
### Example
2844

29-
```yaml
45+
This example demonstrates global and defaults:
3046

47+
```yaml
3148
---
3249
global:
3350
UseRoaming: "no"
@@ -71,10 +88,75 @@ work:
7188

7289
```
7390

74-
#### Installation
91+
This results in:
92+
93+
```text
94+
# Generated by sshush v2.1.0
95+
# From path/to/readme.yaml
96+
97+
# web_servers
98+
Host projects-aws
99+
HostName projects-aws.example.com
100+
IdentityFile ~/.ssh/aws
101+
Port 2201
102+
User ben
103+
104+
Host projects-do-1
105+
HostName projects-do-1.example.com
106+
IdentityFile ~/.ssh/digital_ocean
107+
Port 2201
108+
User ben
109+
110+
Host projects-do-2
111+
HostName projects-do-2.example.com
112+
IdentityFile ~/.ssh/digital_ocean
113+
Port 2201
114+
User ben
115+
116+
# raspberry_pis
117+
Host pi1
118+
HostName 192.168.0.107
119+
IdentityFile ~/.ssh/id_rsa
120+
User pi
121+
122+
Host pi2
123+
HostName 192.168.0.108
124+
IdentityFile ~/.ssh/id_rsa
125+
User pi
126+
127+
# local
128+
Host kodi
129+
HostName 192.168.0.200
130+
IdentityFile ~/.ssh/id_rsa
131+
User ben
132+
133+
Host router
134+
HostName 192.168.0.1
135+
IdentityFile ~/.ssh/id_rsa
136+
User root
137+
138+
# work
139+
Host gitlab
140+
HostName 10.0.0.30
141+
IdentityFile ~/.ssh/id_rsa
142+
User bcromwell
143+
144+
Host jenkins
145+
HostName 10.0.0.20
146+
IdentityFile ~/.ssh/id_rsa
147+
User bcromwell
148+
149+
Host workpc
150+
HostName 10.0.0.80
151+
IdentityFile ~/.ssh/id_rsa
152+
User bcromwell
153+
154+
# Global config
155+
Host *
156+
UseRoaming no
75157
76-
Grab a release from the GitHub releases page.
158+
```
77159

78-
### Notes
160+
## Notes
79161

80162
This was originally written in Python, which can be found in the 1.x branch.

readme.conf

Lines changed: 63 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,63 @@
1+
# Generated by sshush v0.0.0-dev
2+
# From bentemp/readme.yaml
3+
4+
# web_servers
5+
Host projects-aws
6+
HostName projects-aws.example.com
7+
IdentityFile ~/.ssh/aws
8+
Port 2201
9+
User ben
10+
11+
Host projects-do-1
12+
HostName projects-do-1.example.com
13+
IdentityFile ~/.ssh/digital_ocean
14+
Port 2201
15+
User ben
16+
17+
Host projects-do-2
18+
HostName projects-do-2.example.com
19+
IdentityFile ~/.ssh/digital_ocean
20+
Port 2201
21+
User ben
22+
23+
# raspberry_pis
24+
Host pi1
25+
HostName 192.168.0.107
26+
IdentityFile ~/.ssh/id_rsa
27+
User pi
28+
29+
Host pi2
30+
HostName 192.168.0.108
31+
IdentityFile ~/.ssh/id_rsa
32+
User pi
33+
34+
# local
35+
Host kodi
36+
HostName 192.168.0.200
37+
IdentityFile ~/.ssh/id_rsa
38+
User ben
39+
40+
Host router
41+
HostName 192.168.0.1
42+
IdentityFile ~/.ssh/id_rsa
43+
User root
44+
45+
# work
46+
Host gitlab
47+
HostName 10.0.0.30
48+
IdentityFile ~/.ssh/id_rsa
49+
User bcromwell
50+
51+
Host jenkins
52+
HostName 10.0.0.20
53+
IdentityFile ~/.ssh/id_rsa
54+
User bcromwell
55+
56+
Host workpc
57+
HostName 10.0.0.80
58+
IdentityFile ~/.ssh/id_rsa
59+
User bcromwell
60+
61+
# Global config
62+
Host *
63+
UseRoaming no

styles/.vale-config/0-irwell.ini

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
StylesPath = styles
2+
3+
MinAlertLevel = suggestion
4+
5+
[*.md]
6+
BasedOnStyles = Irwell

styles/Irwell/Spelling.yml

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
extends: spelling
2+
message: |
3+
Did you really mean '%s'?
4+
5+
If intentional, try code/bold formatting.
6+
7+
# Further details:
8+
# For UI elements, use bold formatting.
9+
#
10+
# For paths; configuration; user input; code; class, method, and variable names; statuscodes; and console output, use code formatting.
11+
#
12+
# The spell checker doesn't check words with bold or code formatting.
13+
level: error
14+
dictionaries:
15+
- en_GB
16+
dicpath: config/dictionaries/
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
extends: metric
2+
message: "Try to keep the Automated Readability Index (%s) below 8."
3+
link: https://en.wikipedia.org/wiki/Automated_readability_index
4+
5+
formula: |
6+
(4.71 * (characters / words)) + (0.5 * (words / sentences)) - 21.43
7+
8+
condition: "> 8"

styles/Readability/ColemanLiau.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
extends: metric
2+
message: "Try to keep the Coleman–Liau Index grade (%s) below 9."
3+
link: https://en.wikipedia.org/wiki/Coleman%E2%80%93Liau_index
4+
5+
formula: |
6+
(0.0588 * (characters / words) * 100) - (0.296 * (sentences / words) * 100) - 15.8
7+
8+
condition: "> 9"
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
extends: metric
2+
message: "Try to keep the Flesch–Kincaid grade level (%s) below 8."
3+
link: https://en.wikipedia.org/wiki/Flesch%E2%80%93Kincaid_readability_tests
4+
5+
formula: |
6+
(0.39 * (words / sentences)) + (11.8 * (syllables / words)) - 15.59
7+
8+
condition: "> 8"
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
extends: metric
2+
message: "Try to keep the Flesch reading ease score (%s) above 70."
3+
link: https://en.wikipedia.org/wiki/Flesch%E2%80%93Kincaid_readability_tests
4+
5+
formula: |
6+
206.835 - (1.015 * (words / sentences)) - (84.6 * (syllables / words))
7+
8+
condition: "< 70"

styles/Readability/GunningFog.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
extends: metric
2+
message: "Try to keep the Gunning-Fog index (%s) below 10."
3+
link: https://en.wikipedia.org/wiki/Gunning_fog_index
4+
5+
formula: |
6+
0.4 * ((words / sentences) + 100 * (complex_words / words))
7+
8+
condition: "> 10"

0 commit comments

Comments
 (0)