blob: 6b6a1b95156a0bf1163782286a978e2dea559764 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
|
% ENTERPRISE PATTERNS(1) krebs Manuals
% krebs
# NAME
Enterprise Patterns - Stellt sicher, dass das richtige passiert, egal was gemacht wird
# DEFINITIONS
### Enterprise Patterns
- Stellt sicher, dass das richtige passiert, egal was gemacht wird
### Enterprise Loop
### Enterprise Exception Handling
- ggf ersetzbar durch enterprise loop.
### Enterprise Installation
- curl a shellscript directly into your interpreter
```
curl https://nixos.org/nix/install | sh
```
### Rebooting
### Enterprise Einschalter (eon)
- Device that turns something on as soon as possible.
### Supernintendo Pattern
### Enterprise Root
- scripts which need root access but are called with lower privileges.
- The Enterprise Root Pattern provides a Solution for this issue by calling the script itself as sudo.
```
<code>
if test "${nosudo-false}" != true -a `id -u` != 0; then
echo "we're going sudo..." >&2
exec sudo "$0" "$@"
exit 23 # go to hell
fi
</script> // enterprise ist, wenn <code> ... </script> trotzdem matcht
```
### Enterprise Shutdown
- Mittel der Wahl um einen Shutdown zu erzwingen
- Bsp: das Not-Aus in der Maschinensicherheit
### Enterprise Deep Copy
- Bsp: var copy = JSON.parse(JSON.stringify(source))
### Enterprise Thinking
- Prozess um auf Enterprise Patterns zu kommen
### Bug-Driven Development
### Source-based Documentation / Help
- __
```
<code>
#! /bin/sh
if echo "$*" | grep -q '\(^\| \)-h\( \|$\)'; then
cat "$0"
fi
# [more code]
</code>
```
### Literate Programming
- Omit all the comments.
### Litterate Programming
- Write throw-away code and it will become production code
### Enterprise Expect
- Because you always know what you want, `expect(3)` script code can be replaced by a `subshell and pipe` pattern :
```
<code>
( echo "$username"; sleep 1; echo "$password"; sleep 1; echo "cp old new" ) | telnet
</code>
```
- painload example: `//retiolum/bin/announce_pubkey`
### Enterprise Waiting
- Quietly wait until someone else solves the problem.
- Passive variant of Complainterprise Waiting.
### Complainterprise Waiting
- Submit a bug report and do Enterprise Waiting.
- Active variant of Enterprise Waiting.
# SEE ALSO
thesauron(1)
|