OSDN Git Service

Regular updates
authorErik <erikgronwal@users.osdn.me>
Sat, 13 Jun 2020 14:55:06 +0000 (23:55 +0900)
committerErik <erikgronwal@users.osdn.me>
Sat, 13 Jun 2020 14:55:06 +0000 (23:55 +0900)
CONTRIBUTING.md
Gemfile.lock
bash.md
capybara.md
css-flexbox.md
homebrew.md
knex.md
ledger.md
python.md
vim.md

index a361e05..8fc6a19 100644 (file)
@@ -41,7 +41,7 @@ First time setup:
 docker-compose build
 
 # First-time setup
-docker-compose run --rm web bundle install && yarn
+docker-compose run --rm web bundle install && docker-compose run --rm web yarn install
 ```
 
 Starting the server:
index 27b3c09..28732be 100644 (file)
 GEM
   remote: https://rubygems.org/
   specs:
-    activesupport (4.2.8)
-      i18n (~> 0.7)
+    activesupport (6.0.3.1)
+      concurrent-ruby (~> 1.0, >= 1.0.2)
+      i18n (>= 0.7, < 2)
       minitest (~> 5.1)
-      thread_safe (~> 0.3, >= 0.3.4)
       tzinfo (~> 1.1)
-    addressable (2.5.2)
-      public_suffix (>= 2.0.2, < 4.0)
+      zeitwerk (~> 2.2, >= 2.2.2)
+    addressable (2.7.0)
+      public_suffix (>= 2.0.2, < 5.0)
     coffee-script (2.4.1)
       coffee-script-source
       execjs
-    coffee-script-source (1.12.2)
+    coffee-script-source (1.11.1)
     colorator (1.1.0)
-    ethon (0.10.1)
+    commonmarker (0.17.13)
+      ruby-enum (~> 0.5)
+    concurrent-ruby (1.1.6)
+    dnsruby (1.61.3)
+      addressable (~> 2.5)
+    em-websocket (0.5.1)
+      eventmachine (>= 0.12.9)
+      http_parser.rb (~> 0.6.0)
+    ethon (0.12.0)
       ffi (>= 1.3.0)
+    eventmachine (1.2.7)
     execjs (2.7.0)
-    faraday (0.13.1)
+    faraday (1.0.1)
       multipart-post (>= 1.2, < 3)
-    ffi (1.9.18)
+    ffi (1.13.1)
     forwardable-extended (2.6.0)
-    gemoji (3.0.0)
-    github-pages (156)
-      activesupport (= 4.2.8)
-      github-pages-health-check (= 1.3.5)
-      jekyll (= 3.5.2)
-      jekyll-avatar (= 0.4.2)
-      jekyll-coffeescript (= 1.0.1)
+    gemoji (3.0.1)
+    github-pages (206)
+      github-pages-health-check (= 1.16.1)
+      jekyll (= 3.8.7)
+      jekyll-avatar (= 0.7.0)
+      jekyll-coffeescript (= 1.1.1)
+      jekyll-commonmark-ghpages (= 0.1.6)
       jekyll-default-layout (= 0.1.4)
-      jekyll-feed (= 0.9.2)
-      jekyll-gist (= 1.4.1)
-      jekyll-github-metadata (= 2.8.0)
-      jekyll-mentions (= 1.2.0)
-      jekyll-optional-front-matter (= 0.2.0)
+      jekyll-feed (= 0.13.0)
+      jekyll-gist (= 1.5.0)
+      jekyll-github-metadata (= 2.13.0)
+      jekyll-mentions (= 1.5.1)
+      jekyll-optional-front-matter (= 0.3.2)
       jekyll-paginate (= 1.1.0)
-      jekyll-readme-index (= 0.1.0)
-      jekyll-redirect-from (= 0.12.1)
-      jekyll-relative-links (= 0.4.1)
-      jekyll-sass-converter (= 1.5.0)
-      jekyll-seo-tag (= 2.3.0)
-      jekyll-sitemap (= 1.0.0)
-      jekyll-swiss (= 0.4.0)
-      jekyll-theme-architect (= 0.1.0)
-      jekyll-theme-cayman (= 0.1.0)
-      jekyll-theme-dinky (= 0.1.0)
-      jekyll-theme-hacker (= 0.1.0)
-      jekyll-theme-leap-day (= 0.1.0)
-      jekyll-theme-merlot (= 0.1.0)
-      jekyll-theme-midnight (= 0.1.0)
-      jekyll-theme-minimal (= 0.1.0)
-      jekyll-theme-modernist (= 0.1.0)
-      jekyll-theme-primer (= 0.5.0)
-      jekyll-theme-slate (= 0.1.0)
-      jekyll-theme-tactile (= 0.1.0)
-      jekyll-theme-time-machine (= 0.1.0)
-      jekyll-titles-from-headings (= 0.4.0)
-      jemoji (= 0.8.0)
-      kramdown (= 1.13.2)
-      liquid (= 4.0.0)
-      listen (= 3.0.6)
+      jekyll-readme-index (= 0.3.0)
+      jekyll-redirect-from (= 0.15.0)
+      jekyll-relative-links (= 0.6.1)
+      jekyll-remote-theme (= 0.4.1)
+      jekyll-sass-converter (= 1.5.2)
+      jekyll-seo-tag (= 2.6.1)
+      jekyll-sitemap (= 1.4.0)
+      jekyll-swiss (= 1.0.0)
+      jekyll-theme-architect (= 0.1.1)
+      jekyll-theme-cayman (= 0.1.1)
+      jekyll-theme-dinky (= 0.1.1)
+      jekyll-theme-hacker (= 0.1.1)
+      jekyll-theme-leap-day (= 0.1.1)
+      jekyll-theme-merlot (= 0.1.1)
+      jekyll-theme-midnight (= 0.1.1)
+      jekyll-theme-minimal (= 0.1.1)
+      jekyll-theme-modernist (= 0.1.1)
+      jekyll-theme-primer (= 0.5.4)
+      jekyll-theme-slate (= 0.1.1)
+      jekyll-theme-tactile (= 0.1.1)
+      jekyll-theme-time-machine (= 0.1.1)
+      jekyll-titles-from-headings (= 0.5.3)
+      jemoji (= 0.11.1)
+      kramdown (= 1.17.0)
+      liquid (= 4.0.3)
       mercenary (~> 0.3)
-      minima (= 2.1.1)
-      rouge (= 1.11.1)
+      minima (= 2.5.1)
+      nokogiri (>= 1.10.4, < 2.0)
+      rouge (= 3.19.0)
       terminal-table (~> 1.4)
-    github-pages-health-check (1.3.5)
+    github-pages-health-check (1.16.1)
       addressable (~> 2.3)
-      net-dns (~> 0.8)
+      dnsruby (~> 1.60)
       octokit (~> 4.0)
-      public_suffix (~> 2.0)
-      typhoeus (~> 0.7)
-    html-pipeline (2.7.0)
+      public_suffix (~> 3.0)
+      typhoeus (~> 1.3)
+    html-pipeline (2.13.0)
       activesupport (>= 2)
       nokogiri (>= 1.4)
-    i18n (0.8.6)
-    jekyll (3.5.2)
+    http_parser.rb (0.6.0)
+    i18n (0.9.5)
+      concurrent-ruby (~> 1.0)
+    jekyll (3.8.7)
       addressable (~> 2.4)
       colorator (~> 1.0)
+      em-websocket (~> 0.5)
+      i18n (~> 0.7)
       jekyll-sass-converter (~> 1.0)
-      jekyll-watch (~> 1.1)
-      kramdown (~> 1.3)
+      jekyll-watch (~> 2.0)
+      kramdown (~> 1.14)
       liquid (~> 4.0)
       mercenary (~> 0.3.3)
       pathutil (~> 0.9)
-      rouge (~> 1.7)
+      rouge (>= 1.7, < 4)
       safe_yaml (~> 1.0)
-    jekyll-avatar (0.4.2)
-      jekyll (~> 3.0)
-    jekyll-coffeescript (1.0.1)
+    jekyll-avatar (0.7.0)
+      jekyll (>= 3.0, < 5.0)
+    jekyll-coffeescript (1.1.1)
       coffee-script (~> 2.2)
+      coffee-script-source (~> 1.11.1)
+    jekyll-commonmark (1.3.1)
+      commonmarker (~> 0.14)
+      jekyll (>= 3.7, < 5.0)
+    jekyll-commonmark-ghpages (0.1.6)
+      commonmarker (~> 0.17.6)
+      jekyll-commonmark (~> 1.2)
+      rouge (>= 2.0, < 4.0)
     jekyll-default-layout (0.1.4)
       jekyll (~> 3.0)
-    jekyll-feed (0.9.2)
-      jekyll (~> 3.3)
-    jekyll-gist (1.4.1)
+    jekyll-feed (0.13.0)
+      jekyll (>= 3.7, < 5.0)
+    jekyll-gist (1.5.0)
       octokit (~> 4.2)
-    jekyll-github-metadata (2.8.0)
-      jekyll (~> 3.1)
+    jekyll-github-metadata (2.13.0)
+      jekyll (>= 3.4, < 5.0)
       octokit (~> 4.0, != 4.4.0)
-    jekyll-mentions (1.2.0)
-      activesupport (~> 4.0)
+    jekyll-mentions (1.5.1)
       html-pipeline (~> 2.3)
-      jekyll (~> 3.0)
-    jekyll-optional-front-matter (0.2.0)
-      jekyll (~> 3.0)
+      jekyll (>= 3.7, < 5.0)
+    jekyll-optional-front-matter (0.3.2)
+      jekyll (>= 3.0, < 5.0)
     jekyll-paginate (1.1.0)
-    jekyll-readme-index (0.1.0)
-      jekyll (~> 3.0)
-    jekyll-redirect-from (0.12.1)
-      jekyll (~> 3.3)
-    jekyll-relative-links (0.4.1)
-      jekyll (~> 3.3)
-    jekyll-sass-converter (1.5.0)
+    jekyll-readme-index (0.3.0)
+      jekyll (>= 3.0, < 5.0)
+    jekyll-redirect-from (0.15.0)
+      jekyll (>= 3.3, < 5.0)
+    jekyll-relative-links (0.6.1)
+      jekyll (>= 3.3, < 5.0)
+    jekyll-remote-theme (0.4.1)
+      addressable (~> 2.0)
+      jekyll (>= 3.5, < 5.0)
+      rubyzip (>= 1.3.0)
+    jekyll-sass-converter (1.5.2)
       sass (~> 3.4)
-    jekyll-seo-tag (2.3.0)
-      jekyll (~> 3.3)
-    jekyll-sitemap (1.0.0)
-      jekyll (~> 3.3)
-    jekyll-swiss (0.4.0)
-    jekyll-theme-architect (0.1.0)
+    jekyll-seo-tag (2.6.1)
+      jekyll (>= 3.3, < 5.0)
+    jekyll-sitemap (1.4.0)
+      jekyll (>= 3.7, < 5.0)
+    jekyll-swiss (1.0.0)
+    jekyll-theme-architect (0.1.1)
       jekyll (~> 3.5)
       jekyll-seo-tag (~> 2.0)
-    jekyll-theme-cayman (0.1.0)
+    jekyll-theme-cayman (0.1.1)
       jekyll (~> 3.5)
       jekyll-seo-tag (~> 2.0)
-    jekyll-theme-dinky (0.1.0)
+    jekyll-theme-dinky (0.1.1)
       jekyll (~> 3.5)
       jekyll-seo-tag (~> 2.0)
-    jekyll-theme-hacker (0.1.0)
+    jekyll-theme-hacker (0.1.1)
       jekyll (~> 3.5)
       jekyll-seo-tag (~> 2.0)
-    jekyll-theme-leap-day (0.1.0)
+    jekyll-theme-leap-day (0.1.1)
       jekyll (~> 3.5)
       jekyll-seo-tag (~> 2.0)
-    jekyll-theme-merlot (0.1.0)
+    jekyll-theme-merlot (0.1.1)
       jekyll (~> 3.5)
       jekyll-seo-tag (~> 2.0)
-    jekyll-theme-midnight (0.1.0)
+    jekyll-theme-midnight (0.1.1)
       jekyll (~> 3.5)
       jekyll-seo-tag (~> 2.0)
-    jekyll-theme-minimal (0.1.0)
+    jekyll-theme-minimal (0.1.1)
       jekyll (~> 3.5)
       jekyll-seo-tag (~> 2.0)
-    jekyll-theme-modernist (0.1.0)
+    jekyll-theme-modernist (0.1.1)
       jekyll (~> 3.5)
       jekyll-seo-tag (~> 2.0)
-    jekyll-theme-primer (0.5.0)
-      jekyll (~> 3.5)
-      jekyll-seo-tag (~> 2.2)
-    jekyll-theme-slate (0.1.0)
+    jekyll-theme-primer (0.5.4)
+      jekyll (> 3.5, < 5.0)
+      jekyll-github-metadata (~> 2.9)
+      jekyll-seo-tag (~> 2.0)
+    jekyll-theme-slate (0.1.1)
       jekyll (~> 3.5)
       jekyll-seo-tag (~> 2.0)
-    jekyll-theme-tactile (0.1.0)
+    jekyll-theme-tactile (0.1.1)
       jekyll (~> 3.5)
       jekyll-seo-tag (~> 2.0)
-    jekyll-theme-time-machine (0.1.0)
+    jekyll-theme-time-machine (0.1.1)
       jekyll (~> 3.5)
       jekyll-seo-tag (~> 2.0)
-    jekyll-titles-from-headings (0.4.0)
-      jekyll (~> 3.3)
-    jekyll-watch (1.5.0)
-      listen (~> 3.0, < 3.1)
-    jemoji (0.8.0)
-      activesupport (~> 4.0)
+    jekyll-titles-from-headings (0.5.3)
+      jekyll (>= 3.3, < 5.0)
+    jekyll-watch (2.2.1)
+      listen (~> 3.0)
+    jemoji (0.11.1)
       gemoji (~> 3.0)
       html-pipeline (~> 2.2)
-      jekyll (>= 3.0)
-    kramdown (1.13.2)
-    liquid (4.0.0)
-    listen (3.0.6)
-      rb-fsevent (>= 0.9.3)
-      rb-inotify (>= 0.9.7)
+      jekyll (>= 3.0, < 5.0)
+    kramdown (1.17.0)
+    liquid (4.0.3)
+    listen (3.2.1)
+      rb-fsevent (~> 0.10, >= 0.10.3)
+      rb-inotify (~> 0.9, >= 0.9.10)
     mercenary (0.3.6)
-    mini_portile2 (2.2.0)
-    minima (2.1.1)
-      jekyll (~> 3.3)
-    minitest (5.10.3)
-    multipart-post (2.0.0)
-    net-dns (0.8.0)
-    nokogiri (1.8.0)
-      mini_portile2 (~> 2.2.0)
-    octokit (4.7.0)
+    mini_portile2 (2.4.0)
+    minima (2.5.1)
+      jekyll (>= 3.5, < 5.0)
+      jekyll-feed (~> 0.9)
+      jekyll-seo-tag (~> 2.1)
+    minitest (5.14.1)
+    multipart-post (2.1.1)
+    nokogiri (1.10.9)
+      mini_portile2 (~> 2.4.0)
+    octokit (4.18.0)
+      faraday (>= 0.9)
       sawyer (~> 0.8.0, >= 0.5.3)
-    pathutil (0.14.0)
+    pathutil (0.16.2)
       forwardable-extended (~> 2.6)
-    public_suffix (2.0.5)
-    rb-fsevent (0.10.2)
-    rb-inotify (0.9.10)
-      ffi (>= 0.5.0, < 2)
-    rouge (1.11.1)
-    safe_yaml (1.0.4)
-    sass (3.5.1)
+    public_suffix (3.1.1)
+    rb-fsevent (0.10.4)
+    rb-inotify (0.10.1)
+      ffi (~> 1.0)
+    rouge (3.19.0)
+    ruby-enum (0.8.0)
+      i18n
+    rubyzip (2.3.0)
+    safe_yaml (1.0.5)
+    sass (3.7.4)
       sass-listen (~> 4.0.0)
     sass-listen (4.0.0)
       rb-fsevent (~> 0.9, >= 0.9.4)
       rb-inotify (~> 0.9, >= 0.9.7)
-    sawyer (0.8.1)
-      addressable (>= 2.3.5, < 2.6)
-      faraday (~> 0.8, < 1.0)
+    sawyer (0.8.2)
+      addressable (>= 2.3.5)
+      faraday (> 0.8, < 2.0)
     terminal-table (1.8.0)
       unicode-display_width (~> 1.1, >= 1.1.1)
     thread_safe (0.3.6)
-    typhoeus (0.8.0)
-      ethon (>= 0.8.0)
-    tzinfo (1.2.3)
+    typhoeus (1.4.0)
+      ethon (>= 0.9.0)
+    tzinfo (1.2.7)
       thread_safe (~> 0.1)
-    unicode-display_width (1.3.0)
+    unicode-display_width (1.7.0)
+    zeitwerk (2.3.0)
 
 PLATFORMS
   ruby
@@ -213,4 +245,4 @@ DEPENDENCIES
   github-pages
 
 BUNDLED WITH
-   1.11.2
+   2.1.4
diff --git a/bash.md b/bash.md
index 001186e..8a69e96 100644 (file)
--- a/bash.md
+++ b/bash.md
@@ -192,12 +192,16 @@ comment
 
 ### Substrings
 
-| `${FOO:0:3}`  | Substring _(position, length)_ |
-| `${FOO:-3:3}` | Substring from the right |
+| Expression      | Description                    |
+| --------------- | ------------------------------ |
+| `${FOO:0:3}`    | Substring _(position, length)_ |
+| `${FOO:(-3):3}` | Substring from the right       |
 
 ### Length
 
-| `${#FOO}` | Length of `$FOO` |
+| Expression | Description      |
+| ---------- | ---------------- |
+| `${#FOO}`  | Length of `$FOO` |
 
 ### Manipulation
 
@@ -211,15 +215,16 @@ echo ${STR^}   #=> "Hello world!" (uppercase 1st letter)
 echo ${STR^^}  #=> "HELLO WORLD!" (all uppercase)
 ```
 
-
 ### Default values
 
-| `${FOO:-val}`        | `$FOO`, or `val` if not set |
-| `${FOO:=val}`        | Set `$FOO` to `val` if not set |
-| `${FOO:+val}`        | `val` if `$FOO` is set |
-| `${FOO:?message}`    | Show error message and exit if `$FOO` is not set |
+| Expression        | Description                                              |
+| ----------------- | -------------------------------------------------------- |
+| `${FOO:-val}`     | `$FOO`, or `val` if unset (or null)                      |
+| `${FOO:=val}`     | Set `$FOO` to `val` if unset (or null)                   |
+| `${FOO:+val}`     | `val` if `$FOO` is set (and not null)                    |
+| `${FOO:?message}` | Show error message and exit if `$FOO` is unset (or null) |
 
-The `:` is optional (eg, `${FOO=word}` works)
+Omitting the `:` removes the (non)nullity checks, e.g. `${FOO-val}` expands to `val` if unset otherwise `$FOO`.
 
 Loops
 -----
@@ -363,13 +368,15 @@ Note that `[[` is actually a command/program that returns either `0` (true) or `
 | ---                      | ---                   |
 | `(( NUM < NUM ))`        | Numeric conditions    |
 
-| Condition              | Description              |
-| ---                    | ---                      |
-| `[[ -o noclobber ]]`   | If OPTIONNAME is enabled |
-| ---                    | ---                      |
-| `[[ ! EXPR ]]`         | Not                      |
-| `[[ X ]] && [[ Y ]]`   | And                      |
-| `[[ X ]] || [[ Y ]]`   | Or                       |
+#### More conditions
+
+| Condition            | Description              |
+| -------------------- | ------------------------ |
+| `[[ -o noclobber ]]` | If OPTIONNAME is enabled |
+| ---                  | ---                      |
+| `[[ ! EXPR ]]`       | Not                      |
+| `[[ X && Y ]]`       | And                      |
+| `[[ X || Y ]]`       | Or                       |
 
 ### File conditions
 
@@ -401,7 +408,7 @@ fi
 
 ```bash
 # Combinations
-if [[ X ]] && [[ Y ]]; then
+if [[ X && Y ]]; then
   ...
 fi
 ```
index 689d485..1423b47 100644 (file)
@@ -13,9 +13,11 @@ tags: [Featurable]
 
 ### Clicking links and buttons
 
-    click 'Link Text'
-    click_button
-    click_link
+```ruby
+click_on 'Link Text'
+click_button
+click_link
+```
 
 ### Interacting with forms
 
index c6ba11d..a914563 100644 (file)
@@ -53,9 +53,12 @@ weight: -3
 ```
 
 ```css
-  justify-content: flex-start; /* horizontal alignment - default */
-  justify-content: flex-end;
-  justify-content: center;
+  justify-content: flex-start;    /* [xxx        ] */
+  justify-content: center;        /* [    xxx    ] */
+  justify-content: flex-end;      /* [        xxx] */
+  justify-content: space-between; /* [x    x    x] */
+  justify-content: space-around;  /* [ x   x   x ] */
+  justify-content: space-evenly;  /* [  x  x  x  ] */
 ```
 
 ```css
index b850d33..3947bae 100644 (file)
@@ -35,6 +35,7 @@ category: CLI
 | Command         | Description              |
 | ---             | ---                      |
 | `brew update`   | Update brew and cask     |
+| `brew upgrade`  | Upgrade all packages     |
 | `brew list`     | List installed           |
 | `brew outdated` | What's due for upgrades? |
 | `brew doctor`   | Diagnose brew issues     |
diff --git a/knex.md b/knex.md
index c15ef99..69432cb 100644 (file)
--- a/knex.md
+++ b/knex.md
@@ -161,6 +161,7 @@ knex
   .where({ title: 'Hello' })
   .whereIn('id', [1, 2, 3])
   .whereNot(ยทยทยท)
+  .whereNotIn('id', [1, 2, 3])
 ```
 
 #### Where conditions
index 4b1593a..41155dd 100644 (file)
--- a/ledger.md
+++ b/ledger.md
@@ -255,6 +255,7 @@ $ ledger reg
     ^regex$
     @payee
     %tag
+    %tag=value
     =note
     #code
     term and term
index f885717..813a888 100644 (file)
--- a/python.md
+++ b/python.md
@@ -58,7 +58,7 @@ category: Python
     string.replace("-", " ")
     ",".join(list)
     "hi {0}".format('j')
-    "hi {name}" # same as "hi {}".format('name')
+    f"hi {name}" # same as "hi {}".format('name')
     str.find(",")
     str.index(",")   # same, but raises IndexError
     str.count(",")
@@ -121,16 +121,19 @@ category: Python
 ```py
 file = open("hello.txt", "r") # open in read mode 'r'
 file.close() 
+```
 
-print(file.read())  # read the file 
-print fh.readline() # Reading line by line
+```py
+print(file.read())  # read the entire file and set the cursor at the end of file
+print file.readline() # Reading one line
+file.seek(0, 0) # place the cursor at the beggining of the file
 ```
 
 ### Writing (overwrite)
 
 ```py
 file = open("hello.txt", "w") # open in write mode 'w'
-write("Hello World")
+file.write("Hello World") 
 
 text_lines = ["First line", "Second line", "Last line"] 
 file.writelines(text_lines)
@@ -142,7 +145,7 @@ file.close()
 
 ```py
 file = open("Hello.txt", "a") # open in append mode
-write("Hello World again")  
+file.write("Hello World again")  
 file.close()
 ```
 
@@ -150,8 +153,9 @@ file.close()
 
 ```py
 with open("welcome.txt", "r") as file:
-    # 'file' refers directly to the "welcome.txt"
+    # 'file' refers directly to "welcome.txt"
    data = file.read()
+
+# It closes the file automatically at the end of scope, no need for `file.close()`.
 ```
 
-It closes the file automatically, no need for `file.close()`.
diff --git a/vim.md b/vim.md
index 96d9bb3..2010a44 100644 (file)
--- a/vim.md
+++ b/vim.md
@@ -43,7 +43,7 @@ Getting started
 #### Words
 
 | Shortcut     | Description               |
-ff| ---          | ---                       |
+| ---          | ---                       |
 | `b` _/_ `w`  | Previous/next word        |
 | `ge` _/_ `e` | Previous/next end of word |
 {: .-shortcuts}