Commit MetaInfo

Revision45ba7d5d746b6fae201a04be6281918d2668e24b (tree)
Time2023-01-31 23:55:05
AuthorErik <erikgronwal@user...>
CommiterErik

Log Message

Regular updates

Change Summary

Incremental Difference

--- a/bash.md
+++ b/bash.md
@@ -187,7 +187,9 @@ dir=${src%$base} #=> "/path/to/" (dirpath)
187187 | `${foo#prefix}` | Remove prefix |
188188 | --- | --- |
189189 | `${foo%%suffix}` | Remove long suffix |
190+| `${foo/%suffix}` | Remove long suffix |
190191 | `${foo##prefix}` | Remove long prefix |
192+| `${foo/#prefix}` | Remove long prefix |
191193 | --- | --- |
192194 | `${foo/from/to}` | Replace first match |
193195 | `${foo//from/to}` | Replace all |
--- a/curl.md
+++ b/curl.md
@@ -80,7 +80,7 @@ curl -u user:pass -d status="Hello" http://twitter.com/statuses/update.xml
8080
8181 ```bash
8282 # multipart file upload
83-curl -v -include --form key1=value1 --form upload=@localfilename URL
83+curl -v --include --form key1=value1 --form upload=@localfilename URL
8484
8585 # multipart form: send data from text field and upload file
8686 curl -F person=anonymous -F secret=@file.txt http://example.com/submit.cgi
--- a/find.md
+++ b/find.md
@@ -66,7 +66,7 @@ These conditions only work in MacOS and BSD-like systems (no GNU/Linux support).
6666 ### Condition flow
6767
6868 ```bash
69-\! -name "*.c"
69+\! -name "*.c" # NOT named "*.c"
7070 \( x -or y \)
7171 ```
7272
@@ -91,4 +91,5 @@ find . -newerBt "24 hours ago"
9191
9292 ```bash
9393 find . -type f -mtime +29 # find files modified more than 30 days ago
94+find . -type f -newermt 2016-08-07 \! -newermt 2016-08-08 # find in date range
9495 ```
--- a/npm.md
+++ b/npm.md
@@ -17,6 +17,11 @@ updated: 2019-12-24
1717 | `npm install lodash` | Install a package |
1818 | `npm install --save-dev lodash` | Install as devDependency |
1919 | `npm install --save-exact lodash` | Install with exact |
20+| --- | --- |
21+| `npm version 1.2.3` | Bump the package version to 1.2.3 |
22+| `npm version major` | Bump the major package version by 1 (1.2.3 → 2.0.0) |
23+| `npm version minor` | Bump the minor package version by 1 (1.2.3 → 1.3.0) |
24+| `npm version patch` | Bump the patch package version by 1 (1.2.3 → 1.2.4) |
2025
2126
2227 `--save` is the default as of npm@5. Previously, using `npm install` without `--save` doesn't update package.json.
--- a/yaml.md
+++ b/yaml.md
@@ -5,12 +5,45 @@ layout: 2017/sheet
55 prism_languages: [yaml]
66 ---
77
8+### Dictionaries and lists
9+
10+```yaml
11+# comments start with "#"
12+# dictionary are written like "key: value"
13+name: Martin D'vloper
14+languages:
15+ perl: Elite
16+ python: Elite
17+ pascal: Lame
18+
19+# list items beginn with a "- "
20+foods:
21+ - Apple
22+ - Orange
23+ - Strawberry
24+ - Mango
25+
26+# booleans are lower case
27+employed: true
28+```
29+
30+
831 ### Multiline strings
932
1033 ```yaml
34+# Literal Block Scalar
1135 Multiline: |
12- hello
13- world
36+ exactly as you see
37+ will appear these three
38+ lines of poetry
39+```
40+
41+```yaml
42+# Folded Block Scalar
43+Multiline: <
44+ this is really a
45+ single line of text
46+ despite appearances
1447 ```
1548
1649 ### Inheritance
Show on old repository browser