+------------+-------------------+--------+
| *M* or *m* | moveto | (x y)+ |
+------------+-------------------+--------+
| *Z* or *z* | close path | (none) |
+------------+-------------------+--------+
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| const fetchHTML = (url)=>fetch(url).then(x=>x.text()).then(html=>new DOMParser().parseFromString(html, 'text/html')); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| const chunker = (arr, size) => arr.reduce( | |
| (acc, _, i) => (i % size ? acc : [...acc, arr.slice(i, i + size)]), | |
| []); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| [ | |
| { | |
| "id": "how-much-should-i-pay-for-a-jacket", | |
| "title": "thing How Much Should I Pay For A Leather Jacket?", | |
| "tags":[1,2,3], | |
| "category":"thing", | |
| "image_url":"https://picsum.photos/200/300" | |
| }, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // Usage (from `server` directory): | |
| // $ node -r dotenv/config -r esm src/scripts/seedData.js <PASSWORD> | |
| import faker from "faker"; | |
| import gravatarUrl from "gravatar-url"; | |
| import mongoose from "mongoose"; | |
| import auth0 from "../config/auth0"; | |
| import initMongoose from "../config/mongoose"; | |
| import Post from "../models/Post"; |
Patch mode allows you to stage parts of a changed file, instead of the entire file. This allows you to make concise, well-crafted commits that make for an easier to read history. This feature can improve the quality of the commits. It also makes it easy to remove parts of the changes in a file that were only there for debugging purposes - prior to the commit without having to go back to the editor.
It allows you to see the changes (delta) to the code that you are trying to add, and lets you add them (or not) separately from each other using an interactive prompt. Here's how to use it:
from the command line, either use
- git add -p