├── Marked2.docset
└── Contents
│ ├── Resources
│ ├── docSet.dsidx
│ ├── optimizedIndex.dsidx
│ └── Documents
│ │ ├── cheatset_resources
│ │ ├── Open_Sans.woff
│ │ ├── Open_Sans_Bold.woff
│ │ ├── Open_Sans_Italic.woff
│ │ ├── Open_Sans_Extrabold.woff
│ │ ├── Open_Sans_Semibold.woff
│ │ ├── Open_Sans_Bold_Italic.woff
│ │ ├── Open_Sans_Extrabold_Italic.woff
│ │ └── Open_Sans_Semibold_Italic.woff
│ │ ├── style.css
│ │ └── index.html
│ └── Info.plist
├── ANSI Escape Codes.docset
└── Contents
│ ├── Resources
│ ├── docSet.dsidx
│ ├── optimizedIndex.dsidx
│ └── Documents
│ │ ├── cheatset_resources
│ │ ├── Open_Sans.woff
│ │ ├── Open_Sans_Bold.woff
│ │ ├── Open_Sans_Italic.woff
│ │ ├── Open_Sans_Extrabold.woff
│ │ ├── Open_Sans_Semibold.woff
│ │ ├── Open_Sans_Bold_Italic.woff
│ │ ├── Open_Sans_Extrabold_Italic.woff
│ │ └── Open_Sans_Semibold_Italic.woff
│ │ ├── style.css
│ │ └── index.html
│ └── Info.plist
├── keyboard.md
├── uhk.md
├── LICENSE
├── pdfexpert.md
├── paper.md
├── trickster.md
├── Xcode.md
├── mmdlatext.md
├── tmux.md
├── ulysses.md
├── subl.md
├── towergit.md
├── applestyle.md
├── mmd2cheatset.rb
├── hype3pro.md
├── JSStrings.md
├── Marked2.md
├── sketch.md
├── Marked 2.cheatsheet.txt
├── jquery1.9.md
├── ANSI.cheatsheet.txt
├── ANSI.md
├── drush.md
└── JavaScript.md
/Marked2.docset/Contents/Resources/docSet.dsidx:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ttscoff/mmd2cheatset/master/Marked2.docset/Contents/Resources/docSet.dsidx
--------------------------------------------------------------------------------
/Marked2.docset/Contents/Resources/optimizedIndex.dsidx:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ttscoff/mmd2cheatset/master/Marked2.docset/Contents/Resources/optimizedIndex.dsidx
--------------------------------------------------------------------------------
/ANSI Escape Codes.docset/Contents/Resources/docSet.dsidx:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ttscoff/mmd2cheatset/master/ANSI Escape Codes.docset/Contents/Resources/docSet.dsidx
--------------------------------------------------------------------------------
/ANSI Escape Codes.docset/Contents/Resources/optimizedIndex.dsidx:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ttscoff/mmd2cheatset/master/ANSI Escape Codes.docset/Contents/Resources/optimizedIndex.dsidx
--------------------------------------------------------------------------------
/Marked2.docset/Contents/Resources/Documents/cheatset_resources/Open_Sans.woff:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ttscoff/mmd2cheatset/master/Marked2.docset/Contents/Resources/Documents/cheatset_resources/Open_Sans.woff
--------------------------------------------------------------------------------
/Marked2.docset/Contents/Resources/Documents/cheatset_resources/Open_Sans_Bold.woff:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ttscoff/mmd2cheatset/master/Marked2.docset/Contents/Resources/Documents/cheatset_resources/Open_Sans_Bold.woff
--------------------------------------------------------------------------------
/Marked2.docset/Contents/Resources/Documents/cheatset_resources/Open_Sans_Italic.woff:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ttscoff/mmd2cheatset/master/Marked2.docset/Contents/Resources/Documents/cheatset_resources/Open_Sans_Italic.woff
--------------------------------------------------------------------------------
/ANSI Escape Codes.docset/Contents/Resources/Documents/cheatset_resources/Open_Sans.woff:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ttscoff/mmd2cheatset/master/ANSI Escape Codes.docset/Contents/Resources/Documents/cheatset_resources/Open_Sans.woff
--------------------------------------------------------------------------------
/Marked2.docset/Contents/Resources/Documents/cheatset_resources/Open_Sans_Extrabold.woff:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ttscoff/mmd2cheatset/master/Marked2.docset/Contents/Resources/Documents/cheatset_resources/Open_Sans_Extrabold.woff
--------------------------------------------------------------------------------
/Marked2.docset/Contents/Resources/Documents/cheatset_resources/Open_Sans_Semibold.woff:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ttscoff/mmd2cheatset/master/Marked2.docset/Contents/Resources/Documents/cheatset_resources/Open_Sans_Semibold.woff
--------------------------------------------------------------------------------
/Marked2.docset/Contents/Resources/Documents/cheatset_resources/Open_Sans_Bold_Italic.woff:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ttscoff/mmd2cheatset/master/Marked2.docset/Contents/Resources/Documents/cheatset_resources/Open_Sans_Bold_Italic.woff
--------------------------------------------------------------------------------
/ANSI Escape Codes.docset/Contents/Resources/Documents/cheatset_resources/Open_Sans_Bold.woff:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ttscoff/mmd2cheatset/master/ANSI Escape Codes.docset/Contents/Resources/Documents/cheatset_resources/Open_Sans_Bold.woff
--------------------------------------------------------------------------------
/ANSI Escape Codes.docset/Contents/Resources/Documents/cheatset_resources/Open_Sans_Italic.woff:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ttscoff/mmd2cheatset/master/ANSI Escape Codes.docset/Contents/Resources/Documents/cheatset_resources/Open_Sans_Italic.woff
--------------------------------------------------------------------------------
/Marked2.docset/Contents/Resources/Documents/cheatset_resources/Open_Sans_Extrabold_Italic.woff:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ttscoff/mmd2cheatset/master/Marked2.docset/Contents/Resources/Documents/cheatset_resources/Open_Sans_Extrabold_Italic.woff
--------------------------------------------------------------------------------
/Marked2.docset/Contents/Resources/Documents/cheatset_resources/Open_Sans_Semibold_Italic.woff:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ttscoff/mmd2cheatset/master/Marked2.docset/Contents/Resources/Documents/cheatset_resources/Open_Sans_Semibold_Italic.woff
--------------------------------------------------------------------------------
/ANSI Escape Codes.docset/Contents/Resources/Documents/cheatset_resources/Open_Sans_Extrabold.woff:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ttscoff/mmd2cheatset/master/ANSI Escape Codes.docset/Contents/Resources/Documents/cheatset_resources/Open_Sans_Extrabold.woff
--------------------------------------------------------------------------------
/ANSI Escape Codes.docset/Contents/Resources/Documents/cheatset_resources/Open_Sans_Semibold.woff:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ttscoff/mmd2cheatset/master/ANSI Escape Codes.docset/Contents/Resources/Documents/cheatset_resources/Open_Sans_Semibold.woff
--------------------------------------------------------------------------------
/ANSI Escape Codes.docset/Contents/Resources/Documents/cheatset_resources/Open_Sans_Bold_Italic.woff:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ttscoff/mmd2cheatset/master/ANSI Escape Codes.docset/Contents/Resources/Documents/cheatset_resources/Open_Sans_Bold_Italic.woff
--------------------------------------------------------------------------------
/ANSI Escape Codes.docset/Contents/Resources/Documents/cheatset_resources/Open_Sans_Extrabold_Italic.woff:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ttscoff/mmd2cheatset/master/ANSI Escape Codes.docset/Contents/Resources/Documents/cheatset_resources/Open_Sans_Extrabold_Italic.woff
--------------------------------------------------------------------------------
/ANSI Escape Codes.docset/Contents/Resources/Documents/cheatset_resources/Open_Sans_Semibold_Italic.woff:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ttscoff/mmd2cheatset/master/ANSI Escape Codes.docset/Contents/Resources/Documents/cheatset_resources/Open_Sans_Semibold_Italic.woff
--------------------------------------------------------------------------------
/keyboard.md:
--------------------------------------------------------------------------------
1 | {
2 | "id": "mmd",
3 | "style": "css/h4dark.css",
4 | "layout": "default"
5 | }
6 | %%%END
7 | ### Keyboard Shortcuts
8 |
9 |
10 | #### Text shortcuts
11 |
12 | Command|Description
13 | --|--
14 | ^a|Beginning of line
15 | ^e|End of line
16 | ^f|Cursor forward
17 | ^b|Cursor back
18 | ^n|Next line
19 | ^p|Previous line
20 | ^k|Delete to end of line (kill)
21 | ^y|Paste buffer
22 |
23 |
--------------------------------------------------------------------------------
/uhk.md:
--------------------------------------------------------------------------------
1 | {
2 | "id": "auto",
3 | "style": "css/h4dark.css",
4 | "layout": "default"
5 | }
6 | %%%END
7 | ### Ultimate Hacking Keyboard
8 |
9 | #### Base
10 |
11 | 
12 |
13 | #### Mod
14 |
15 | 
16 |
17 | #### Function
18 |
19 | 
20 |
21 | #### Mouse
22 |
23 | 
24 |
25 |
--------------------------------------------------------------------------------
/ANSI Escape Codes.docset/Contents/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleIdentifier
6 | cheatsheet
7 | CFBundleName
8 | ANSI
9 | DashDocSetFamily
10 | cheatsheet
11 | DashDocSetKeyword
12 | ansi
13 | DashDocSetPluginKeyword
14 | ansi
15 | DocSetPlatformFamily
16 | cheatsheet
17 | dashIndexFilePath
18 | index.html
19 | isDashDocset
20 |
21 |
22 |
23 |
--------------------------------------------------------------------------------
/Marked2.docset/Contents/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleIdentifier
6 | cheatsheet
7 | CFBundleName
8 | Marked 2
9 | DashDocSetFamily
10 | cheatsheet
11 | DashDocSetKeyword
12 | marked
13 | DashDocSetPluginKeyword
14 | marked
15 | DocSetPlatformFamily
16 | cheatsheet
17 | dashIndexFilePath
18 | index.html
19 | isDashDocset
20 |
21 |
22 |
23 |
--------------------------------------------------------------------------------
/LICENSE:
--------------------------------------------------------------------------------
1 | MIT License
2 |
3 | Copyright (c) 2019 Brett Terpstra
4 |
5 | Permission is hereby granted, free of charge, to any person obtaining a copy
6 | of this software and associated documentation files (the "Software"), to deal
7 | in the Software without restriction, including without limitation the rights
8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 | copies of the Software, and to permit persons to whom the Software is
10 | furnished to do so, subject to the following conditions:
11 |
12 | The above copyright notice and this permission notice shall be included in all
13 | copies or substantial portions of the Software.
14 |
15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21 | SOFTWARE.
22 |
--------------------------------------------------------------------------------
/pdfexpert.md:
--------------------------------------------------------------------------------
1 | {
2 | "id": "auto",
3 | "style": "css/h4dark.css",
4 | "layout": "default"
5 | }
6 | %%%END
7 | ### PDF Expert for OS X Keyboard Shortcuts
8 |
9 | #### Open and Save
10 |
11 | Command | Action
12 | --: | :--
13 | xCMD N | Create new blank document
14 | xCMD O | Open file...
15 | xCMD T | Open new tab
16 | xCMD W | Close tab
17 | xSHIFT xCMD W | Close window
18 | xSHIFT D | Add bookmark to current page
19 | xCMD S | Save
20 | xSHIFT xCMD S | Save as...
21 |
22 | #### Views
23 |
24 | Command | Action
25 | --: | :--
26 | xCMD + | Zoom in
27 | xCMD - | Zoom out
28 | xCMD 1 | Single page view
29 | xCMD 2 | Two page view
30 | xCMD 3 | Two page view but first one single
31 | xCMD 4 | Thumbnails view
32 | xOPT xCMD 1 | Bookmarks
33 | xOPT xCMD 2 | Outline
34 | xOPT xCMD 3 | Annotation summary
35 | xOPT xCMD 4 | No left panel
36 |
37 | #### Text and Tools
38 |
39 | Command | Action
40 | --: | :--
41 | ⌃xCMD H | Highlight
42 | ⌃xCMD U | Underline
43 | ⌃xCMD S | Strikethrough
44 | ⌃xCMD T | Text
45 | ⌃xCMD P | Pen
46 | ⌃xCMD E | Eraser
47 | ⌃xCMD N | Note
48 | ⌃xCMD R | Rectangle
49 | ⌃xCMD O | Oval
50 | ⌃xCMD L | Line
51 | ⌃xCMD A | Arrow
52 |
--------------------------------------------------------------------------------
/paper.md:
--------------------------------------------------------------------------------
1 | {
2 | "id": "paper",
3 | "style": "css/h4dark.css",
4 | "layout": "default"
5 | }
6 | %%%END
7 | ### Dropbox Paper Shortcuts
8 |
9 | The following keyboard shortcuts work in the Papers Web browser interface.
10 |
11 | #### Formatting
12 |
13 | | Shortcut | Action |
14 | | ----:|:---- |
15 | | xCMD + b | Bold |
16 | | xCMD + i | Italic |
17 | | xCMD + u | Underline |
18 | | xCMD + xOPT + s | Strikethrough |
19 | | xCMD + e | Highlight |
20 | | ` code ` | code |
21 | | # SPACE | Heading 1 |
22 | | ## SPACE | Heading 2 |
23 | | 1. SPACE | Numbered list |
24 | | * SPACE | Bulleted list |
25 | | > SPACE | Blockquote |
26 | | [] SPACE | Checkbox |
27 | | xCMD + ENTER | Check/uncheck checkbox |
28 | | \`\`\` | Code block |
29 | | xCMD + v | Paste a link onto selected text |
30 | | xCMD + k | Insert a link |
31 |
32 | #### Insert
33 |
34 | | Shortcut | Action |
35 | | ----:|:---- |
36 | | @ | Mention person (@Christina) |
37 | | + | Link to doc ( + Meeting Notes 1/7/2016) |
38 | | : | Insert emoji 😀 |
39 |
40 | #### Actions
41 |
42 | | Shortcut | Action |
43 | | ----:|:---- |
44 | | TAB | Indent |
45 | | xSHIFT + TAB | Unindent |
46 | | xOPT + ↑ | Move line up |
47 | | xOPT + ↓ | Move line down |
48 | | xCMD + xOPT + m | Add a comment |
49 | | xCMD + ENTER | Post comment |
50 |
51 | #### Application
52 |
53 | | Shortcut | Action |
54 | | ----:|:---- |
55 | | xCMD + xOPT + n | Create new doc |
56 | | xCMD + xSHIFT + s | Share |
57 | | xCMD + xSHIFT + o | Search docs |
58 | | xCMD + / | Open keyboard shortcut help
59 |
--------------------------------------------------------------------------------
/trickster.md:
--------------------------------------------------------------------------------
1 | {
2 | "id": "auto",
3 | "style": "css/h4dark.css",
4 | "layout": "default"
5 | }
6 | %%%END
7 | ### Trickster Keyboard Shortcuts
8 |
9 | **Global Hotkey**: xCTRLZ
10 |
11 | #### Global
12 |
13 | | Shortcut | Action |
14 | | -----: | :------ |
15 | | xCMD1 | Filters |
16 | | xCMD2 | Items |
17 | | xCMD3 | Favorites |
18 | | →, ← | Move between sections |
19 | | xCMD, | Preferences |
20 | | xCMDT | Global File Tracking Settings |
21 | | xCMD- | Basic File View: only filename & icon |
22 | | xCMD= | Extended File View: folder+preview |
23 | | xCMDN | Sort by name |
24 | | xCMDR | Sort by date (recent on top) |
25 | | xCTRLP | Previous item (same as↑ ) |
26 | | xCTRLN | Next item (same as↓ ) |
27 |
28 |
29 | #### In Recent File List
30 |
31 | | Shortcut | Action |
32 | | ------: | ------ |
33 | | xCMDM | Show Context Menu for selected |
34 | | xCMDC | Copy to clipboard |
35 | | xCMDF | Flag selected |
36 | | xCMDxOPTF | Unflag selected |
37 | | xCMDS | Add to favorites |
38 | | xCMDxOPTS | Remove from favorites |
39 | | ⌦ or ⌫ | Remove selected from list |
40 | | xCMD⌦ or ⌫ | Move selected to trash |
41 | | xOPT⌦ or xOPT⌫ | Remove all files that are in the folder as the selected. They'll show up again. |
42 |
43 | #### In File Tracker and Filter Editors
44 |
45 | | Shortcut | Action |
46 | | ------: | ------ |
47 | | 1-5 | Select the relevant section |
48 | | xCMD= | Add new item |
49 | | xCMD- | Remove selected items |
50 |
51 | #### In Search
52 |
53 | | Shortcut | Action |
54 | | ------: | ------ |
55 | | ⎋ | Clear Search |
56 | | ↑ ↓ or xCMD2 | Switch to recent items list |
57 |
58 |
--------------------------------------------------------------------------------
/Xcode.md:
--------------------------------------------------------------------------------
1 | {
2 | "id": "auto",
3 | "style": "css/h4dark.css",
4 | "layout": "default"
5 | }
6 | %%%END
7 | ### Xcode Keyboard Shortcuts
8 |
9 |
20 |
21 | #### Navigate
22 | | Shortcut | Action |
23 | | --|--|
24 | | xCMD xSHIFT O | Quick open |
25 | | xCMD xOPT ← | Go back in main editor |
26 | | xCMD xOPT → | Go forward in main editor |
27 | | xCMD xOPT + Click | Open target in the assistant editor |
28 | | xOPT xCMD + Click | Open target in assistant editor |
29 | | xCMD ⏎ | Close the assistant editor |
30 | | xCTRL 1 | Open Related Files menu |
31 | | xCTRL 2 | History drop down |
32 | | xCTRL 6 | Open the Jump Bar |
33 | | xCMD xSHIFT ⏎ | Maximize the editor |
34 | | xCMD J | Move focus to a new area |
35 | | xCMD xOPT xSHIFT + Click | Open target in a new focus area |
36 |
37 | #### Edit
38 | |Command|Description|
39 | |--|--|
40 | | xCTRL SPACE | Show completion list |
41 | | xOPT xCMD [ | Move line up |
42 | | xOPT xCMD ] | Move line down |
43 | | xCTRL xCMD E | Edit all in scope |
44 | | xCTRL I | Re-indent line |
45 |
46 | #### Fold
47 | | Command | Description |
48 | |--|--|
49 | | xCMD xOPT | Fold |
50 | | xCMD xOPT | Unfold |
51 | | xCMD xOPT xSHIFT | Fold methods & functions |
52 | | xCMD xOPT xSHIFT | Unfold methods & functions |
53 | | xCMD xCTRL xSHIFT | Fold comments |
54 | | xCMD xCTRL xSHIFT | Unfold comments |
55 |
56 | #### Build
57 | | Command | Description |
58 | |--|--|
59 | | xCMD B | Build |
60 | | xCMD R | Run |
61 | | xCMD xSHIFT K | Clean |
62 | | xCMD xOPT xSHIFT K | Clean build folder |
63 | | xCMD \ | Add or Remove a breakpoint |
64 | | xCMD ' | Jump to the next issue |
65 | | xCMD xSHIFT ' | Jump to previous next issue |
66 | | xCMD xCTRL ' | Fix the next issue |
67 | | xCMD xCTRL xSHIFT ' | Fix the previous issue |
68 |
69 | #### Schemes
70 | | Command|Description |
71 | | --|-- |
72 | | xCTRL xCMD ] | Select next scheme |
73 | | xCTRL xCMD [ | Select previous scheme |
74 |
75 | #### Other
76 | | Command|Description |
77 | | --|-- |
78 | | xCMD xCTRL J | Jump to the definition |
79 | | xOPT Click | Show the inferred type |
80 |
--------------------------------------------------------------------------------
/mmdlatext.md:
--------------------------------------------------------------------------------
1 | {
2 | "id": "mmdlatex",
3 | "style": "css/h4dark.css",
4 | "layout": "default"
5 | }
6 | %%%END
7 | ### Conversion of citations from MultiMarkDown 4 to LaTeX
8 |
9 |
20 |
21 | #### Parenthetical citations
22 | | MMD4 | natbib | Output |
23 | | --|--|
24 | | [#jon90] | \citep{jon90} | (Jones et al., 1990) |
25 | | [#jon90]\[] | \citep{jon90} |
26 | | \[chap. 2][#jon90] | \citep[chap. 2]{jon90} | (Jones et al., 1990, chap. 2) |
27 | | \[chap. 2]\[véase]\[#jon90] | \citep[chap. 2][véase]{jon90} | (véase Jones et al., 1990, chap. 2) |
28 | | | \citep\[véase]\[]{jon90} | (véase Jones et al., 1990) |
29 |
30 | #### Textual citations
31 | | MMD4 | natbib | Output |
32 | |--|--|
33 | | [#jon90;] | \citet{jon90} | Jones et al. (1990) |
34 | | [#jon90;][] | \citet{jon90} | |
35 | | [chap. 2][#jon90;] | \citet[chap. 2]{jon90} | Jones et al. (1990, chap. 2) |
36 | | [chap. 2\]\[véase][#jon90;] | \citet[chap. 2][véase]{jon90} | |
37 |
38 | #### Full author list
39 | | MMD4 | natbib | Output |
40 | |--|--|
41 | | | \citep\ *{jon90} | (Jones, Baker, et Williams, 1990) |
42 | | | \citet\*{jon90} | Jones, Baker, et Williams (1990) |
43 |
44 | #### Multiple citations
45 | | MMD4 | natbib | Output |
46 | |--|--| -- |
47 | | [#jon90,james91] | \citep{jon90,jam91} | (Jones et al., 1990; James et al. 1991) |
48 | | | \citep{jon90,jon91} | (Jones et al., 1990, 1991) |
49 | | | \citep{jon90a,jon90b} | (Jones et al., 1990a,b) |
50 | | | \citet{jon90,jam91} | Jones et al. (1990); James et al. (1991) |
51 |
52 |
53 |
54 | In Scrivener, it is possible to write _[][#jon90],[][#james91]_ if we add to the Compile \| Replacements dialog:
55 |
56 | ][],[# --> ,
57 | ],[][# --> ,
58 |
59 | #### Partial citations
60 | | MMD4 | natbib | Output |
61 | | --|-- |
62 | | | \citeauthor{jon90} | Jones et al. |
63 | | | \citeauthor*{jon90} | Jones, Baker, et Williams |
64 | | | \citeyear{jon90} | 1990 |
65 | | | \citeyearpar{jon90} | (1990) |
66 |
67 |
68 | #### Forcing upper cased names
69 | | MMD4 | natbib | Output |
70 | | --|-- |
71 | | | \Citep{dRob98} | (Della Robbia, 1998) |
72 | | | \Citet{dRob98} | Della Robbia (1998) |
73 | | | \Citeauthor{dRob98} | Della Robbia |
74 |
75 | #### Including a source in bibliography that was not cited
76 | | MMD4 | natbib | Output |
77 | | --|-- | -- |
78 | | \[Not cited][#jon90] | | |
79 |
--------------------------------------------------------------------------------
/tmux.md:
--------------------------------------------------------------------------------
1 | ###Tmux
2 |
3 | | Command | Description |
4 | | ------ | ------ |
5 | | tmux | Start tmux |
6 | | tmux new -s *sessionname* | Start tmux with a new session called *sessionname* |
7 | | tmux ls | Get a list of all running sessions |
8 | | tmux new -s *sessionname* -d | Create a new detached session |
9 | | tmux attach -t *sessionname* | Attach to a session by name |
10 | | tmux kill-session -t *sessionname* | Kill a session by name |
11 | | tmux new -s *name* -n *command* | Run *command* in a new window in a new session |
12 | [Command Line]
13 |
14 | | Command | Description |
15 | | ------ | ------ |
16 | | `prefix`[^1] **d** | Detach from a session |
17 | | `prefix` **c** | Create a new window |
18 | | `prefix` **n** | Next window in this session |
19 | | `prefix` **p** | Previous window in this session |
20 | | `prefix` **,** | Rename current window |
21 | | `prefix` **#** | Switch to window `#` |
22 | | `prefix` **f** | Find a window by name |
23 | | `prefix` **w** | Display a menu to choose a window |
24 | | `prefix` **&** | Prompt to kill the window |
25 | | `prefix` **%** | Divide window vertically into panes |
26 | | `prefix` **"** | Divide window horizontally into panes |
27 | | `prefix` **o** | Cycle through panes |
28 | | `prefix` ***arrow keys*** | Cycle through panes |
29 | | `prefix` ***spacebar*** | Cycle through pane layouts |
30 | | `prefix` **x** | Prompt to kill the pane (or window for last pane) |
31 | | `prefix` **:** | Enter Command Mode |
32 | | `prefix` **?** | List all keybindings |
33 | | `prefix` **[** | Enter Copy Mode |
34 | | `prefix` **]** | Paste from Copy Mode |
35 | [Inside tmux]
36 |
37 | | Command | Description |
38 | | ------ | ------ |
39 | | `Space` | Start copy |
40 | | *movement keys* | Expand your selection |
41 | | ? | Start backward search through buffer |
42 | | / | Start forward search through buffer |
43 | | f *character* | Move to next occurrence of *character* |
44 | | F *character* | Move to previous occurrence of *character* |
45 | | `Enter` | End copy |
46 | [Copy Mode Keys]
47 |
48 | | Setting | Default | Recommended | command[^2] |
49 | | ------ | ------ | ------ | ------ |
50 | | `Prefix` | `ctrl-b` | `ctrl-a` | `set -g prefix C-a`[^3] |
51 | | Escape Time | 500 | 1 | `set -s escape-time 1` |
52 | | Split window into two vertical panes | `prefix` % | `prefix |` | `bind | split-window -h` |
53 | | Split window into two horizontal panes | `prefix` " | `prefix -` | `bind - split-window -v` |
54 | | Use vi-style bindings in Copy Mode | N/A | hjkl for moving around | `sets -g mode-keys vi` |
55 | [Recommended Configuration Changes]
56 |
57 | *Many of these hints are from [tmux: Productive Mouse-Free Development](http://pragprog.com/book/bhtmux/tmux) by Brian P. Hogan.*
58 |
59 | [^1]: By default `prefix` is mapped to `ctrl-b`. If you haven't remapped your `Caps Lock` key to `ctrl` yet, now would be a good time to do so!
60 |
61 | [^2]: This is the line you add to your `.tmux.conf` file
62 |
63 | [^3]: You should probably also add a line to unbind the defaults if you bind new keys for things. Just add a line saying `unbind C-b` to unbind the default `prefix` key.
64 |
--------------------------------------------------------------------------------
/ulysses.md:
--------------------------------------------------------------------------------
1 | {
2 | "id": "auto",
3 | "style": "css/h4dark.css",
4 | "layout": "default"
5 | }
6 | %%%END
7 | ### Ulysses Keyboard Shortcuts
8 |
9 | #### Views
10 | Action | Shortcut
11 | -- | --
12 | xCMD1 | Toggle Sidebars
13 | xCMD2 | Toggle Sheet List
14 | xCMD3 | Toggle Editor-only view
15 | xCMD4 | Toggle Attachment Bar
16 | xCMD5 | Go to Favourites group (5orites)
17 | xCMD6 | Show Quick Export (6port)
18 | xCMD7 | Show Statistics
19 | xCMD8 | Show Navigator (Navig8or)
20 | xCMD9 | Show Markup Bar
21 |
22 | #### Focus
23 | Action | Shortcut
24 | -- | --
25 | → | Expand selected group(s) in Sidebar
26 | → | In Sidebar to switch focus to Sheet List
27 | ← | In Sheet List to switch focus to Sidebar
28 | → | In Sheet List to switch focus to Editor
29 | xCMD←(twice) | In Editor to switch focus to Sheet List
30 | ⇧xCMDF | Switch focus to Sheet List filter (Global)
31 |
32 | #### Sheets
33 | Action | Shortcut
34 | -- | --
35 | xCMDN | to create a new sheet
36 | xCMDS | Create new version of current sheet
37 | ⇧xCMDN | Create a new group in Sidebar
38 | xCTRLxCMDN | Create a new Sheet List filter
39 | xCMDO | Look for a sheet in the whole library (Quickpanel)
40 | ⇧xCMDO | Look for a sheet in current section (iCloud, On My Mac, etc.)
41 | xOPTxCMDO | Look for a sheet in currently selected group
42 | ESC | Close Sheet List filter/Quicklook Window
43 | ⇧xCMDP | Preview the current Sheet List/Group selection
44 |
45 | #### Editor
46 | Action | Shortcut
47 | -- | --
48 | ↩ | Paragraph
49 | ⇧↩︎ | Insert line break
50 | xCMD↩ | New line after paragraph
51 | xCMDZ | Undo edit
52 | ⇧xCMDZ | Redo edit
53 | xCMD+ | Increase font size
54 | xCMD- | Decrease font size
55 | xCMD0 | Reset font size to default value
56 | xCMDF | Show Find panel
57 | xOPTxCMDF | Show Find & Replace panel
58 | ESC | Close Find/Replace panel
59 | xCMDV | Hold to invoke Smart Paste or
60 | ⇧xCMDV | Invoke Smart Paste
61 | xCMD; | Spellcheck current sheet
62 | xCMD⇧; | Open Spellcheck panel
63 | xOPTxCMD↑ | Switch focus to previous sheet
64 | xOPTxCMD↓ | Switch focus to next sheet
65 | xOPTxCMDT | Toggle Typewriter Scrolling
66 |
67 | #### Text Objects
68 | Action | Shortcut
69 | -- | --
70 | xCMD-Click | Select
71 | Double-click | Open popover
72 | ⇥ | Switch between input fields in Popover
73 | xCMD↩ | Close Text Object Popover and move insertion point forward
74 | esc | Close Text Object Popover and keep object selected
75 |
76 | #### Markup
77 | Action | Shortcut
78 | -- | --
79 | xCMD\ | Headlines
80 | xCMDI | _emphasize_
81 | xCMDB | **strong**
82 | xCMDK | [links]
83 | xCMDL | Remove Markup
84 | xCMD9 | Show Markup Bar
85 | ⇥ | Increase list indentation
86 | ⇧⇥ | Decrease list indentation
87 | ↩ | Add another list item (if enabled)
88 | xOPT↩ | Create new paragraph in list item
89 | %% | Mark paragraph as Comment
90 | {} | Add Annotation
91 | (img) | Add Image
92 | (fn) | Add Footnote
93 | \ | Next character(s) as text
94 | ESC | Add end tag placeholder
95 | ↩ | Accept end tag
96 | ⇥ | Accept end tag
97 | ↓ (at end of a sheet) | Accept end tag
98 | Type in the end tag | Accept end tag
99 | ESC | Dismiss end tag
100 |
101 | #### General
102 | Action | Shortcut
103 | -- | --
104 | xOPTxCMDL | Toggle Dark Theme
105 | xOPTxCMDX | Toggle Dark Mode
106 | xCTRLxCMDF | Toggle Fullscreen Mode
107 | xOPTxCMDN | Open new Window
108 | xCMDW | Close Window
109 | xCTRLxCMDZ | Zoom Wndow
110 | xCTRLxCMDP | Preview
111 | xCMDR | Refresh Previews
112 | xCMDP | Print
113 |
--------------------------------------------------------------------------------
/subl.md:
--------------------------------------------------------------------------------
1 | {
2 | "id": "auto",
3 | "style": "css/h4dark.css",
4 | "layout": "default"
5 | }
6 | %%%END
7 | ### Sublime Text 2
8 |
9 | * SUPER = CTRL ^ on PC or CMD ⌘ on Mac
10 | * taken from this [Google Doc](https://docs.google.com/spreadsheet/ccc?key=0AnLDKkpwS2wCdHVoRGdlZ2h0MVhjLXlVTVJFbVFCWWc&hl=en_GB#gid=0)
11 |
12 | #### General
13 | | Keyboard Shortcut | Function |
14 | | ------ | ------- |
15 | |SUPER + y | Redo or repeat |
16 | |SUPER + u | Soft Undo |
17 | |SUPER + SHIFT + u | Soft Redo|
18 | |CTRL + ALT + up | scroll 1 line up |
19 | |CTRL + ALT + down | scroll 1 line down |
20 | |CTRL + tab | next_view_in_stack (next tab) |
21 | |CTRL + SHIFT + tab | prev_view_in_stack (previous tab)|
22 | |SUPER + SHIFT + v | Paste & indent|
23 |
24 | #### Find
25 | | Keyboard Shortcut | Function |
26 | | ------ | ------- |
27 | |SUPER + f | find|
28 | |SUPER + SHIFT + f | find in files |
29 | |SUPER + ALT + f | replace |
30 | |SUPER + g | find_next |
31 | |SUPER + SHIFT + g | find_prev|
32 | |SUPER + e | slurp_find_string|
33 | |SUPER + i | Incremental find|
34 | |SUPER + h | Search and replace|
35 | |CTRL + ALT + SHIFT + left | Move left by subword|
36 | |CTRL + ALT + SHIFT + right | Move right by subword|
37 |
38 | #### Selecting
39 | | Keyboard Shortcut | Function |
40 | | ------ | ------- |
41 | |SUPER + SHIFT + l | split_selection_into_lines|
42 | |SUPER + l | expand selection|
43 | |SUPER + d | expand selection (of each occurrence of that word)|
44 | |SUPER + SHIFT + space | expand selection (to scope)|
45 | |CTRL + SHIFT + m | expand selection (to brackets)|
46 | |CTRL + SUPER + up | Swap Line Up|
47 | |CTRL + SUPER + down | Swap Line Down|
48 | |CTRL + SHIFT + up | select_lines up|
49 | |CTRL + SHIFT + down | select_lines down|
50 | |SUPER + SHIFT + d | duplicate line|
51 | |SUPER + j | join lines|
52 |
53 | #### Commands
54 | | Keyboard Shortcut | Function |
55 | | ------ | ------- |
56 | |SUPER + SHIFT + p | Go to anything|
57 | |SUPER + t | Go to Files|
58 | |SUPER + r | Go to Symbol|
59 | |CTRL + g | Go to line|
60 | |SUPER + p & then : | Go to word|
61 | |SUPER + p & then @ | Go to symbol|
62 | |CTRL + ` | Show console|
63 | |SUPER + b | Build|
64 | |CTRL + t | Transpose|
65 | |SUPER + ] | Indent|
66 | |SUPER + [ | Unindent|
67 | |SUPER + k | Uppercase|
68 | |ENTER | insert best completion|
69 | |CTRL + space | Auto complete|
70 |
71 | #### UI
72 | | Keyboard Shortcut | Function |
73 | | ------ | ------- |
74 | |SUPER + CTRL + f (Win) | Full screen|
75 | |SUPER + CTRL + SHIFT + f | Distraction free|
76 | |SUPER + ALT + 1 | Single View|
77 | |SUPER + ALT + 2 | Two columns|
78 | |SUPER + ALT + 3 | Three columns|
79 | |SUPER + ALT + 4 | Four columns|
80 | |SUPER + ALT + SHIFT + 2 | Two rows|
81 | |SUPER + ALT + SHIFT + 4 | Three rows|
82 | |SUPER + ALT + 5 | Grid 4|
83 |
84 | #### Bookmarks
85 | | Keyboard Shortcut | Function |
86 | | ------ | ------- |
87 | |SUPER + F2 | Toggle bookmark|
88 | |F2 | Next bookmark|
89 | |SHIFT + F2 | Prev bookmark|
90 |
91 | #### Folding
92 | | Keyboard Shortcut | Function |
93 | | ------ | ------- |
94 | |SUPER + SHIFT + j | Fold|
95 | |SUPER + j | Unfold all|
96 |
97 | #### CTags
98 | | Keyboard Shortcut | Function |
99 | | ------ | -------
100 | |CTRL + t CTRL + r | rebuild_ctags |
101 | |CTRL + t CTRL + t | navigate_to_definition |
102 | |CTRL + t CTRL + b | jump_back |
103 | |CTRL + t CTRL + m | jump_back to_last_modification |
104 | |ALT + s | show_symbols |
105 | |ALT + SHIFT + s | show_symbols multi|
106 |
--------------------------------------------------------------------------------
/towergit.md:
--------------------------------------------------------------------------------
1 | {
2 | "id": "auto",
3 | "style": "default",
4 | "layout": "multicolumn"
5 | }
6 | %%%END
7 | # Git
8 |
9 | ### Create
10 |
11 | Clone an existing repository
12 |
13 | $ git clone ssh://user@domain.com/repo.git
14 |
15 | Create a new local repository
16 |
17 |
18 | $ git init
19 |
20 | ### Local Changes
21 |
22 | Changed files in your working directory
23 |
24 |
25 | $ git status
26 |
27 | Changes to tracked files
28 |
29 |
30 | $ git diff
31 |
32 | Add all current changes to the next commit
33 |
34 |
35 | $ git add .
36 |
37 | Add some changes in to the next commit
38 |
39 |
40 | $ git add -p
41 |
42 | Commit all local changes in tracked files
43 |
44 |
45 | $ git commit -a
46 |
47 | Commit previously staged changes
48 |
49 |
50 | $ git commit
51 |
52 | Change the last commit
53 | _Don't amend published commits!_
54 |
55 |
56 | $ git commit --amend
57 |
58 | ### Commit History
59 |
60 | Show all commits, starting with newest
61 |
62 |
63 | $ git log
64 |
65 | Show changes over time for a specific file
66 |
67 |
68 | $ git log -p
69 |
70 | Who changed what and when in
71 |
72 |
73 | $ git blame
74 |
75 | ### Branches & Tags
76 |
77 | List all existing branches
78 |
79 |
80 | $ git branch
81 |
82 | Switch HEAD branch
83 |
84 |
85 | $ git checkout
86 |
87 | Create a new branch based on your current HEAD
88 |
89 |
90 | $ git branch
91 |
92 | Create a new tracking branch based on a remote branch
93 |
94 |
95 | $ git branch --track
96 |
97 | Delete a local branch
98 |
99 |
100 | $ git branch -d
101 |
102 | Mark the current commit with a tag
103 |
104 |
105 | $ git tag
106 |
107 | ### Update & Publish
108 |
109 | List all currently configured remotes
110 |
111 |
112 | $ git remote -v
113 |
114 | Show information about a remote
115 |
116 |
117 | $ git remote show
118 |
119 | Add new remote repository, named
120 |
121 |
122 | $ git remote add
123 |
124 | Download all changes from , but don't integrate into HEAD
125 |
126 |
127 | $ git fetch
128 |
129 | Download changes and directly merge/integrate into HEAD
130 |
131 |
132 | $ git pull
133 |
134 | Publish local changes on a remote
135 |
136 |
137 | $ git push
138 |
139 | Delete a branch on the remote
140 |
141 |
142 | $ git push :
143 |
144 | Publish your tags
145 |
146 |
147 | $ git push --tags
148 |
149 | ### Merge & Rebase
150 |
151 | Merge into your current HEAD
152 |
153 |
154 | $ git merge
155 |
156 | Rebase your current HEAD onto
157 |
158 | _Don't rebase published commits!_
159 |
160 |
161 | $ git rebase
162 |
163 | Abort a rebase
164 |
165 |
166 | $ git rebase --abort
167 |
168 | Continue a rebase after resolving conflicts
169 |
170 |
171 | $ git rebase --continue
172 |
173 | Use your configured merge tool to solve conflicts
174 |
175 |
176 | $ git mergetool
177 |
178 | Use your editor to manually solve conflicts and (after resolving) mark file as resolved
179 |
180 |
181 | $ git add
182 |
183 |
184 | $ git rm
185 |
186 | ### Undo
187 |
188 | Discard all local changes in your working directory
189 |
190 |
191 | $ git reset --hard HEAD
192 |
193 | Discard local changes in a specific file
194 |
195 |
196 | $ git checkout HEAD
197 |
198 | Revert a commit (by producing a new commit with contrary changes)
199 |
200 |
201 | $ git revert
202 |
203 | Reset your HEAD pointer to a previous commit
204 | …and discard all changes since then
205 |
206 |
207 | $ git reset --hard
208 |
209 | …and preserve all changes as unstaged changes
210 |
211 |
212 | $ git reset
213 |
214 | …and preserve uncommitted local changes
215 |
216 |
217 | $ git reset --keep
218 |
219 | * * *
220 |
221 | Taken from the [FourNova Tower Git Cheat Sheet][1]
222 |
223 | [1]: http://blog.fournova.com/2011/06/git-cheat-sheet/
224 |
--------------------------------------------------------------------------------
/applestyle.md:
--------------------------------------------------------------------------------
1 | {
2 | "id": "auto",
3 | "style": "default",
4 | "layout": "default"
5 | }
6 | %%%END
7 |
8 | ### Apple Style Guide
9 |
10 |
11 | #### Actions
12 |
13 | You press a key on a keyboard or tap a key on a Multi-Touch screen; you type a character, word, or phrase. In general, don't use articles and the word key in references to keys. Ease the user into this construction by using the and key the first time you mention a keystroke.
14 |
15 | > _First occurrence:_ Press the Control key.
16 | > _Thereafter:_ Press Control.
17 |
18 | #### Modifier keys
19 |
20 | Capitalize the names of modifier keys.
21 |
22 | > Control key, Option key, Shift key, Command key, Esc key
23 |
24 | #### Punctuation/Nonalphanumeric Keys
25 |
26 | When a punctuation key or nonalphanumeric key is used in a combination keystroke, or as a modifier for the word key, capitalize the key name. (However, use lowercase for punctuation marks and nonalphanumeric symbols in other contexts.)
27 |
28 | > Option-Shift-Hyphen
29 | > press the Hyphen key
30 | > type a hyphen
31 |
32 | Placing the punctuation mark or symbol in parentheses after the spelled-out key name is optional, but be consistent within a document.
33 |
34 | > Shift-Command-Tilde (~)
35 |
36 | #### Combination Keystrokes
37 |
38 |
39 | In combination keystrokes, use hyphens to signify that the user should hold down the first key or keys while pressing the last key. Don't use a hyphen if each key should be pressed and released separately. Be sure to explain this convention on first use.
40 |
41 | > Control-Shift-N
42 | > Esc N
43 |
44 | Capitalize but don't italicize or use code font for letters used as key names.
45 |
46 | > Command-C
47 | > Command-X
48 |
49 | If there's more than one modifier key, use this order
50 |
51 | 1. Control
52 | 2. Option
53 | 3. Shift
54 | 4. Command
55 |
56 | When a keyboard shortcut includes a mouse or trackpad action, use lowercase for the mouse or trackpad action.
57 |
58 | > Option-click
59 | > Option-swipe with three fingers
60 |
61 | #### Two-Word Key Names
62 |
63 |
64 | When one of the key names in a combination keystroke is two words or a hyphenated word, use en dashes where you would ordinarily use hyphens.
65 |
66 | > Option-Right Bracket
67 | > Option-Command-Up Arrow
68 | > Option-Command-double-click
69 |
70 | When referring to more than one key, use the full name of each key.
71 |
72 | > _Correct:_ the Right Arrow or Left Arrow key
73 | > _Incorrect:_ the Right or Left Arrow key
74 |
75 | #### Keys Labeled With Two Characters
76 |
77 | When a key with two characters is used in a keyboard shortcut, identify the key by the lower of the two characters, unless the Shift key is part of the shortcut. If the Shift key is part of the keyboard shortcut, identify the key by the upper of the two characters.
78 |
79 | > _Correct:_ To close all stacks, press Option-Semicolon.
80 | > _Incorrect:_ To close all stacks, press Option-Colon.
81 | > _Correct:_ For more information, press Shift-Command-Question Mark.
82 | > _Incorrect:_ For more information, press Shift-Command-Slash.
83 |
84 | If one of the characters on the key provides a mnemonic for the action of the command, you can identify the key by that character.
85 |
86 | To remove keyword presets 1 to 8, press Option-Shift-1 to Option-Shift-8.
87 | When the Shift key and a key with two characters are in a combination keystroke, always show the Shift key as part of the keyboard shortcut (don't show only the upper of the two characters and assume that the user will know to press the Shift key).
88 |
89 | > _Correct:_ To increase the Loupe diameter, press Option-Shift-Plus Sign.
90 | > _Incorrect:_ To increase the Loupe diameter, press Option-Plus Sign.
91 |
92 | #### Key graphics
93 |
94 | With graphic representations of combination keystrokes (in tables, for example), use the plus sign (+) instead of a hyphen between keys.
95 |
96 | #### Escape and Function
97 |
98 | Spell out the key names Escape and Function (the Fn key on portable computers and wireless keyboards) when you introduce them. In subsequent references, it's OK to abbreviate them as Esc and Fn.
99 |
100 | > _First occurrence:_ Press the Esc (Escape) key.
101 | > _Thereafter:_ Press Esc.
102 |
103 | Don't abbreviate any other key names, except when space is very tight (in table headings, for example).
104 |
105 | ---
106 |
107 | From the [Apple Style Guide](https://help.apple.com/asg/mac/2013/#apsg1f2855da)
108 |
--------------------------------------------------------------------------------
/mmd2cheatset.rb:
--------------------------------------------------------------------------------
1 | #!/usr/bin/ruby
2 | require 'yaml'
3 |
4 | if RUBY_VERSION.to_f > 1.9
5 | Encoding.default_external = Encoding::UTF_8
6 | Encoding.default_internal = Encoding::UTF_8
7 | end
8 |
9 | def show_usage
10 | puts "#{File.basename(__FILE__,'.rb')}: Convert MultiMarkdown document to cheatset format}"
11 | puts "Usage: #{__FILE__} filename.md"
12 | Process.exit
13 | end
14 |
15 |
16 | if ARGV.length > 0
17 | if ARGV[0] =~ /^(debug|test)$/
18 | input = DATA.read
19 | else
20 | infile = File.expand_path(ARGV[0])
21 |
22 | if File.exists?(infile)
23 | input = IO.read(infile)
24 | else
25 | puts "File not found: #{infile}"
26 | Process.exit 1
27 | end
28 | end
29 | elsif STDIN.stat.size > 0
30 | input = STDIN.read
31 | if RUBY_VERSION.to_f > 1.9
32 | input = input.force_encoding('utf-8')
33 | end
34 | else
35 | show_usage
36 | end
37 |
38 | class String
39 | def esc
40 | self.gsub(/(')/,"\\\\'")
41 | end
42 | end
43 |
44 | def convert_table(input)
45 | category = {}
46 | commands = []
47 | in_body = false
48 | input.split(/[\n\r]/).each { |line|
49 | if in_body
50 | case line.strip
51 | when /^\|?(.*?)\|(.*?)\|(.*?)\|?\s*$/u
52 | name = $1 || ''
53 | cmds = $2 || ''
54 | note = $3 || ''
55 | cmds = cmds.split(/,/).map {|x| x.strip }
56 | commands.push({ 'name' => name.strip, 'commands' => cmds, 'note' => note.strip })
57 | when /^\[(.*?)\]$/
58 | category['id'] = $1
59 | end
60 | else
61 | in_body = true if line =~ /(\|?\s*[:\-]+\s*\|?)/
62 | end
63 | }
64 | category['commands'] = commands
65 |
66 | return false unless category['id'] && category['commands'].length > 0
67 | category
68 | end
69 |
70 | categories = []
71 | headers = nil
72 |
73 | input.sub!(/(?i-m)(\S+:[\s\S]*?\n)+/) {|m|
74 | headers = YAML.load(m.strip)
75 | ""
76 | }
77 |
78 | unless headers.has_key?('keyword')
79 | puts 'Cheatsheet must have a "keyword" header'
80 | puts 'Using "test"'
81 | headers['keyword'] = 'test'
82 | end
83 |
84 | if headers.has_key?('resources') && !File.exists?(headers['resources'])
85 | puts "You specified a resources folder, but #{headers['resources']} doesn't seem to exist."
86 | Process.exit 1
87 | end
88 |
89 | input.gsub!(/^\s{0,3}(\|?\s*name\s*\|\s*command\s*\|\s*note\s*\|?.*?\[.*?\])\s*$/ismu) {|m|
90 | categories.push(convert_table(m.strip))
91 | ""
92 | }
93 |
94 | other = input.split(/^\-{3,}/).map{|s| s.strip }.delete_if{|s| s == '' }
95 |
96 | if other
97 | headers['notes'] = other.pop if other.length > 1
98 | headers['introduction'] = other.join("\n\n")
99 | end
100 |
101 | # tables = input.strip.scan(/^\s{0,3}(\|?\s*name\s*\|\s*command\s*\|\s*note\s*\|?.*?\[.*?\])\s*$/ismu)
102 | # tables.each {|table|
103 | # categories.push(convert_table(table[0].strip))
104 | # }
105 |
106 |
107 | resources = headers.has_key?('resources') ? "\n\tresources '#{headers['resources']}'" : ""
108 | intro = headers.has_key?('introduction') ? "\n\tintroduction <<-'END'\n#{headers['introduction']}\nEND" : ""
109 | output = "cheatsheet do\n\ttitle '#{headers['title'].esc}'\n\tdocset_file_name '#{headers['name'].esc}'\n\tkeyword '#{headers['keyword']}'#{resources}#{intro}\n"
110 |
111 | categories.each {|cat|
112 | next unless cat
113 | output += "\tcategory do\n\t\tid '#{cat['id'].esc}'\n"
114 | cat['commands'].each do |cmd|
115 | note = cmd['note'] == "" ? "" : %Q{\t\t\tnotes %(#{cmd['note'].esc})\n}
116 | new_commands = ""
117 | cmd['commands'].each {|c|
118 | next if c.nil? || c.strip == ""
119 | new_cmd =<)
17 | Zoom Out | xCMD-Left Angle Bracket (<)
18 | Show Resource Library | xCMD-xSHIFT-L
19 | Show Media Browser | xCMD-xSHIFT-M
20 | Show Help menu | xCMD-xSHIFT-Question Mark (?)
21 | Show and hide the Inspector | Click Inspector in the Toolbar or xCMD-xSHIFT-I
22 | Show and hide the Colors window | Click Colors in the Toolbar or xCMD-xSHIFT-C
23 | Show and hide the Toolbar | xCMD-xOPT-T
24 | Widescreen Layout | xCMD-xSHIFT-Backslash ( \ )
25 |
26 | #### Working with Elements
27 |
28 | Action | Shortcut
29 | -- | --
30 | Move selected element by one pixel | Arrow keys
31 | Move selected element by 10 pixels | xSHIFT-Arrow keys
32 | Add elements to (or remove them from) previously selected elements | xCMD-click or xSHIFT-click
33 | Add range to (or remove it from) previously selected range | xCMD-drag or xSHIFT-drag
34 | Constrain element movement to 45° angles | xSHIFT-drag
35 | Resize element | Drag handle
36 | Resize element from center | xOPT-drag handle
37 | Constrain aspect ratio when resizing element | xSHIFT-drag handle
38 | Constrain aspect ratio when resizing element from center | xSHIFT-xOPT-drag handle
39 | Rotate element | xCMD-drag handle
40 | Rotate element 45° | xSHIFT-xCMD-drag handle
41 | Turn off alignment guides | xCMD-drag
42 | Duplicate selected element | xCMD-D or hold down xOPT and drag
43 | Paste with Animations | xCMD-xOPT-V
44 | Edit Inner HTML | xCMD-xOPT-E
45 | Send element to the back | xCMD-xSHIFT-B
46 | Send element one layer back | xCMD-xSHIFT-xOPT-B
47 | Bring element to the front | xCMD-xSHIFT-F
48 | Bring element one layer forward | xCMD-xSHIFT-xOPT-F
49 | Group | xCMD-xOPT-G
50 | Ungroup | xCMD-xSHIFT-G
51 | Indent | xCMD-Right Bracket ( ] )
52 | Outdent | xCMD-Left Bracket ( [ )
53 |
54 | #### Working With Scenes
55 |
56 | Action | Shortcut
57 | -- | --
58 | Create new scene | xCMD-xSHIFT-N
59 | Select next scene | xCMD-xOPT-Right Arrow
60 | Select previous scene | xCMD-xOPT-Left Arrow
61 | Delete selected scene | Show Scenes, click on desired scene, then press xCMD-xSHIFT-Delete
62 |
63 | #### Editing Animations
64 |
65 | Action | Shortcut
66 | -- | --
67 | Toggle recording | xCMD-R
68 | Set Capo | xOPT-xCMD-K
69 | Move with Capo along with Playhead | Hold down Control and drag either the Capo or the Playhead
70 | Move with Playhead to Next Frame | xCMD-Control-Right Arrow
71 | Move with Playhead to Previous Frame | xCMD-Control-Left Arrow
72 | Move with Playhead Forward 1s | xCMD-xSHIFT-Control-Right Arrow
73 | Move with Playhead Backward 1s | xCMD-xSHIFT-Control-Left Arrow
74 | Play or stop and restart animation | Space
75 | Delete selected scene | Show Scenes, click on desired scene, then press xCMD-xSHIFT-Delete
76 | Next frame | xCMD-Right Arrow
77 | Previous frame | xCMD-Left Arrow
78 | Forward 1 Second | xCMD-xSHIFT-Right Arrow
79 | Backward 1 Second | xCMD-xSHIFT-Left Arrow
80 | Jump to Start | xCMD-xSHIFT-xOPT-Right Arrow
81 | Jump to End | xCMD-xSHIFT-xOPT-Left Arrow
82 | Jump to next keyframe in animation | xCMD-Up Arrow
83 | Jump to previous keyframe in animation | xCMD-Down Arrow
84 | Jump to next keyframe in timeline | xCMD-Up Arrow
85 | Jump to previous keyframe in timeline | xCMD-Down Arrow
86 | Restart animation | Home, or Fn-Left Arrow
87 | Loop playback | xCMD-L
88 | Turn off keyframe and second marker snapping | xCMD-Drag
89 |
90 | #### Editing Keyframes
91 |
92 | Action | Shortcut
93 | -- | --
94 | Move selected keyframe forward one frame | Right Arrow
95 | Move selected keyframe backward one frame | Left Arrow
96 | Move selected keyframe forward 1 second | xSHIFT-Right Arrow
97 | Move selected keyframe backward 1 second | xSHIFT-Left Arrow
98 | Move selected keyframe to next keyframe in animation | Up Arrow
99 | Move selected keyframe to previous keyframe in animation | Down Arrow
100 | Move selected keyframe to next keyframe in timeline | xSHIFT-Up Arrow
101 | Move selected keyframe to previous keyframe in timeline | xSHIFT-Down Arrow
102 | Turn off keyframe and second marker snapping | xCMD-Drag
103 |
104 | #### Editing Motion Paths
105 |
106 | Action | Shortcut
107 | -- | --
108 | Add control points to (or remove them from) previously selected control points | xCMD-click control point
109 | Add selected point and all in-between points to the selected control points | xSHIFT-click control point
110 | Convert a rounded control point into a corner control point | xOPT-click control point
111 | Constrain movement of control handles to 45° angles | xSHIFT-drag control handle
112 | Keep control handles equidistant from control point | xOPT-drag control handle
113 | Move one control handle independent from its counterpart | xCMD-drag control handle
114 |
115 | #### Using the Inspector
116 |
117 | Action | Shortcut
118 | -- | --
119 | Show the Document Inspector | xCMD-1
120 | Show the Scene Inspector | xCMD-2
121 | Show the Element Inspector | xCMD-3
122 | Show the Metrics Inspector | xCMD-4
123 | Show the Text Inspector | xCMD-5 or xCMD-T
124 | Show the Mouse Action Inspector | xCMD-6
125 | Show the Identity Inspector | xCMD-7
126 |
--------------------------------------------------------------------------------
/JSStrings.md:
--------------------------------------------------------------------------------
1 | ### JavaScript Strings
2 |
3 | | Method | Summary |
4 | | :-------- | :--------- |
5 | | **charAt**(x) | Returns the character at the "x" position within the string. |
6 | | **charCodeAt**(x) | Returns the Unicode value of the character at position "x" within the string. |
7 | | **concat**(v1, v2,...) | Combines one or more strings (arguments v1, v2 etc) into the existing one and returns the combined string. Original string is not modified. |
8 | | **fromCharCode**(c1, c2,...) | Returns a string created by using the specified sequence of Unicode values (arguments c1, c2 etc). Method of String object, not String instance. For example: String.fromCharCode(). |
9 | | **indexOf**(substr, [start]) | Searches and (if found) returns the index number of the searched character or substring within the string. If not found, -1 is returned. "Start" is an optional argument specifying the position within string to begin the search. Default is 0. |
10 | | **lastIndexOf**(substr, [start]) | Searches and (if found) returns the index number of the searched character or substring within the string. Searches the string from end to beginning. If not found, -1 is returned. "Start" is an optional argument specifying the position within string to begin the search. Default is string.length-1. |
11 | | **match**(regexp) | Executes a search for a match within a string based on a regular expression. It returns an array of information or null if no match is found. |
12 | | **replace**( regexp, replacetext) | Searches and replaces the regular expression portion (match) with the replaced text instead. |
13 | | **search**(regexp) | Tests for a match in a string. It returns the index of the match, or -1 if not found. |
14 | | **slice**(start, [end]) | Returns a substring of the string based on the "start" and "end" index arguments, NOT including the "end" index itself. "End" is optional, and if none is specified, the slice includes all characters from "start" to end of string. |
15 | | **split**(delimiter, [limit]) | Splits a string into many according to the specified delimiter, and returns an array containing each element. The optional "limit" is an integer that lets you specify the maximum number of elements to return. |
16 | | **substr**(start, [length]) | Returns the characters in a string beginning at "start" and through the specified number of characters, "length". "Length" is optional, and if omitted, up to the end of the string is assumed. |
17 | | **substring**(from, [to]) | Returns the characters in a string between "from" and "to" indexes, NOT including "to" inself. "To" is optional, and if omitted, up to the end of the string is assumed. |
18 | | **toLowerCase**() | Returns the string with all of its characters converted to lowercase. |
19 | | **toUpperCase**() | Returns the string with all of its characters converted to uppercase. |
20 |
21 |
--------------------------------------------------------------------------------
/Marked2.md:
--------------------------------------------------------------------------------
1 | {
2 | "id": "bt_marked",
3 | "style": "css/h4dark.css",
4 | "layout": "default"
5 | }
6 | %%%END
7 | ### Marked 2 Keyboard Shortcuts
8 |
9 | #### Shortcuts
10 |
11 | | Shortcut | Function |
12 | | -----------------------: | :---------------------------- |
13 | | **⌘,** | Preferences |
14 | | **⌘N** | New File |
15 | | **⌘O** | Open |
16 | | **⌘⇧R** | Re-open Last |
17 | | **⌘W** | Close |
18 | | **⌘P** | Print Preview Window |
19 | | **⌘S** | Save HTML |
20 | | **⌘⇧P** | Save PDF |
21 | | **⌘⇧S** | Save RTF |
22 | | **⌘C** | Copy |
23 | | **⌘⇧C** | Copy HTML Source to clipboard |
24 | | **⌘U** | Toggle Source View |
25 | | **⌘T** | Toggle Table of Contents |
26 | | **⌘R** | Reload Preview |
27 | | **⌘1-9** | Select Built-in Style |
28 | | **⌘⌥1-9** | Select Custom Style |
29 | | **⌘/** | Gear Menu |
30 | | **⌘⇧=** | Zoom In |
31 | | **⌘⇧-** | Zoom Out |
32 | | **⌘⇧0** | Reset Zoom |
33 | | **⌘M** | Minimize |
34 | | **⌘⇧F** | Keep on Top |
35 | | **^⌘W** | Visualize Word Repetition |
36 | | **^⌘B** | Show Boundaries of Included Files |
37 | | **⌘⌥S** | Document Statistics |
38 | | **⌘⇧⌥S** | Readability Statistics |
39 | | **⌘I** | Detailed Statistics |
40 | | **⌘⌥C** | Toggle Custom Processor |
41 | | **⌘F** | Search |
42 | | **⌘G** | Highlight next match |
43 | | **⌘⇧G** | Highlight previous match |
44 | | **⌘⌥←** | Collapse all sections |
45 | | **⌘⌥→** | Expand all sections |
46 | | **⌘⇧V** | Preview Clipbaord |
47 | | **^⌘S** | Save Clipboard Preview |
48 |
49 |
50 |
51 |
52 | #### Quick Toggles
53 |
54 | Extra keyboard shortcuts for toggling common global preferences.
55 |
56 | | Shortcut | Function |
57 | | -----------------------: | :---------------------------- |
58 | | **^⌥⇧L** | Retain Line Breaks |
59 | | **^⌥⇧I** | IDs on Headlines |
60 | | **^⌥⇧Y** | Strip YAML |
61 | | **^⌥⇧M** | Strip MMD Metadata |
62 | | **^⌥⇧S** | Scroll to First Edit |
63 | | **^⌥⇧C** | CriticMarkup Always |
64 | | **^⌥⇧T** | Smart Typography |
65 | | **^⌥⇧H** | Process Inside HTML |
66 |
67 | #### Preview Navigation
68 |
69 | Press "?" at any time to view the following shortcuts in the Preview window.
70 |
71 | | Shortcut | Function |
72 | | -------------------------: | :------------------------------- |
73 | | **t** or **gg** | Jump to Top |
74 | | **b** or **G** | Jump to Bottom |
75 | | **⇧1-9** | Bookmark Scroll position |
76 | | **⌥1-9** | Bookmark Nearest Headline |
77 | | **1-9** | Scroll to Bookmark |
78 | | **0** | Display Mini Map |
79 | | **N/P** | Next/Prev Bookmark Numerically |
80 | | **n/p** | Next/Prev Bookmark in Page Order |
81 | | **j**/**k** | Scroll Down/Up |
82 | | **J**/**K** | Scroll Up/Down Faster |
83 | | **,**/**.** | Navigate All Headers |
84 | | **<**/**>** | Navigate H1/H2 Headers |
85 | | **e** | Jump to Most Recent Edit Point |
86 | | **s** | Auto-scroll |
87 | | **⇧←**/**→** | Speed up/Slow down auto-scroll |
88 | | **f** | Open "fast switcher" |
89 | | **I** | Display current included filename |
90 | | **z** | Zoom Overview toggle |
91 | | **[** / **]** | Navigate target highlights |
92 | | **{** / **}** | Navigate all highlights |
93 | | **Escape** | Close Overlay/Deselect Text |
94 | | **h**/**?** | Show/Hide Help HUD |
95 |
96 | #### Table of Contents Navigation
97 |
98 | When the Table of Contents is open, you can navigate via keyboard.
99 |
100 | | Shortcut | Function |
101 | | -----------------: | :------------------------- |
102 | | **⌘T** | Open TOC |
103 | | **j**/**↑** | Select first/next item |
104 | | **k**/**↓** | Select previous item |
105 | | **o** | Scroll to selection |
106 | | **Space** | Open TOC quick-search |
107 | | **↓**/**Tab** | Select first search result |
108 | | **Escape** | Clear search/Dismiss TOC |
109 |
110 | ---
111 |
112 | **Marked 2** is available at [marked2app.com](http://marked2app.com)
113 |
--------------------------------------------------------------------------------
/sketch.md:
--------------------------------------------------------------------------------
1 | {
2 | "id": "auto",
3 | "style": "css/h4dark.css",
4 | "layout": "default"
5 | }
6 | %%%END
7 | ### Sketch
8 |
9 | #### Insert
10 |
11 | | Shortcut | Action |
12 | | :-----: | :------ |
13 | | **A** | New Artboard |
14 | | **S** | Slice |
15 | | **R** | Rectangle |
16 | | **U** | Rounded Rectangle |
17 | | **O** | Oval |
18 | | **L** | Line |
19 | | **V** | Vector Point |
20 | | **P** | Pencil |
21 | | **T** | Text |
22 |
23 | #### Type
24 |
25 | | Shortcut | Action |
26 | | :-----: | :------ |
27 | | **xCMDB** | Bold |
28 | | **xCMDI** | Italic |
29 | | **xCMDU** | Underline |
30 | | **xOPTxCMD+** | Increase Font Size |
31 | | **xOPTxCMD-** | Decrease Font Size |
32 | | **xOPTxCTRLL** | Increase Character Spacing |
33 | | **xOPTxCTRLT** | Decrease Character Spacing |
34 | | **xCMDT** | Change Font |
35 | | **xSHIFTxCMDO** | Convert Text to Outlines |
36 | | **xCMDxSHIFT{** | Align Left |
37 | | **xCMDxSHIFT\\** | Align Center |
38 | | **xCMDxSHIFT}** | Align Right |
39 | | **xCTRLxCMDSpace** | Special Characters |
40 |
41 | #### Canvas View
42 |
43 | | Shortcut | Action |
44 | | :-----: | :------ |
45 | | **xCMD+** | Zoom In |
46 | | **xCMD-** | Zoom Out |
47 | | **xCMD0** | Actual Size |
48 | | **xCMD1** | Center Canvas |
49 | | **xCMD2** | Zoom Selection |
50 | | **xCMD3** | Center Selection |
51 | | **xOPTTab** | Focus on First Input Field** |
52 | | **xOPTG** | Temporary Zoom to Actual Size |
53 |
54 |
55 | | Shortcut | Action |
56 | | :-----: | :------ |
57 | | **xCTRLR** | Toggle Rulers |
58 | | **xCTRLG** | Toggle Grid |
59 | | **xCTRLL** | Toggle Layer Guides |
60 | | **xCTRLP** | Toggle Pixels |
61 | | **xCTRLH** | Toggle Selection Handles |
62 | | **xCTRLX** | Toggle Pixel Grid |
63 | | | |
64 |
65 | #### Window
66 |
67 | | Shortcut | Action |
68 | | :-----: | :------ |
69 | | **xCMD~** | Toggle between Documents |
70 | | **xOPTxCMD1** | Toggle Layers List |
71 | | **xOPTxCMD2** | Toggle Inspector |
72 | | **xOPTxCMD3** | Toggle Layers, Inspector |
73 | | **xOPTxCMDT** | Toggle Toolbar |
74 | | **xCMD.** | Presentation Mode |
75 | | **xCTRLxCMDF** | Enter Fullscreen |
76 |
77 | #### Editing Shapes
78 |
79 | | Shortcut | Action |
80 | | :-----: | :------ |
81 | | **xCMDxOPT** | Keep Current Selection |
82 | | **xCTRLxCMDM** | Use as Mask span (Works for Layers & Groups) |
83 | | **xOPTxCMDU** | Union |
84 | | **xOPTxCMDS** | Substract |
85 | | **xOPTxCMDI** | Intersect |
86 | | **xOPTxCMDX** | Difference |
87 | | **xCMD-Arrows** | Change Object Size |
88 | | **xSHIFTxCMD-Arrows** | Change Units by 10 |
89 | | **1, 2, 3, 4** | Change Vector Point Style |
90 |
91 | #### Editing Layers
92 |
93 | | Shortcut | Action |
94 | | :-----: | :------ |
95 | | **xOPT** | Show Distance to other Layers |
96 | | **xOPTxCMD** | Show Distance to other Layers inside Group |
97 | | **xOPTDrag** | Duplicate (Repeat with D) |
98 | | **xOPTxCMDC** | Copy Style |
99 | | **xOPTxCMDV** | Paste Style |
100 | | **xCTRLC** | Color Picker |
101 | | **xCMDT** | Transform |
102 | | **xSHIFTxCMDR** | Rotate |
103 | | **F** | Toggle Fill |
104 | | **B** | Toggle Border |
105 |
106 | #### Arranging Layers, Groups and Artboards
107 |
108 | | Shortcut | Action |
109 | | :-----: | :------ |
110 | | **xOPTxCMD** | Bring Forward |
111 | | **xCTRLxOPTxCMD** | Bring to Front |
112 | | **xOPTxCMD** | Send Backward |
113 | | **xCTRLxOPTxCMD** | Sent to Back |
114 | | **xSHIFTxCMDH** | Hide |
115 | | **xSHIFTxCMDL** | Lock |
116 | | **xCMDR** | Rename |
117 | | **xCMDG** | Group Layers |
118 | | **xSHIFTxCMDG** | Ungroup Layers |
119 | | **xSHIFTTab** | Select Above Layer |
120 | | **Tab** | Select Layer Below |
121 | | **Esc** | Select Parent Artboard |
122 | | **xCMDF** | Find Layer by Name |
123 | | **Fn + ** | Select Above Page |
124 | | **Fn + ** | Select Page Below |
125 |
126 | ### Creating Custom Shortcuts
127 |
128 | To create your own custom shortcuts, go to Keyboard in your System Preferences and click the Shortcuts tab. Select App Shortcuts and click + to create a new shortcut. Choose Sketch from the Application list, then enter the exact name of the menu item you want to create the shortcut for. Finally choose your own shortcut combination and youre all set.
129 |
130 | #### Useful Custom Shortcuts
131 |
132 | | Shortcut | Action |
133 | | :-----: | :------ |
134 | | **xOPTxCMD (+) +** | Maximize Window (Use Zoom as Menu Title) |
135 | | **xCMD[** | Align Vertically Center |
136 | | **xCMD]** | Align Horizontally Center |
137 | | **xOPTxCMDC** | Collapse Groups and Artboards |
138 |
139 | > Source: [Sketch Shortcuts](http://sketchshortcuts.com/)
140 |
--------------------------------------------------------------------------------
/Marked 2.cheatsheet.txt:
--------------------------------------------------------------------------------
1 | cheatsheet do
2 | title 'Marked 2'
3 | docset_file_name 'Marked2'
4 | keyword 'marked'
5 | introduction <<-'END'
6 | Keyboard shortcuts for Marked 2
7 | END
8 | category do
9 | id 'Application Shortcuts'
10 | entry do
11 | name 'Preferences'
12 | command '⌘-Comma'
13 |
14 | end
15 | entry do
16 | name 'New File'
17 | command '⌘-N'
18 |
19 | end
20 | entry do
21 | name 'Open'
22 | command '⌘-O'
23 |
24 | end
25 | entry do
26 | name 'Re-open Last'
27 | command '⇧⌘-R'
28 |
29 | end
30 | entry do
31 | name 'Close'
32 | command '⌘-W'
33 |
34 | end
35 | entry do
36 | name 'Print Preview Window'
37 | command '⌘-P'
38 |
39 | end
40 | entry do
41 | name 'Save HTML'
42 | command '⌘-S'
43 |
44 | end
45 | entry do
46 | name 'Save PDF'
47 | command '⇧⌘-P'
48 |
49 | end
50 | entry do
51 | name 'Save RTF'
52 | command '⇧⌘-S'
53 |
54 | end
55 | entry do
56 | name 'Copy'
57 | command '⌘-C'
58 |
59 | end
60 | entry do
61 | name 'Copy HTML Source to clipboard'
62 | command '⇧⌘-C'
63 |
64 | end
65 | entry do
66 | name 'Toggle Source View'
67 | command '⌘-U'
68 |
69 | end
70 | entry do
71 | name 'Toggle Table of Contents'
72 | command '⌘-T'
73 |
74 | end
75 | entry do
76 | name 'Reload Preview'
77 | command '⌘-R'
78 |
79 | end
80 | entry do
81 | name 'Select Built-in Style'
82 | command '⌘-1-9'
83 |
84 | end
85 | entry do
86 | name 'Select Custom Style'
87 | command '⌥⌘-1-9'
88 |
89 | end
90 | entry do
91 | name 'Gear Menu'
92 | command '⌘-/'
93 |
94 | end
95 | entry do
96 | name 'Zoom In'
97 | command '⇧⌘-='
98 |
99 | end
100 | entry do
101 | name 'Zoom Out'
102 | command '⇧⌘--'
103 |
104 | end
105 | entry do
106 | name 'Reset Zoom'
107 | command '⇧⌘-0'
108 |
109 | end
110 | entry do
111 | name 'Minimize'
112 | command '⌘-M'
113 |
114 | end
115 | entry do
116 | name 'Keep on Top'
117 | command '⇧⌘-F'
118 |
119 | end
120 | entry do
121 | name 'Visualize Word Repetition'
122 | command '⌃⌘-W'
123 |
124 | end
125 | entry do
126 | name 'Show Boundaries of Included Files'
127 | command '⌃⌘-B'
128 |
129 | end
130 | entry do
131 | name 'Document Statistics'
132 | command '⌥⌘-S'
133 |
134 | end
135 | entry do
136 | name 'Readability Statistics'
137 | command '⌥⌘-S'
138 |
139 | end
140 | entry do
141 | name 'Detailed Statistics'
142 | command '⌘-I'
143 |
144 | end
145 | entry do
146 | name 'Toggle Custom Processor'
147 | command '⌥⌘-C'
148 |
149 | end
150 | entry do
151 | name 'Search'
152 | command '⌘-F'
153 |
154 | end
155 | entry do
156 | name 'Highlight next match'
157 | command '⌘-G'
158 |
159 | end
160 | entry do
161 | name 'Highlight previous match'
162 | command '⇧⌘-G'
163 |
164 | end
165 | entry do
166 | name 'Collapse all sections'
167 | command '⌥⌘-←'
168 |
169 | end
170 | entry do
171 | name 'Expand all sections'
172 | command '⌥⌘-→'
173 |
174 | end
175 | entry do
176 | name 'Preview Clipbaord'
177 | command '⇧⌘-V'
178 |
179 | end
180 | entry do
181 | name 'Save Clipboard Preview'
182 | command '^⌘-S'
183 |
184 | end
185 | end
186 | category do
187 | id 'Quick Toggles'
188 | entry do
189 | name 'Retain Line Breaks'
190 | command '⌃⇧⌥-L'
191 |
192 | end
193 | entry do
194 | name 'IDs on Headlines'
195 | command '⌃⇧⌥-I'
196 |
197 | end
198 | entry do
199 | name 'Strip YAML'
200 | command '⌃⇧⌥-Y'
201 |
202 | end
203 | entry do
204 | name 'Strip MMD Metadata'
205 | command '⌃⇧⌥-M'
206 |
207 | end
208 | entry do
209 | name 'Scroll to First Edit'
210 | command '⌃⇧⌥-S'
211 |
212 | end
213 | entry do
214 | name 'CriticMarkup Always'
215 | command '⌃⇧⌥-C'
216 |
217 | end
218 | entry do
219 | name 'Smart Typography'
220 | command '⌃⇧⌥-T'
221 |
222 | end
223 | entry do
224 | name 'Process Inside HTML'
225 | command '⌃⇧⌥-H'
226 |
227 | end
228 | end
229 | category do
230 | id 'Preview Shortcuts'
231 | entry do
232 | name 'Jump to Top'
233 | command 't'
234 | command 'gg'
235 |
236 | end
237 | entry do
238 | name 'Jump to Bottom'
239 | command 'b'
240 | command 'G'
241 |
242 | end
243 | entry do
244 | name 'Bookmark Scroll position'
245 | command '⇧-[1-9]'
246 |
247 | end
248 | entry do
249 | name 'Bookmark Nearest Headline'
250 | command '⌥-[1-9]'
251 |
252 | end
253 | entry do
254 | name 'Scroll to Bookmark'
255 | command '[1-9]'
256 |
257 | end
258 | entry do
259 | name 'Display Mini Map'
260 | command '0'
261 |
262 | end
263 | entry do
264 | name 'Next/Prev Bookmark Numerically'
265 | command 'N'
266 | command 'P'
267 |
268 | end
269 | entry do
270 | name 'Next/Prev Bookmark in Page Order'
271 | command 'n'
272 | command 'p'
273 |
274 | end
275 | entry do
276 | name 'Scroll Down/Up'
277 | command 'j / k'
278 |
279 | end
280 | entry do
281 | name 'Scroll Up/Down Faster'
282 | command 'J / K'
283 |
284 | end
285 | entry do
286 | name 'Navigate All Headers'
287 | command '/ .'
288 |
289 | end
290 | entry do
291 | name 'Navigate H1/H2 Headers'
292 | command '< / >'
293 |
294 | end
295 | entry do
296 | name 'Jump to Most Recent Edit Point'
297 | command 'e'
298 |
299 | end
300 | entry do
301 | name 'Auto-scroll'
302 | command 's'
303 |
304 | end
305 | entry do
306 | name 'Speed up/Slow down auto-scroll'
307 | command '⇧-← / →'
308 |
309 | end
310 | entry do
311 | name 'Open "fast switcher"'
312 | command 'f'
313 |
314 | end
315 | entry do
316 | name 'Display current included filename'
317 | command 'I'
318 |
319 | end
320 | entry do
321 | name 'Zoom Overview toggle'
322 | command 'z'
323 |
324 | end
325 | entry do
326 | name 'Navigate target highlights'
327 | command '[ / ]'
328 |
329 | end
330 | entry do
331 | name 'Navigate all highlights'
332 | command '{ / }'
333 |
334 | end
335 | entry do
336 | name 'Close Overlay/Deselect Text'
337 | command 'Escape'
338 |
339 | end
340 | entry do
341 | name 'Show/Hide Help HUD'
342 | command 'h'
343 | command '?'
344 |
345 | end
346 | end
347 | category do
348 | id 'Table of Contents navigation'
349 | entry do
350 | name 'Open TOC'
351 | command '⌘-T'
352 |
353 | end
354 | entry do
355 | name 'Select first/next item'
356 | command 'j'
357 | command '↑'
358 |
359 | end
360 | entry do
361 | name 'Select previous item'
362 | command 'k'
363 | command '↓'
364 |
365 | end
366 | entry do
367 | name 'Scroll to selection'
368 | command 'o'
369 |
370 | end
371 | entry do
372 | name 'Open TOC quick-search'
373 | command 'Space'
374 |
375 | end
376 | entry do
377 | name 'Select first search result'
378 | command '↓'
379 | command '⇥'
380 |
381 | end
382 | entry do
383 | name 'Clear search/Dismiss TOC'
384 | command 'Esc'
385 |
386 | end
387 | end
388 |
389 | end
390 |
--------------------------------------------------------------------------------
/jquery1.9.md:
--------------------------------------------------------------------------------
1 | {
2 | "id": "jquery",
3 | "style": "css/jquery.css",
4 | "layout": "multicolumn"
5 | }
6 | %%%END
7 |
8 | # jQuery 1.9
9 |
10 |
11 | ### Selectors
12 |
13 |
14 | ##### Basics
15 |
16 |
17 | * *
18 | * .class
19 | * element
20 | * \#id
21 | * selector1, selectorN, ...
22 |
23 | ##### Hierarchy
24 |
25 | * parent > child
26 | * ancestor descendant
27 | * prev + next
28 | * prev ~ siblings
29 |
30 | ##### Basic Filters
31 |
32 | * :animated
33 | * :eq()
34 | * :even
35 | * :first
36 | * :gt()
37 | * :header
38 | * :lang()
39 | * :last
40 | * :lt()
41 | * :not()
42 | * :odd
43 | * :root
44 | * :target
45 |
46 | ##### Content Filters
47 |
48 | * :contains()
49 | * :empty
50 | * :has()
51 | * :parent
52 |
53 | ##### Visibility Filters
54 |
55 | * :hidden
56 | * :visible
57 |
58 | ##### Attribute
59 |
60 | * [name|="value"]
61 | * [name*="value"]
62 | * [name~="value"]
63 | * [name$="value"]
64 | * [name="value"]
65 | * [name!="value"
66 | * [name^="value"]
67 | * [name]
68 | * [name="value"][name2="value2"]
69 |
70 | ##### Child Filters
71 |
72 | * :first-child
73 | * :first-of-type
74 | * :last-child
75 | * :last-of-type
76 | * :nth-child()
77 | * :nth-last-child()
78 | * :nth-last-of-type()
79 | * :nth-of-type()
80 | * :only-child
81 | * :only-of-type()
82 |
83 | ##### Forms
84 |
85 | * :button
86 | * :checkbox
87 | * :checked
88 | * :disabled
89 | * :enabled
90 | * :focus
91 | * :file
92 | * :image
93 | * :input
94 | * :password
95 | * :radio
96 | * :reset
97 | * :selected
98 | * :submit
99 | * :text
100 |
101 | ### Attributes / CSS
102 |
103 |
104 | ##### Attributes
105 |
106 |
107 | * .attr()
108 | * .prop()
109 | * .removeAttr()
110 | * .removeProp()
111 | * .val()
112 |
113 | ##### CSS
114 |
115 | * .addClass()
116 | * .css()
117 | * jQuery.cssHooks
118 | * .hasClass()
119 | * .removeClass()
120 | * .toggleClass()
121 |
122 | ##### Dimensions
123 |
124 | * .height()
125 | * .innerHeight()
126 | * .innerWidth()
127 | * .outerHeight()
128 | * .outerWidth()
129 | * .width()
130 |
131 | ##### Offset
132 |
133 | * .offset()
134 | * .offsetParent()
135 | * .position()
136 | * .scrollLeft()
137 | * .scrollTop()
138 |
139 | ##### Data
140 |
141 | * jQuery.data()
142 | * .data()
143 | * jQuery.hasData()
144 | * jQuery.removeData()
145 | * .removeData()
146 |
147 | ### Manipulation
148 |
149 |
150 | ##### Copying
151 |
152 |
153 | * .clone()
154 |
155 | ##### DOM Insertion, Around
156 |
157 | * .wrap()
158 | * .wrapAll()
159 | * .wrapInner()
160 |
161 | ##### DOM Insertion, Inside
162 |
163 | * .append()
164 | * .appendTo()
165 | * .html()
166 | * .prepend()
167 | * .prependTo()
168 | * .text()
169 |
170 | ##### DOM Insertion, Outside
171 |
172 | * .after()
173 | * .before()
174 | * .insertAfter()
175 | * .insertBefore()
176 |
177 | ##### DOM Removal
178 |
179 | * .detach()
180 | * .empty()
181 | * .remove()
182 | * .unwrap()
183 |
184 | ##### DOM Replacement
185 |
186 | * .replaceAll()
187 | * .replaceWith()
188 |
189 | ### Traversing
190 |
191 | ##### Filtering
192 |
193 | * .eq()
194 | * .filter()
195 | * .first()
196 | * .has()
197 | * .is()
198 | * .last()
199 | * .map()
200 | * .not()
201 | * .slice()
202 |
203 | ##### Miscellaneous Traversing
204 |
205 | * .add()
206 | * .andSelf()
207 | * .contents()
208 | * .each()
209 | * .end()
210 |
211 | ##### Tree Traversal
212 |
213 | * .addBack()
214 | * .children()
215 | * .closest()
216 | * .find()
217 | * .next()
218 | * .nextAll()
219 | * .nextUntil()
220 | * .parent()
221 | * .parents()
222 | * .parentsUntil()
223 | * .prev()
224 | * .prevAll()
225 | * .prevUntil()
226 | * .siblings()
227 |
228 | ### Events
229 |
230 | ##### Browser Events
231 |
232 | * .error()
233 | * .resize()
234 | * .scroll()
235 |
236 | ##### Document Loading
237 |
238 | * .holdReady()
239 | * .load()
240 | * .ready()
241 | * .unload()
242 |
243 | ##### Event Handler Attachment
244 |
245 | * .bind()
246 | * .delegate()
247 | * .die()
248 | * .live()
249 | * .off()
250 | * .on()
251 | * .one()
252 | * .trigger()
253 | * .triggerHandler()
254 | * .unbind()
255 | * .undelegate()
256 |
257 | ##### Form Events
258 |
259 | * .blur()
260 | * .change()
261 | * .focus()
262 | * .select()
263 | * .submit()
264 |
265 | ##### Keyboard Events
266 |
267 | * .keydown()
268 | * .keypress()
269 | * .keyup()
270 |
271 | ##### Mouse Events
272 |
273 | * .click()
274 | * .dblclick()
275 | * .focusin()
276 | * .focusout()
277 | * .hover()
278 | * .mousedown()
279 | * .mouseenter()
280 | * .mouseleave()
281 | * .mousemove()
282 | * .mouseout()
283 | * .mouseover()
284 | * .mouseup()
285 | * .toggle()
286 |
287 | ##### Event Object
288 |
289 | * event.currentTarget
290 | * event.data
291 | * event.isDefaultPrevented()
292 | * event.isImmediatePropagationStopped()
293 | * event.isPropagationStopped()
294 | * event.namespace
295 | * event.pageX
296 | * event.pageY
297 | * event.preventDefault()
298 | * event.relatedTarget
299 | * event.result
300 | * event.stopImmediatePropagation()
301 | * event.stopPropagation()
302 | * event.target
303 | * event.timeStamp
304 | * event.type
305 | * event.which
306 |
307 | ### Effects
308 |
309 | ##### Basics
310 |
311 | * .hide()
312 | * .show()
313 | * .toggle()
314 |
315 | ##### Custom
316 |
317 | * .animate()
318 | * .clearQueue()
319 | * .delay()
320 | * .dequeue()
321 | * jQuery.dequeue()
322 | * .finish()
323 | * jQuery.fx.interval
324 | * jQuery.fx.off
325 | * .queue()
326 | * jQuery.queue()
327 | * .stop()
328 |
329 | ##### Fading
330 |
331 | * .fadeIn()
332 | * .fadeOut()
333 | * .fadeTo()
334 | * .fadeToggle()
335 |
336 | ##### Sliding
337 |
338 | * .slideDown()
339 | * .slideToggle()
340 | * .slideUp()
341 |
342 | ### Ajax
343 |
344 | ##### Global Ajax Event Handlers
345 |
346 | * .ajaxComplete()
347 | * .ajaxError()
348 | * .ajaxSend()
349 | * .ajaxStart()
350 | * .ajaxStop()
351 | * .ajaxSuccess()
352 |
353 | ##### Helper Functions
354 |
355 | * jQuery.param()
356 | * .serialize()
357 | * .serializeArray()
358 |
359 | ##### Low-Level Interface
360 |
361 | * jQuery.ajax()
362 | * jQuery.ajaxSetup()
363 |
364 | ##### Shorthand Methods
365 |
366 | * jQuery.get()
367 | * jQuery.getJSON()
368 | * jQuery.getScript()
369 | * .load()
370 | * jQuery.post()
371 |
372 | ### Core
373 |
374 | ##### jQuery Object
375 |
376 | * jQuery()
377 | * jQuery.noConflict()
378 | * jQuery.sub()
379 | * jQuery.when()
380 |
381 | ##### Utilities
382 |
383 | * jQuery.boxModel
384 | * jQuery.browser
385 | * jQuery.contains()
386 | * jQuery.each()
387 | * jQuery.extend()
388 | * jQuery.globalEval()
389 | * jQuery.grep()
390 | * jQuery.inArray()
391 | * jQuery.isArray()
392 | * jQuery.isEmptyObject()
393 | * jQuery.isFunction()
394 | * jQuery.isNumeric()
395 | * jQuery.isPlainObject()
396 | * jQuery.isWindow()
397 | * jQuery.isXMLDoc()
398 | * jQuery.makeArray()
399 | * jQuery.map()
400 | * jQuery.merge()
401 | * jQuery.noop()
402 | * jQuery.now()
403 | * jQuery.parseHTML()
404 | * jQuery.parseJSON()
405 | * jQuery.parseXML()
406 | * jQuery.proxy()
407 | * jQuery.support
408 | * jQuery.trim()
409 | * jQuery.type()
410 | * jQuery.unique()
411 |
412 | ##### DOM Element Methods
413 |
414 | * .get()
415 | * .index()
416 | * .size()
417 | * .toArray()
418 |
419 | ##### Internals
420 |
421 | * .jquery
422 | * .context
423 | * jQuery.error()
424 | * .length
425 | * .pushStack()
426 | * .selector
427 |
428 | ##### Deferred Object
429 |
430 | * deferred.always()
431 | * deferred.done()
432 | * deferred.fail()
433 | * deferred.isRejected()
434 | * deferred.isResolved()
435 | * deferred.notify()
436 | * deferred.notifyWith()
437 | * deferred.pipe()
438 | * deferred.progress()
439 | * deferred.promise()
440 | * deferred.reject()
441 | * deferred.rejectWith()
442 | * deferred.resolve()
443 | * deferred.resolveWith()
444 | * deferred.state()
445 | * deferred.then()
446 | * .promise()
447 |
448 | ##### Callbacks Object
449 |
450 | * jQuery.Callbacks()
451 | * callbacks.add()
452 | * callbacks.disable()
453 | * callbacks.empty()
454 | * callbacks.fire()
455 | * callbacks.fired()
456 | * callbacks.fireWith()
457 | * callbacks.has()
458 | * callbacks.lock()
459 | * callbacks.locked()
460 | * callbacks.remove()
461 |
462 | > Taken from the Oscar Otero's jQuery cheat sheet.
463 |
--------------------------------------------------------------------------------
/Marked2.docset/Contents/Resources/Documents/style.css:
--------------------------------------------------------------------------------
1 | h1, h2, h3, p, blockquote {
2 | margin: 0;
3 | padding: 0; }
4 |
5 | @font-face {
6 | font-family: 'Open Sans';
7 | font-style: normal;
8 | font-weight: 400;
9 | src: local("Open Sans"), local("OpenSans"), url(cheatset_resources/Open_Sans.woff) format("woff"); }
10 | @font-face {
11 | font-family: 'Open Sans';
12 | font-style: normal;
13 | font-weight: 600;
14 | src: local("Open Sans Semibold"), local("OpenSans-Semibold"), url(cheatset_resources/Open_Sans_Semibold.woff) format("woff"); }
15 | @font-face {
16 | font-family: 'Open Sans';
17 | font-style: normal;
18 | font-weight: 700;
19 | src: local("Open Sans Bold"), local("OpenSans-Bold"), url(cheatset_resources/Open_Sans_Bold.woff) format("woff"); }
20 | @font-face {
21 | font-family: 'Open Sans';
22 | font-style: normal;
23 | font-weight: 800;
24 | src: local("Open Sans Extrabold"), local("OpenSans-Extrabold"), url(cheatset_resources/Open_Sans_Extrabold.woff) format("woff"); }
25 | @font-face {
26 | font-family: 'Open Sans';
27 | font-style: italic;
28 | font-weight: 400;
29 | src: local("Open Sans Italic"), local("OpenSans-Italic"), url(cheatset_resources/Open_Sans_Italic.woff) format("woff"); }
30 | @font-face {
31 | font-family: 'Open Sans';
32 | font-style: italic;
33 | font-weight: 600;
34 | src: local("Open Sans Semibold Italic"), local("OpenSans-SemiboldItalic"), url(cheatset_resources/Open_Sans_Semibold_Italic.woff) format("woff"); }
35 | @font-face {
36 | font-family: 'Open Sans';
37 | font-style: italic;
38 | font-weight: 700;
39 | src: local("Open Sans Bold Italic"), local("OpenSans-BoldItalic"), url(cheatset_resources/Open_Sans_Bold_Italic.woff) format("woff"); }
40 | @font-face {
41 | font-family: 'Open Sans';
42 | font-style: italic;
43 | font-weight: 800;
44 | src: local("Open Sans Extrabold Italic"), local("OpenSans-ExtraboldItalic"), url(cheatset_resources/Open_Sans_Extrabold_Italic.woff) format("woff"); }
45 | body {
46 | font-family: 'Open Sans', sans-serif;
47 | font-size: 14px;
48 | color: #000;
49 | background-color: #fff;
50 | margin: 0; }
51 |
52 | code, pre {
53 | font-family: Menlo, Consolas, "Liberation Mono", Courier, monospace;
54 | font-size: 13px; }
55 |
56 | code {
57 | margin: 0;
58 | border: 1px solid #ddd;
59 | background-color: #f8f8f8;
60 | border-radius: 3px;
61 | white-space: nowrap; }
62 |
63 | .name code {
64 | vertical-align: 1px; }
65 |
66 | code:before, code:after {
67 | content: "\00a0"; }
68 |
69 | header {
70 | color: #efefef;
71 | background-color: #666;
72 | padding: 0px 10px 3px 10px; }
73 |
74 | h1 {
75 | font-size: 35px;
76 | font-weight: 600; }
77 |
78 | footer {
79 | background-color: #666;
80 | color: #efefef;
81 | text-align: center;
82 | padding: 3px 0px; }
83 | footer a {
84 | color: #efefef; }
85 |
86 | section.notes {
87 | margin-top: 1em; }
88 | section.notes h2 {
89 | color: #666;
90 | font-size: 1.5em; }
91 |
92 | article {
93 | margin: 2em 1em; }
94 |
95 | section.category {
96 | border: 2px solid #666;
97 | border-radius: 6px 6px;
98 | background-color: #666;
99 | margin: 2em 0;
100 | overflow: hidden;
101 | padding-bottom: 5px; }
102 | section.category h2 {
103 | color: #fff;
104 | font-size: 1.5em;
105 | text-align: center;
106 | margin-top: -2px;
107 | font-weight: 600; }
108 |
109 | table {
110 | background-color: #fff;
111 | border-collapse: collapse;
112 | width: 100%; }
113 |
114 | td {
115 | padding: 13px 8px 0px 8px;
116 | border-left: 1px solid #d7d7d7; }
117 |
118 | th {
119 | border-left: 1px solid #d7d7d7; }
120 |
121 | tr {
122 | border-bottom: 1px dotted #d7d7d7; }
123 |
124 | tr:last-child {
125 | border-bottom: none; }
126 |
127 | td.command, td.td_command {
128 | width: 1%;
129 | white-space: nowrap;
130 | vertical-align: top;
131 | padding: 9px 8px 4px 7px;
132 | text-align: right; }
133 | td.command code, td.td_command code {
134 | padding: .1em 0.2em;
135 | box-shadow: 0 1px 0px rgba(0, 0, 0, 0.2), 0 0 0 2px #fff inset;
136 | border-radius: 3px;
137 | border: 1px solid #ccc;
138 | background-color: #efefef;
139 | color: #333; }
140 |
141 | td.td_command {
142 | text-align: center; }
143 |
144 | td.description .name {
145 | font-size: 1.2em; }
146 |
147 | th {
148 | background: #efefef;
149 | padding: 5px 12px 5px 8px;
150 | text-align: left;
151 | border-bottom: 1px solid #d7d7d7;
152 | font-weight: 600; }
153 |
154 | th:nth-child(1), td:nth-child(1) {
155 | border-left: none; }
156 |
157 | a {
158 | color: #666; }
159 |
160 | p {
161 | margin: 0 0 7px; }
162 |
163 | .highlight {
164 | background-color: #f8f8f8;
165 | border: 1px solid #ccc;
166 | padding: 6px 10px;
167 | border-radius: 3px;
168 | margin-right: 1px;
169 | white-space: pre-wrap;
170 | word-wrap: break-word; }
171 |
172 | .c {
173 | color: #999988;
174 | font-style: italic; }
175 |
176 | .k {
177 | font-weight: bold; }
178 |
179 | .o {
180 | font-weight: bold; }
181 |
182 | .cm {
183 | color: #999988;
184 | font-style: italic; }
185 |
186 | .cp {
187 | color: #999999;
188 | font-weight: bold; }
189 |
190 | .c1 {
191 | color: #999988;
192 | font-style: italic; }
193 |
194 | .cs {
195 | color: #999999;
196 | font-weight: bold;
197 | font-style: italic; }
198 |
199 | .gd {
200 | color: #000000;
201 | background-color: #ffdddd; }
202 |
203 | .gd .x {
204 | color: #000000;
205 | background-color: #ffaaaa; }
206 |
207 | .ge {
208 | font-style: italic; }
209 |
210 | .gr {
211 | color: #aa0000; }
212 |
213 | .gh {
214 | color: #999999; }
215 |
216 | .gi {
217 | color: #000000;
218 | background-color: #ddffdd; }
219 |
220 | .gi .x {
221 | color: #000000;
222 | background-color: #aaffaa; }
223 |
224 | .go {
225 | color: #888888; }
226 |
227 | .gp {
228 | color: #555555; }
229 |
230 | .gs {
231 | font-weight: bold; }
232 |
233 | .gu {
234 | color: #800080;
235 | font-weight: bold; }
236 |
237 | .gt {
238 | color: #aa0000; }
239 |
240 | .kc {
241 | font-weight: bold; }
242 |
243 | .kd {
244 | font-weight: bold; }
245 |
246 | .kn {
247 | font-weight: bold; }
248 |
249 | .kp {
250 | font-weight: bold; }
251 |
252 | .kr {
253 | font-weight: bold; }
254 |
255 | .kt {
256 | color: #445588;
257 | font-weight: bold; }
258 |
259 | .m {
260 | color: #009999; }
261 |
262 | .s {
263 | color: #dd1144; }
264 |
265 | .n {
266 | color: #333333; }
267 |
268 | .na {
269 | color: teal; }
270 |
271 | .nb {
272 | color: #0086b3; }
273 |
274 | .nc {
275 | color: #445588;
276 | font-weight: bold; }
277 |
278 | .no {
279 | color: teal; }
280 |
281 | .ni {
282 | color: purple; }
283 |
284 | .ne {
285 | color: #990000;
286 | font-weight: bold; }
287 |
288 | .nf {
289 | color: #990000;
290 | font-weight: bold; }
291 |
292 | .nn {
293 | color: #555555; }
294 |
295 | .nt {
296 | color: navy; }
297 |
298 | .nv {
299 | color: teal; }
300 |
301 | .ow {
302 | font-weight: bold; }
303 |
304 | .w {
305 | color: #bbbbbb; }
306 |
307 | .mf {
308 | color: #009999; }
309 |
310 | .mh {
311 | color: #009999; }
312 |
313 | .mi {
314 | color: #009999; }
315 |
316 | .mo {
317 | color: #009999; }
318 |
319 | .sb {
320 | color: #dd1144; }
321 |
322 | .sc {
323 | color: #dd1144; }
324 |
325 | .sd {
326 | color: #dd1144; }
327 |
328 | .s2 {
329 | color: #dd1144; }
330 |
331 | .se {
332 | color: #dd1144; }
333 |
334 | .sh {
335 | color: #dd1144; }
336 |
337 | .si {
338 | color: #dd1144; }
339 |
340 | .sx {
341 | color: #dd1144; }
342 |
343 | .sr {
344 | color: #009926; }
345 |
346 | .s1 {
347 | color: #dd1144; }
348 |
349 | .ss {
350 | color: #990073; }
351 |
352 | .bp {
353 | color: #999999; }
354 |
355 | .vc {
356 | color: teal; }
357 |
358 | .vg {
359 | color: teal; }
360 |
361 | .vi {
362 | color: teal; }
363 |
364 | .il {
365 | color: #009999; }
366 |
367 | .gc {
368 | color: #999;
369 | background-color: #EAF2F5; }
370 |
371 | pre {
372 | padding: 15px;
373 | line-height: 17px;
374 | margin-top: 0px;
375 | margin-bottom: 9px; }
376 |
377 | .name {
378 | margin-top: -4px; }
379 |
380 | ul {
381 | padding-left: 24px; }
382 |
383 | .scrollable {
384 | overflow-x: auto; }
385 |
386 | a {
387 | -ms-word-break: break-all;
388 | -ms-word-wrap: break-all;
389 | -webkit-word-break: break-word;
390 | -webkit-word-wrap: break-word;
391 | word-break: break-word;
392 | word-wrap: break-word; }
393 |
--------------------------------------------------------------------------------
/ANSI Escape Codes.docset/Contents/Resources/Documents/style.css:
--------------------------------------------------------------------------------
1 | h1, h2, h3, p, blockquote {
2 | margin: 0;
3 | padding: 0; }
4 |
5 | @font-face {
6 | font-family: 'Open Sans';
7 | font-style: normal;
8 | font-weight: 400;
9 | src: local("Open Sans"), local("OpenSans"), url(cheatset_resources/Open_Sans.woff) format("woff"); }
10 | @font-face {
11 | font-family: 'Open Sans';
12 | font-style: normal;
13 | font-weight: 600;
14 | src: local("Open Sans Semibold"), local("OpenSans-Semibold"), url(cheatset_resources/Open_Sans_Semibold.woff) format("woff"); }
15 | @font-face {
16 | font-family: 'Open Sans';
17 | font-style: normal;
18 | font-weight: 700;
19 | src: local("Open Sans Bold"), local("OpenSans-Bold"), url(cheatset_resources/Open_Sans_Bold.woff) format("woff"); }
20 | @font-face {
21 | font-family: 'Open Sans';
22 | font-style: normal;
23 | font-weight: 800;
24 | src: local("Open Sans Extrabold"), local("OpenSans-Extrabold"), url(cheatset_resources/Open_Sans_Extrabold.woff) format("woff"); }
25 | @font-face {
26 | font-family: 'Open Sans';
27 | font-style: italic;
28 | font-weight: 400;
29 | src: local("Open Sans Italic"), local("OpenSans-Italic"), url(cheatset_resources/Open_Sans_Italic.woff) format("woff"); }
30 | @font-face {
31 | font-family: 'Open Sans';
32 | font-style: italic;
33 | font-weight: 600;
34 | src: local("Open Sans Semibold Italic"), local("OpenSans-SemiboldItalic"), url(cheatset_resources/Open_Sans_Semibold_Italic.woff) format("woff"); }
35 | @font-face {
36 | font-family: 'Open Sans';
37 | font-style: italic;
38 | font-weight: 700;
39 | src: local("Open Sans Bold Italic"), local("OpenSans-BoldItalic"), url(cheatset_resources/Open_Sans_Bold_Italic.woff) format("woff"); }
40 | @font-face {
41 | font-family: 'Open Sans';
42 | font-style: italic;
43 | font-weight: 800;
44 | src: local("Open Sans Extrabold Italic"), local("OpenSans-ExtraboldItalic"), url(cheatset_resources/Open_Sans_Extrabold_Italic.woff) format("woff"); }
45 | body {
46 | font-family: 'Open Sans', sans-serif;
47 | font-size: 14px;
48 | color: #000;
49 | background-color: #fff;
50 | margin: 0; }
51 |
52 | code, pre {
53 | font-family: Menlo, Consolas, "Liberation Mono", Courier, monospace;
54 | font-size: 13px; }
55 |
56 | code {
57 | margin: 0;
58 | border: 1px solid #ddd;
59 | background-color: #f8f8f8;
60 | border-radius: 3px;
61 | white-space: nowrap; }
62 |
63 | .name code {
64 | vertical-align: 1px; }
65 |
66 | code:before, code:after {
67 | content: "\00a0"; }
68 |
69 | header {
70 | color: #efefef;
71 | background-color: #666;
72 | padding: 0px 10px 3px 10px; }
73 |
74 | h1 {
75 | font-size: 35px;
76 | font-weight: 600; }
77 |
78 | footer {
79 | background-color: #666;
80 | color: #efefef;
81 | text-align: center;
82 | padding: 3px 0px; }
83 | footer a {
84 | color: #efefef; }
85 |
86 | section.notes {
87 | margin-top: 1em; }
88 | section.notes h2 {
89 | color: #666;
90 | font-size: 1.5em; }
91 |
92 | article {
93 | margin: 2em 1em; }
94 |
95 | section.category {
96 | border: 2px solid #666;
97 | border-radius: 6px 6px;
98 | background-color: #666;
99 | margin: 2em 0;
100 | overflow: hidden;
101 | padding-bottom: 5px; }
102 | section.category h2 {
103 | color: #fff;
104 | font-size: 1.5em;
105 | text-align: center;
106 | margin-top: -2px;
107 | font-weight: 600; }
108 |
109 | table {
110 | background-color: #fff;
111 | border-collapse: collapse;
112 | width: 100%; }
113 |
114 | td {
115 | padding: 13px 8px 0px 8px;
116 | border-left: 1px solid #d7d7d7; }
117 |
118 | th {
119 | border-left: 1px solid #d7d7d7; }
120 |
121 | tr {
122 | border-bottom: 1px dotted #d7d7d7; }
123 |
124 | tr:last-child {
125 | border-bottom: none; }
126 |
127 | td.command, td.td_command {
128 | width: 1%;
129 | white-space: nowrap;
130 | vertical-align:top;
131 | padding: 9px 8px 4px 7px;
132 | text-align: right; }
133 | td.command code, td.td_command code {
134 | padding: .1em 0.2em;
135 | box-shadow: 0 1px 0px rgba(0, 0, 0, 0.2), 0 0 0 2px #fff inset;
136 | border-radius: 3px;
137 | border: 1px solid #ccc;
138 | background-color: #efefef;
139 | color: #333; }
140 |
141 | td.td_command {
142 | text-align: center; }
143 |
144 | td.description .name {
145 | font-size: 1.2em; }
146 |
147 | th {
148 | background: #efefef;
149 | padding: 5px 12px 5px 8px;
150 | text-align: left;
151 | border-bottom: 1px solid #d7d7d7;
152 | font-weight: 600; }
153 |
154 | th:nth-child(1), td:nth-child(1) {
155 | border-left: none; }
156 |
157 | a {
158 | color: #666; }
159 |
160 | p {
161 | margin: 0 0 7px; }
162 |
163 | .highlight {
164 | background-color: #f8f8f8;
165 | border: 1px solid #ccc;
166 | padding: 6px 10px;
167 | border-radius: 3px;
168 | margin-right: 1px;
169 | white-space: pre-wrap;
170 | word-wrap: break-word; }
171 |
172 | .c {
173 | color: #999988;
174 | font-style: italic; }
175 |
176 | .k {
177 | font-weight: bold; }
178 |
179 | .o {
180 | font-weight: bold; }
181 |
182 | .cm {
183 | color: #999988;
184 | font-style: italic; }
185 |
186 | .cp {
187 | color: #999999;
188 | font-weight: bold; }
189 |
190 | .c1 {
191 | color: #999988;
192 | font-style: italic; }
193 |
194 | .cs {
195 | color: #999999;
196 | font-weight: bold;
197 | font-style: italic; }
198 |
199 | .gd {
200 | color: #000000;
201 | background-color: #ffdddd; }
202 |
203 | .gd .x {
204 | color: #000000;
205 | background-color: #ffaaaa; }
206 |
207 | .ge {
208 | font-style: italic; }
209 |
210 | .gr {
211 | color: #aa0000; }
212 |
213 | .gh {
214 | color: #999999; }
215 |
216 | .gi {
217 | color: #000000;
218 | background-color: #ddffdd; }
219 |
220 | .gi .x {
221 | color: #000000;
222 | background-color: #aaffaa; }
223 |
224 | .go {
225 | color: #888888; }
226 |
227 | .gp {
228 | color: #555555; }
229 |
230 | .gs {
231 | font-weight: bold; }
232 |
233 | .gu {
234 | color: #800080;
235 | font-weight: bold; }
236 |
237 | .gt {
238 | color: #aa0000; }
239 |
240 | .kc {
241 | font-weight: bold; }
242 |
243 | .kd {
244 | font-weight: bold; }
245 |
246 | .kn {
247 | font-weight: bold; }
248 |
249 | .kp {
250 | font-weight: bold; }
251 |
252 | .kr {
253 | font-weight: bold; }
254 |
255 | .kt {
256 | color: #445588;
257 | font-weight: bold; }
258 |
259 | .m {
260 | color: #009999; }
261 |
262 | .s {
263 | color: #dd1144; }
264 |
265 | .n {
266 | color: #333333; }
267 |
268 | .na {
269 | color: teal; }
270 |
271 | .nb {
272 | color: #0086b3; }
273 |
274 | .nc {
275 | color: #445588;
276 | font-weight: bold; }
277 |
278 | .no {
279 | color: teal; }
280 |
281 | .ni {
282 | color: purple; }
283 |
284 | .ne {
285 | color: #990000;
286 | font-weight: bold; }
287 |
288 | .nf {
289 | color: #990000;
290 | font-weight: bold; }
291 |
292 | .nn {
293 | color: #555555; }
294 |
295 | .nt {
296 | color: navy; }
297 |
298 | .nv {
299 | color: teal; }
300 |
301 | .ow {
302 | font-weight: bold; }
303 |
304 | .w {
305 | color: #bbbbbb; }
306 |
307 | .mf {
308 | color: #009999; }
309 |
310 | .mh {
311 | color: #009999; }
312 |
313 | .mi {
314 | color: #009999; }
315 |
316 | .mo {
317 | color: #009999; }
318 |
319 | .sb {
320 | color: #dd1144; }
321 |
322 | .sc {
323 | color: #dd1144; }
324 |
325 | .sd {
326 | color: #dd1144; }
327 |
328 | .s2 {
329 | color: #dd1144; }
330 |
331 | .se {
332 | color: #dd1144; }
333 |
334 | .sh {
335 | color: #dd1144; }
336 |
337 | .si {
338 | color: #dd1144; }
339 |
340 | .sx {
341 | color: #dd1144; }
342 |
343 | .sr {
344 | color: #009926; }
345 |
346 | .s1 {
347 | color: #dd1144; }
348 |
349 | .ss {
350 | color: #990073; }
351 |
352 | .bp {
353 | color: #999999; }
354 |
355 | .vc {
356 | color: teal; }
357 |
358 | .vg {
359 | color: teal; }
360 |
361 | .vi {
362 | color: teal; }
363 |
364 | .il {
365 | color: #009999; }
366 |
367 | .gc {
368 | color: #999;
369 | background-color: #EAF2F5; }
370 |
371 | pre {
372 | padding: 15px;
373 | line-height: 17px;
374 | margin-top: 0px;
375 | margin-bottom: 9px; }
376 |
377 | .name {
378 | margin-top: -4px; }
379 |
380 | ul {
381 | padding-left: 24px; }
382 |
383 | .scrollable {
384 | overflow-x: auto; }
385 |
386 | a {
387 | -ms-word-break: break-all;
388 | -ms-word-wrap: break-all;
389 | -webkit-word-break: break-word;
390 | -webkit-word-wrap: break-word;
391 | word-break: break-word;
392 | word-wrap: break-word; }
393 |
--------------------------------------------------------------------------------
/ANSI.cheatsheet.txt:
--------------------------------------------------------------------------------
1 | cheatsheet do
2 | title 'ANSI'
3 | docset_file_name 'ANSI Escape Codes'
4 | keyword 'ansi'
5 | introduction <<-'END'
6 | > `"\033[31;1;4mHello\033[0m"`
7 |
8 | #### Colors
9 | END
10 | category do
11 | id 'Standard Colors'
12 | entry do
13 | name ''
14 | command 'Foreground colors'
15 |
16 | end
17 | entry do
18 | name 'Black'
19 | command '30'
20 |
21 | notes %(`\033[30;0m`)
22 | end
23 | entry do
24 | name 'Red'
25 | command '31'
26 |
27 | notes %(`\033[31;0m`)
28 | end
29 | entry do
30 | name 'Green'
31 | command '32'
32 |
33 | notes %(`\033[32;0m`)
34 | end
35 | entry do
36 | name 'Yellow'
37 | command '33'
38 |
39 | notes %(`\033[33;0m`)
40 | end
41 | entry do
42 | name 'Blue'
43 | command '34'
44 |
45 | notes %(`\033[34;0m`)
46 | end
47 | entry do
48 | name 'Magenta'
49 | command '35'
50 |
51 | notes %(`\033[35;0m`)
52 | end
53 | entry do
54 | name 'Cyan'
55 | command '36'
56 |
57 | notes %(`\033[36;0m`)
58 | end
59 | entry do
60 | name 'White'
61 | command '37'
62 |
63 | notes %(`\033[37;0m`)
64 | end
65 | entry do
66 | name ''
67 | command 'Background colors'
68 |
69 | end
70 | entry do
71 | name 'Black'
72 | command '40'
73 |
74 | notes %(`\033[40;0m`)
75 | end
76 | entry do
77 | name 'Red'
78 | command '41'
79 |
80 | notes %(`\033[41;0m`)
81 | end
82 | entry do
83 | name 'Green'
84 | command '42'
85 |
86 | notes %(`\033[42;0m`)
87 | end
88 | entry do
89 | name 'Yellow'
90 | command '43'
91 |
92 | notes %(`\033[43;0m`)
93 | end
94 | entry do
95 | name 'Blue'
96 | command '44'
97 |
98 | notes %(`\033[44;0m`)
99 | end
100 | entry do
101 | name 'Magenta'
102 | command '45'
103 |
104 | notes %(`\033[45;0m`)
105 | end
106 | entry do
107 | name 'Cyan'
108 | command '46'
109 |
110 | notes %(`\033[46;0m`)
111 | end
112 | entry do
113 | name 'White'
114 | command '47'
115 |
116 | notes %(`\033[47;0m`)
117 | end
118 | end
119 | category do
120 | id 'Font Effects'
121 | entry do
122 | name 'Reset / Normal'
123 | command '0'
124 |
125 | notes %(all attributes off)
126 | end
127 | entry do
128 | name 'Bold or increased intensity'
129 | command '1'
130 |
131 | end
132 | entry do
133 | name 'Faint (decreased intensity)'
134 | command '2'
135 |
136 | notes %(Not widely supported.)
137 | end
138 | entry do
139 | name 'Italic'
140 | command '3'
141 |
142 | notes %(Not widely supported. Sometimes treated as inverse.)
143 | end
144 | entry do
145 | name 'Underline'
146 | command '4'
147 |
148 | end
149 | entry do
150 | name 'Slow Blink'
151 | command '5'
152 |
153 | notes %(less than 150 per minute)
154 | end
155 | entry do
156 | name 'Rapid Blink'
157 | command '6'
158 |
159 | notes %(MS-DOS ANSI.SYS; 150+ per minute; not widely supported)
160 | end
161 | entry do
162 | name '[[reverse video]]'
163 | command '7'
164 |
165 | notes %(swap foreground and background colors)
166 | end
167 | entry do
168 | name 'Conceal'
169 | command '8'
170 |
171 | notes %(Not widely supported.)
172 | end
173 | entry do
174 | name 'Crossed-out'
175 | command '9'
176 |
177 | notes %(Characters legible, but marked for deletion. Not widely supported.)
178 | end
179 | entry do
180 | name 'Primary(default) font'
181 | command '10'
182 |
183 | end
184 | entry do
185 | name 'Alternate font'
186 | command '11-19'
187 |
188 | notes %(Select alternate font `n-10`)
189 | end
190 | entry do
191 | name 'Fraktur'
192 | command '20'
193 |
194 | notes %(hardly ever supported)
195 | end
196 | entry do
197 | name 'Bold off or Double Underline'
198 | command '21'
199 |
200 | notes %(Bold off not widely supported; double underline hardly ever supported.)
201 | end
202 | entry do
203 | name 'Normal color or intensity'
204 | command '22'
205 |
206 | notes %(Neither bold nor faint)
207 | end
208 | entry do
209 | name 'Not italic, not Fraktur'
210 | command '23'
211 |
212 | end
213 | entry do
214 | name 'Underline off'
215 | command '24'
216 |
217 | notes %(Not singly or doubly underlined)
218 | end
219 | entry do
220 | name 'Blink off'
221 | command '25'
222 |
223 | end
224 | entry do
225 | name 'Inverse off'
226 | command '27'
227 |
228 | end
229 | entry do
230 | name 'Reveal'
231 | command '28'
232 |
233 | notes %(conceal off)
234 | end
235 | entry do
236 | name 'Not crossed out'
237 | command '29'
238 |
239 | end
240 | entry do
241 | name 'Set foreground color'
242 | command '30-37'
243 |
244 | notes %(See color table below)
245 | end
246 | entry do
247 | name 'Set foreground color'
248 | command '38'
249 |
250 | notes %(Next arguments are `5;n` or `2;r;g;b`, see below)
251 | end
252 | entry do
253 | name 'Default foreground color'
254 | command '39'
255 |
256 | notes %(implementation defined (according to standard))
257 | end
258 | entry do
259 | name 'Set background color'
260 | command '40-47'
261 |
262 | notes %(See color table below)
263 | end
264 | entry do
265 | name 'Set background color'
266 | command '48'
267 |
268 | notes %(Next arguments are `5;n` or `2;r;g;b`, see below)
269 | end
270 | entry do
271 | name 'Default background color'
272 | command '49'
273 |
274 | notes %(implementation defined (according to standard))
275 | end
276 | entry do
277 | name 'Framed'
278 | command '51'
279 |
280 | end
281 | entry do
282 | name 'Encircled'
283 | command '52'
284 |
285 | end
286 | entry do
287 | name 'Overlined'
288 | command '53'
289 |
290 | end
291 | entry do
292 | name 'Not framed or encircled'
293 | command '54'
294 |
295 | end
296 | entry do
297 | name 'Not overlined'
298 | command '55'
299 |
300 | end
301 | entry do
302 | name 'ideogram underline'
303 | command '60'
304 |
305 | notes %(hardly ever supported)
306 | end
307 | entry do
308 | name 'ideogram double underline'
309 | command '61'
310 |
311 | notes %(hardly ever supported)
312 | end
313 | entry do
314 | name 'ideogram overline'
315 | command '62'
316 |
317 | notes %(hardly ever supported)
318 | end
319 | entry do
320 | name 'ideogram double overline'
321 | command '63'
322 |
323 | notes %(hardly ever supported)
324 | end
325 | entry do
326 | name 'ideogram stress marking'
327 | command '64'
328 |
329 | notes %(hardly ever supported)
330 | end
331 | entry do
332 | name 'ideogram attributes off'
333 | command '65'
334 |
335 | notes %(reset the effects of all of 60-64)
336 | end
337 | entry do
338 | name 'Set bright foreground color'
339 | command '90-97'
340 |
341 | notes %(aixterm (not in standard))
342 | end
343 | entry do
344 | name 'Set bright background color'
345 | command '100-107'
346 |
347 | notes %(aixterm (not in standard))
348 | end
349 | end
350 | category do
351 | id 'Cursor Movement'
352 | entry do
353 | name '**Cursor Position**'
354 | command '`Esc[<Line>;<Column>HEsc[<Line>;<Column>f`'
355 |
356 | notes %(Moves the cursor to the specified position (coordinates). If you do not specify a position, the cursor moves to the home position at the upper-left corner of the screen (line 0, column 0). This escape sequence works the same way as the following Cursor Position escape sequence.)
357 | end
358 | entry do
359 | name '**Cursor Up**'
360 | command '`Esc[<Value>A`'
361 |
362 | notes %(Moves the cursor up by the specified number of lines without changing columns. If the cursor is already on the top line, ANSI.SYS ignores this sequence.)
363 | end
364 | entry do
365 | name '**Cursor Down**'
366 | command '`Esc[<Value>B`'
367 |
368 | notes %(Moves the cursor down by the specified number of lines without changing columns. If the cursor is already on the bottom line, ANSI.SYS ignores this sequence.)
369 | end
370 | entry do
371 | name '**Cursor Forward**'
372 | command '`Esc[<Value>C`'
373 |
374 | notes %(Moves the cursor forward by the specified number of columns without changing lines. If the cursor is already in the rightmost column, ANSI.SYS ignores this sequence.)
375 | end
376 | entry do
377 | name '**Cursor Backward**'
378 | command '`Esc[<Value>D`'
379 |
380 | notes %(Moves the cursor back by the specified number of columns without changing lines. If the cursor is already in the leftmost column, ANSI.SYS ignores this sequence.)
381 | end
382 | entry do
383 | name '**Save Cursor Position**'
384 | command '`Esc[s`'
385 |
386 | notes %(Saves the current cursor position. You can move the cursor to the saved cursor position by using the Restore Cursor Position sequence.)
387 | end
388 | entry do
389 | name '**Restore Cursor Position**'
390 | command '`Esc[u`'
391 |
392 | notes %(Returns the cursor to the position stored by the Save Cursor Position sequence.)
393 | end
394 | entry do
395 | name '**Erase Display**'
396 | command '`Esc[2J`'
397 |
398 | notes %(Clears the screen and moves the cursor to the home position (line 0, column 0).)
399 | end
400 | entry do
401 | name '**Erase <Line>**'
402 | command '`Esc[K`'
403 |
404 | notes %(Clears all characters from the cursor position to the end of the line (including the character at the cursor position).)
405 | end
406 | end
407 |
408 | end
409 |
--------------------------------------------------------------------------------
/ANSI.md:
--------------------------------------------------------------------------------
1 | title: ANSI
2 | name: ANSI Escape Codes
3 | keyword: ansi
4 |
5 | > `"\033[31;1;4mHello\033[0m"`
6 |
7 | #### Colors
8 |
9 |
10 | | name | command | note |
11 | | :--- | ---: | :--- |
12 | | | Foreground colors | |
13 | | Black | 30 | `\033[30;0m` |
14 | | Red | 31 | `\033[31;0m` |
15 | | Green | 32 | `\033[32;0m` |
16 | | Yellow | 33 | `\033[33;0m` |
17 | | Blue | 34 | `\033[34;0m` |
18 | | Magenta | 35 | `\033[35;0m` |
19 | | Cyan | 36 | `\033[36;0m` |
20 | | White | 37 | `\033[37;0m` |
21 | | | Background colors | |
22 | | Black | 40 | `\033[40;0m` |
23 | | Red | 41 | `\033[41;0m` |
24 | | Green | 42 | `\033[42;0m` |
25 | | Yellow | 43 | `\033[43;0m` |
26 | | Blue | 44 | `\033[44;0m` |
27 | | Magenta | 45 | `\033[45;0m` |
28 | | Cyan | 46 | `\033[46;0m` |
29 | | White | 47 | `\033[47;0m` |
30 | [Standard Colors]
31 |
32 |
33 | | name | command | note | |
34 | | :--- | ---: | :--- |
35 | | Reset / Normal | 0 | all attributes off |
36 | | Bold or increased intensity | 1 | |
37 | | Faint (decreased intensity) | 2 | Not widely supported. |
38 | | Italic | 3 | Not widely supported. Sometimes treated as inverse. |
39 | | Underline | 4 | |
40 | | Slow Blink | 5 | less than 150 per minute |
41 | | Rapid Blink | 6 | MS-DOS ANSI.SYS; 150+ per minute; not widely supported |
42 | | [[reverse video]] | 7 | swap foreground and background colors |
43 | | Conceal | 8 | Not widely supported. |
44 | | Crossed-out | 9 | Characters legible, but marked for deletion. Not widely supported. |
45 | | Primary(default) font | 10 | |
46 | | Alternate font | 11-19 | Select alternate font `n-10` |
47 | | Fraktur | 20 | hardly ever supported |
48 | | Bold off or Double Underline | 21 | Bold off not widely supported; double underline hardly ever supported. |
49 | | Normal color or intensity | 22 | Neither bold nor faint |
50 | | Not italic, not Fraktur | 23 | |
51 | | Underline off | 24 | Not singly or doubly underlined |
52 | | Blink off | 25 | |
53 | | Inverse off | 27 | |
54 | | Reveal | 28 | conceal off |
55 | | Not crossed out | 29 | |
56 | | Set foreground color | 30-37 | See color table below |
57 | | Set foreground color | 38 | Next arguments are `5;n` or `2;r;g;b`, see below |
58 | | Default foreground color | 39 | implementation defined (according to standard) |
59 | | Set background color | 40-47 | See color table below |
60 | | Set background color | 48 | Next arguments are `5;n` or `2;r;g;b`, see below |
61 | | Default background color | 49 | implementation defined (according to standard) |
62 | | Framed | 51 | |
63 | | Encircled | 52 | |
64 | | Overlined | 53 | |
65 | | Not framed or encircled | 54 | |
66 | | Not overlined | 55 | |
67 | | ideogram underline | 60 | hardly ever supported |
68 | | ideogram double underline | 61 | hardly ever supported |
69 | | ideogram overline | 62 | hardly ever supported |
70 | | ideogram double overline | 63 | hardly ever supported |
71 | | ideogram stress marking | 64 | hardly ever supported |
72 | | ideogram attributes off | 65 | reset the effects of all of 60-64 |
73 | | Set bright foreground color | 90-97 | aixterm (not in standard) |
74 | | Set bright background color | 100-107 | aixterm (not in standard) |
75 | [Font Effects]
76 |
77 |
78 | | name | command | note |
79 | | :--- | :---: | :--- |
80 | | **Cursor Position** | `Esc[<Line>;<Column>HEsc[<Line>;<Column>f` | Moves the cursor to the specified position (coordinates). If you do not specify a position, the cursor moves to the home position at the upper-left corner of the screen (line 0, column 0). This escape sequence works the same way as the following Cursor Position escape sequence. |
81 | | **Cursor Up** | `Esc[<Value>A` | Moves the cursor up by the specified number of lines without changing columns. If the cursor is already on the top line, ANSI.SYS ignores this sequence. |
82 | | **Cursor Down** | `Esc[<Value>B` | Moves the cursor down by the specified number of lines without changing columns. If the cursor is already on the bottom line, ANSI.SYS ignores this sequence. |
83 | | **Cursor Forward** | `Esc[<Value>C` | Moves the cursor forward by the specified number of columns without changing lines. If the cursor is already in the rightmost column, ANSI.SYS ignores this sequence. |
84 | | **Cursor Backward** | `Esc[<Value>D` | Moves the cursor back by the specified number of columns without changing lines. If the cursor is already in the leftmost column, ANSI.SYS ignores this sequence. |
85 | | **Save Cursor Position** | `Esc[s` | Saves the current cursor position. You can move the cursor to the saved cursor position by using the Restore Cursor Position sequence. |
86 | | **Restore Cursor Position** | `Esc[u` | Returns the cursor to the position stored by the Save Cursor Position sequence. |
87 | | **Erase Display** | `Esc[2J` | Clears the screen and moves the cursor to the home position (line 0, column 0). |
88 | | **Erase <Line>** | `Esc[K` | Clears all characters from the cursor position to the end of the line (including the character at the cursor position). |
89 | [Cursor Movement]
90 |
--------------------------------------------------------------------------------
/drush.md:
--------------------------------------------------------------------------------
1 | ###Drush commands
2 |
3 | ####Execute a drush command
4 |
5 | | Command | Description |
6 | | ----:|:---- |
7 | | Run `drush help [command]` to view command-specific help | Run `drush topic` to read even more documentation |
8 |
9 | ####Global options
10 |
11 | (see `drush topic core-global-options` for the full list)
12 |
13 | | Command | Description |
14 | | ----:|:---- |
15 | | -d, --debug | Display even more information, including internal messages |
16 | | -h, --help | This help system |
17 | | -n, --no | Assume 'no' as answer to all prompts |
18 | | -r , --root= | Drupal root directory to use (default: current directory) | |
19 | | -s, --simulate | Simulate all relevant actions (don't actually change the system) | |
20 | | -l <[URL]>, --uri=<[URL]> | URI of the drupal site to use (only needed in multisite environments or when running on an alternate port) |
21 | | -v, --verbose | Display extra information about the command |
22 | | -y, --yes | Assume 'yes' as answer to all prompts |
23 |
24 | ####Core drush commands: (core)
25 |
26 | | Command | Description |
27 | | ----:|:---- |
28 | | archive-dump (ard), archive-backup (arb) | Backup your code, files, and database into a single file |
29 | | archive-restore (arr) | Expand a site archive into a Drupal web site |
30 | | browse | Display a link to a given path or open link in a browser |
31 | | core-cli (php) | Open an interactive shell on a Drupal site |
32 | | core-config (conf, config) | Edit drushrc, site alias, and Drupal settingsphp files |
33 | | core-cron (cron) | Run all cron hooks in all active modules for specified site |
34 | | core-execute (exec, execute) | Execute a shell command Usually used with a site alias |
35 | | core-quick-drupal (qd) | Download, install, serve and login to Drupal with minimal configuration and dependencies |
36 | | core-requirements (status-report, rq) | Provides information about things that may be wrong in your Drupal installation, if any |
37 | | core-rsync (rsync) | Rsync the Drupal tree to/from another server using ssh |
38 | | core-status (status, st) | Provides a birds-eye view of the current Drupal installation, if any |
39 | | core-topic (topic) | Read detailed documentation on a given topic |
40 | | drupal-directory (dd) | Return path to a given module/theme directory |
41 | | help | Print this help message See `drush help help` for more options |
42 | | image-derive (id) | Create an image derivative |
43 | | image-flush (if) | Flush all derived images for a given style |
44 | | php-eval (eval, ev) | Evaluate arbitrary php code after bootstrapping Drupal (if available) | |
45 | | php-script (scr) | Run php script(s) | |
46 | | queue-list | Returns a list of all defined queues |
47 | | queue-run | Run a specific queue by name |
48 | | shell-alias (sha) | Print all known shell alias records |
49 | | site-alias (sa) | Print site alias records for all known site aliases and local sites |
50 | | site-install (si) | Install Drupal along with modules/themes/configuration using the specified install profile |
51 | | site-set (use) | Set a site alias to work on that will persist for the current session |
52 | | site-ssh (ssh) | Connect to a Drupal site's server via SSH for an interactive session or to run a shell command |
53 | | test-clean | Clean temporary tables and files |
54 | | test-run | Run tests Note that you must use the --uri option via the CLI or via a site alias |
55 | | updatedb (updb) | Apply any database updates required (as with running updatephp) | |
56 | | updatedb-status (updbst) | List any pending database updates |
57 | | usage-send (usend) | Send anonymous Drush usage information to statistics logging site Usage statistics contain the Drush command name and the Drush option names, but no arguments or option values |
58 | | usage-show (ushow) | Show Drush usage information that has been logged but not sent Usage statistics contain the Drush command name and the Drush option names, but no arguments or option values |
59 | | variable-delete (vdel) | Delete a variable |
60 | | variable-get (vget) | Get a list of some or all site variables and values |
61 | | variable-set (vset) | Set a variable |
62 | | version | Show drush version |
63 |
64 | ####Runserver commands: (runserver)
65 |
66 | | Command | Description |
67 | | ----:|:---- |
68 | | runserver (rs) | Runs a lightweight built in http server for development |
69 |
70 | ####Tools for auditing a Drupal site: (site_audit)
71 |
72 | | Command | Description |
73 | | ----:|:---- |
74 | | audit_all (aa) | Executes every Site Audit Report |
75 | | audit_best_practices (abp) | Audit best practices used |
76 | | audit_block (ab) | Audit Block |
77 | | audit_cache (ac) | Audit Drupal's caching settings |
78 | | audit_codebase (acb) | Audit the codebase |
79 | | audit_content (acn) | Audit content |
80 | | audit_cron (acr) | Audit cron |
81 | | audit_database (ad) | Report information about a site environment's database |
82 | | audit_extensions (ae) | Audit extensions (modules and themes) | |
83 | | audit_insights (agi) | Analyze a site using Google PageSpeed Insights |
84 | | audit_security (asec) | Audit the site for known security vulnerabilities |
85 | | audit_status (as) | Audit Drupal's built-in status report |
86 | | audit_users (au) | Audit Users |
87 | | audit_views (av) | Audit Views |
88 | | audit_watchdog (aw) | Audit the database logs |
89 | | site-audit-version | Show the Site Audit version |
90 |
91 | ####Cache commands: (cache)
92 |
93 | | Command | Description |
94 | | ----:|:---- |
95 | | cache-clear (cc) | Clear a specific cache, or all drupal caches |
96 | | cache-get (cg) | Fetch a cached object and display it |
97 | | cache-rebuild (cr, rebuild) | Rebuild a Drupal 8 site and clear all its caches |
98 | | cache-set (cs) | Cache an object expressed in JSON or `var_export()` format |
99 |
100 | ####Config commands: (config)
101 |
102 | | Command | Description |
103 | | ----:|:---- |
104 | | config-edit (cedit) | Open a config file in a text editor Edits are imported into active configration after closing editor |
105 | | config-export (cex) | Export config from the active directory |
106 | | config-get (cget) | Display a config value, or a whole configuration object |
107 | | config-import (cim) | Import config from a config directory |
108 | | config-list (cli) | List config names by prefix |
109 | | config-set (cset) | Set config value directly in active configuration |
110 |
111 | ####Field commands: (field)
112 |
113 | | Command | Description |
114 | | ----:|:---- |
115 | | field-clone | Clone a field and all its instances |
116 | | field-create | Create fields and instances; returns urls for field editing |
117 | | field-delete | Delete a field and its instances |
118 | | field-info | View information about fields, field_types, and widgets |
119 | | field-update | Return URL for field editing web page |
120 |
121 | ####Project manager commands: (pm)
122 |
123 | | Command | Description |
124 | | ----:|:---- |
125 | | pm-disable (dis) | Disable one or more extensions (modules or themes) | |
126 | | pm-download (dl) | Download projects from drupalorg or other sources |
127 | | pm-enable (en) | Enable one or more extensions (modules or themes) | |
128 | | pm-info (pmi) | Show detailed info for one or more extensions (modules or themes) | |
129 | | pm-list (pml) | Show a list of available extensions (modules and themes) | |
130 | | pm-refresh (rf) | Refresh update status information |
131 | | pm-releasenotes (rln) | Print release notes for given projects |
132 | | pm-releases (rl) | Print release information for given projects |
133 | | pm-uninstall (pmu) | Uninstall one or more modules |
134 | | pm-update (up) | Update Drupal core and contrib projects and apply any pending database updates (Same as pm-updatecode + updatedb) | |
135 | | pm-updatecode (upc) | Update Drupal core and contrib projects to latest recommended releases |
136 | | pm-updatestatus (ups) | Show a report of available minor updates to Drupal core and contrib projects |
137 |
138 | ####Role commands: (role)
139 |
140 | | Command | Description |
141 | | ----:|:---- |
142 | | role-add-perm (rap) | Grant a specified permission to a role |
143 | | role-create (rcrt) | Create a new role |
144 | | role-delete (rdel) | Delete a role |
145 | | role-list (rls) | Display a list of all roles defined on the system If a role name is provided as an argument, then all of the permissions of that role will be listed If a permission name is provided as an option, then all of the roles that have been granted that permission will be listed |
146 | | role-remove-perm (rmp) | Remove a specified permission from a role | |
147 |
148 | ####SQL commands: (sql)
149 |
150 | | Command | Description |
151 | | ----:|:---- |
152 | | sql-cli (sqlc) | Open a SQL command-line interface using Drupal's credentials |
153 | | sql-connect | A string for connecting to the DB |
154 | | sql-create | Create a database |
155 | | sql-drop | Drop all tables in a given database |
156 | | sql-dump | Exports the Drupal DB as SQL using mysqldump or equivalent |
157 | | sql-query (sqlq) | Execute a query against a database |
158 | | sql-sanitize (sqlsan) | Run sanitization operations on the current database |
159 | | sql-sync | Copy and import source database to target database Transfers via rsync |
160 |
161 | ####Search commands: (search)
162 |
163 | | Command | Description |
164 | | ----:|:---- |
165 | | search-index | Index the remaining search items without wiping the index |
166 | | search-reindex | Force the search index to be rebuilt |
167 | | search-status | Show how many items remain to be indexed out of the total |
168 |
169 | ####User commands: (user)
170 |
171 | | Command | Description |
172 | | ----:|:---- |
173 | | user-add-role (urol) | Add a role to the specified user accounts |
174 | | user-block (ublk) | Block the specified user(s) | |
175 | | user-cancel (ucan) | Cancel a user account with the specified name |
176 | | user-create (ucrt) | Create a user account with the specified name |
177 | | user-information (uinf) | Print information about the specified user(s) | |
178 | | user-login (uli) | Display a one time login link for the given user account (defaults to uid 1) | |
179 | | user-password (upwd) | (Re)Set the password for the user account with the specified name |
180 | | user-remove-role (urrol) | Remove a role from the specified user accounts |
181 | | user-unblock (uublk) | Unblock the specified user(s) | |
182 |
183 | ####User permission commands: (permissions)
184 |
185 | | Command | Description |
186 | | ----:|:---- |
187 | | permissions-list (perl) | List user permissions |
188 | | permissions-user (peru) | Print permissions of the specified user(s) | |
189 |
190 | ####Watchdog commands: (watchdog)
191 |
192 | | Command | Description |
193 | | ----:|:---- |
194 | | watchdog-delete (wd-del, wd-delete) | Delete watchdog messages |
195 | | watchdog-list (wd-list) | Show available message types and severity levels A prompt will ask for a choice to show watchdog messages |
196 | | watchdog-show (wd-show, ws) | Show watchdog messages |
197 |
198 | ####All commands in devel: (devel)
199 |
200 | | Command | Description |
201 | | ----:|:---- |
202 | | devel-download | Downloads the FirePHP library from http://firephporg/ |
203 | | devel-reinstall (dre) | Disable, Uninstall, and Install a list of projects |
204 | | devel-token (token) | List available tokens |
205 | | fn-hook (fnh, hook) | List implementations of a given hook and explore the source of the selected one |
206 | | fn-view (fnv) | Show the source of specified function or method |
207 |
208 | ####All commands in devel_generate: (devel_generate)
209 |
210 | | Command | Description |
211 | | ----:|:---- |
212 | | generate-content (genc) | Create content |
213 | | generate-menus (genm) | Create menus and menu items |
214 | | generate-terms (gent) | Create terms in specified vocabulary |
215 | | generate-users (genu) | Create users |
216 | | generate-vocabs (genv) | Create vocabularies |
217 |
218 | ####Other commands
219 |
220 | | Command | Description |
221 | | ----:|:---- |
222 | | clean-modules | Find and remove enabled modules that do not exist from the database |
223 | | composer | Perform package management and dependency tracking of your projects and libraries |
224 | | drupalgeddon-test (drugtest) | Check for known indications of Drupalgeddon exploit |
225 | | make | Turns a makefile into a working Drupal codebase |
226 | | make-generate (generate-makefile) | Generate a makefile from the current Drupal site |
227 | | registry-rebuild (rr) | Rebuild the registry table (for classes) and the system table (for module locations) in a Drupal install |
228 | | stripe-download | Downloads the Stripe PHP library from |
229 |
230 | (clean_missing_modules, composer, drupalgeddon, make, registry_rebuild, commerce_stripe)
231 |
232 | ---
233 |
234 | Created by Stuart Hertzog
235 |
--------------------------------------------------------------------------------
/JavaScript.md:
--------------------------------------------------------------------------------
1 | {
2 | "id": "bt_js",
3 | "style": "css/JavaScript.css",
4 | "layout": "multicolumn"
5 | }
6 | %%%END
7 |
8 | # JavaScript
9 |
10 | ### Arrays
11 |
12 | var numbersArray = [0, 1, 2, 3, 4, 5, 6, 7];
13 |
14 | ##### .length()
15 |
16 | Get length/size of array
17 |
18 | console.log("Array Length: " + numbersArray.length);
19 |
20 |
21 | ##### .pop()
22 |
23 | Remove the LAST item AND store it as a variable
24 |
25 | var lastItem = numbersArray.pop();
26 | console.log("This was the last item: " + lastItem);
27 | console.log("Array After Pop: " + numbersArray);
28 |
29 |
30 | ##### .push()
31 |
32 | ADD an item to the END of the array
33 |
34 | var newItem = 7;
35 | numbersArray.push(newItem);
36 | console.log("Array After Push: " + numbersArray);
37 |
38 |
39 | ##### .reverse()
40 |
41 | Reverse the original array
42 |
43 | numbersArray.reverse();
44 | console.log("Same array after reverse: " + numbersArray);
45 |
46 |
47 | ##### .shift()
48 |
49 | Get FIRST item AND remove it from array
50 |
51 | console.log("First Item (Shift): " + numbersArray.shift());
52 | console.log("Array After Shift: " + numbersArray);
53 |
54 |
55 | ##### .sort()
56 |
57 | Sort the items of the array (no rules give least to greatest)
58 |
59 | console.log("Sorted array no rules: " + numbersArray.sort());
60 |
61 | function greatestToLeast(a, b) {
62 | return b - a;
63 | }
64 | console.log("Sorted greatest to least: " + numbersArray.sort(greatestToLeast));
65 |
66 |
67 | ##### .splice()
68 |
69 | REMOVE item(s) from array, optionally add.
70 |
71 | splice accepts index,amount,newItem and returns an array of removed items.
72 |
73 | console.log("Items Removed With Splice: " + numbersArray.splice(2, 3));
74 | console.log("Array After Splice: " + numbersArray);
75 |
76 |
77 | ##### .unshift()
78 |
79 | ADD item to the BEGINNING of array
80 |
81 | numbersArray.unshift(7);
82 | console.log("Array after unshift: " + numbersArray);
83 |
84 |
85 | ##### .concat()
86 |
87 | Joins two arrays to create another
88 |
89 | var negativeNumbers = [-1, -2, -3, -4, -5];
90 | var newArray = numbersArray.concat(negativeNumbers);
91 | console.log("Combined Arrays: " + newArray);
92 |
93 |
94 | ##### .join()
95 |
96 | Creates a string from an array separated by a given string
97 |
98 | var string = newArray.join(" + ");
99 | console.log("String from join: " + string);
100 |
101 |
102 | ##### .slice()
103 |
104 | Returns NEW array by REMOVING edges from array.
105 |
106 | slice accepts index,index (excluded, included). Starts cursor 0 at very beginning (not first item) and removes everything between two cursors.
107 |
108 | var sliceArray = newArray.slice(3, 7);
109 | console.log("New Array From Slice: " + sliceArray);
110 |
111 |
112 | ##### .indexOf() and .lastIndexOf()
113 |
114 | FIND an element in an array
115 |
116 | var fruits = ["apples", "oranges", "grapes", "bananas", "apples"];
117 |
118 | var firstAppleIndex = fruits.indexOf("apples");
119 | var lastAppleIndex = fruits.lastIndexOf("apples");
120 | var firstMangoIndex = fruits.indexOf("mangos"); // Not found returns -1
121 |
122 |
123 | ##### .forEach()
124 |
125 | ITERATE over the array
126 |
127 | var numbersArray = [1, 2, 3, 4, 5];
128 | numbersArray.forEach(function(item) {
129 | // console.log(item);
130 | });
131 |
132 |
133 | ##### .every()
134 |
135 | TEST EVERY element for truthy
136 |
137 | var names = ["Brandon", "Destinee", "Harvey", "June", 24];
138 |
139 | function isString(item) {
140 | return typeof item === "string";
141 | }
142 |
143 | var everyNameIsAString = names.every(isString);
144 |
145 |
146 | ##### .some()
147 |
148 | TEST ANY element for truthy
149 |
150 | var places = ["Los Angeles", "New York", "Miami", "Chicago", 33];
151 |
152 | function isNumber(item) {
153 | return typeof item === "number";
154 | }
155 |
156 | var anyPlaceIsANumber = places.some(isNumber);
157 |
158 |
159 | ##### .filter()
160 |
161 | CREATE NEW array from elements that are truthy
162 |
163 | var companies = ["Apple", "Google", "Coca Cola", "General Electric"];
164 |
165 | function startsWithG(item) {
166 | return item[0] === "g" || item[0] === "G";
167 | }
168 |
169 | var companiesThatStartWithG = companies.filter(startsWithG);
170 |
171 |
172 | ##### .map()
173 |
174 | CREATE NEW array from elements with function rules
175 |
176 | var oneThroughFive = [1, 2, 3, 4, 5];
177 |
178 | function multiplyByTwo(item) {
179 | return item * 2;
180 | }
181 |
182 | var twoFourSixEightTen = oneThroughFive.map(multiplyByTwo);
183 |
184 |
185 | ##### .reduce()
186 |
187 | CREATE NEW VALUE from elements with function rules
188 |
189 | var tensToThousand = [1, 10, 100, 1000];
190 |
191 | function addTheNumbers(previousValue, currentValue) {
192 | return previousValue + currentValue;
193 | }
194 |
195 | var number = tensToThousand.reduce(addTheNumbers);
196 | // 2nd optional parameter: initial value to reduce
197 | var sum = tensToThousand.reduce(addTheNumbers, 0);
198 |
199 |
200 | ### Objects
201 |
202 | ##### CREATE an object
203 |
204 | var jane = {
205 | firstName: "Jane",
206 | lastName: "Smith",
207 | age: 24,
208 | getFullName: function() {
209 | return this.firstName + " " + this.lastName;
210 | }
211 | };
212 |
213 | ##### CREATE a class
214 |
215 | Use a constructor function for objects
216 |
217 | function Person(firstName, lastName, age) {
218 | this.firstName = firstName;
219 | this.lastName = lastName;
220 | this.age = age;
221 | }
222 |
223 | Methods should go into prototypes, not the constructor.
224 |
225 | // Saves memory.
226 | Person.prototype.getFullName = function() {
227 | return this.firstName + " " + this.lastName;
228 | };
229 |
230 | var joe = new Person("Joe", "Smith", 24);
231 |
232 | console.log(jane.getFullName());
233 | console.log(joe.getFullName());
234 |
235 |
236 | ### Strings
237 |
238 | var str = "The 10 quick brown foxes jumped over the lazy dog.";
239 |
240 | ##### .charAt()
241 | // Returns the character at a certain index
242 | console.log("Character at index 8: " + str.charAt(8));
243 |
244 |
245 | ##### .indexOf() AND .lastIndexOf()
246 |
247 | // Returns the index of the first instance of a given character
248 | console.log("First index of \"r\": " + str.indexOf("r"));
249 | console.log("Last index of \"r\": " + str.lastIndexOf("r"));
250 |
251 |
252 | ##### .search()
253 |
254 | // Same as indexOf(), but accepts a regex
255 | console.log("First index of \"10\": " + str.search(/10/));
256 |
257 |
258 | ##### .match()
259 |
260 | // Returns an array of all of the matches of a regex
261 | // Useful for trying to figure out how many times something appears
262 | // Get a match, then get the length of the returned array.
263 | console.log("Matches of \"r\": " + str.match(/the/gi));
264 |
265 |
266 | ##### .replace()
267 |
268 | // Returns a string with matched regex replaced with given string
269 | console.log("\"The\" to \"why\": " + str.replace(/the/gi, 'why'));
270 |
271 |
272 | ##### .slice()
273 |
274 | // Returns substring string by REMOVING edges of full string
275 | // Replacement for substr and substring bc it accepts backwards indexes
276 | // Accepts two index arguments
277 | console.log("Sliced String: " + str.slice(4, -4));
278 |
279 |
280 | ##### .split()
281 |
282 | // Turns string by a given string into an array
283 | console.log("Split string into array by space: " + str.split(" "));
284 |
285 |
286 | ##### .toLowerCase()
287 |
288 | // Makes string all lower case
289 | console.log("Lower Case String: " + str.toLowerCase());
290 |
291 |
292 | ##### .toUpperCase()
293 |
294 | // Makes string all upper case
295 | console.log("Upper Case String: " + str.toUpperCase());
296 |
297 |
298 | ### Dates
299 |
300 | var date = new Date();
301 | var dateWasBorn = new Date(1991, 3, 29, 4, 12, 46);
302 | var yearWasBorn = dateWasBorn.getFullYear();
303 | var monthWasBorn = dateWasBorn.getMonth(); // 0 to 11
304 | var dayOfMonthWasBorn = dateWasBorn.getDate();
305 | var dayOfWeekWasBorn = dateWasBorn.getDay(); // 0 to 6
306 |
307 |
308 | ##### Date comparison
309 |
310 | var newerDate = date > dateWasBorn ? date : dateWasBorn;
311 | var olderDate = date < dateWasBorn ? date : dateWasBorn;
312 |
313 | console.log(olderDate);
314 |
315 | ### Math
316 |
317 | var exponent = Math.pow(2, 3);
318 | var squareRoot = Math.sqrt(9);
319 | var roundedNumber = Math.round(30.45);
320 | var roundedUp = Math.ceil(30.45);
321 | var roundedDown = Math.floor(30.85);
322 | var largestNumber = Math.max(3, 9, 45, 18, 2);
323 | var smallestNumber = Math.min(3, 9, 45, 18, 2);
324 | var absolutValue = Math.abs(-7);
325 | var randomNumber = Math.random();
326 | var zeroOrOne = Math.round(Math.random());
327 | var zeroToNine = Math.floor(Math.random() * 10);
328 | var oneToTen = Math.ceil(Math.random() * 10);
329 | var minusOne = Math.cos(Math.PI);
330 | var one = Math.sin(Math.PI / 2);
331 | var piDividedBy4 = Math.atan2(1, 1);
332 |
333 |
334 | ### Functions
335 |
336 | ##### DECLARE
337 |
338 | _hoisted to the top on page load_
339 |
340 | function declaredFunction() {
341 | // do something
342 | }
343 |
344 |
345 | ##### EXPRESS
346 |
347 | var expressedFunction = function() {
348 | // do something
349 | };
350 |
351 |
352 | ##### CLOSURES
353 |
354 | function addSomething(a) {
355 | return function(b) {
356 | return a + b;
357 | };
358 | }
359 | var addFive = addSomething(5);
360 | var fivePlusTen = addFive(10);
361 |
362 |
363 | ##### CALLBACKS or HIGHER-ORDER FUNCTIONS
364 |
365 | var calculator = {
366 | calculate: function(num1, num2, callback) {
367 | return callback(num1, num2);
368 | }
369 | };
370 |
371 | var sum = function(num1, num2) {
372 | return num1 + num2;
373 | };
374 |
375 | var sumOfFiveAndTwo = calculator.calculate(5, 2, sum);
376 | console.log(sumOfFiveAndTwo);
377 |
378 |
379 | ### Callbacks
380 |
381 | ##### REWRITING NATIVE FUNCTIONS
382 |
383 | var myArray = [1, 2, 3, 4, 5];
384 |
385 | // array.forEach()
386 | function each(array, callback) {
387 | if (Array.isArray(array)) {
388 | var i;
389 | for (i = 0; i < array.length; i += 1) {
390 | callback(array[i], i);
391 | }
392 | }
393 | }
394 |
395 | // array.map() using the above each() function
396 | function arrayMap(array, callback) {
397 | var tempArray = [];
398 | each(array, function(item, index) {
399 | tempArray.push(callback(item, index));
400 | });
401 | return tempArray;
402 | }
403 |
404 | // array.filter() using the above each() function
405 | function arrayFilter(array, callback) {
406 | var tempArray = [];
407 | each(array, function(item) {
408 | if (callback(item)) {
409 | tempArray.push(item);
410 | }
411 | });
412 | return tempArray;
413 | }
414 |
415 | // array.reduce()/.concat() using the above each() function
416 | function arrayReduce(array, callback) {
417 | var finalValue = array[0];
418 | each(array.slice(1), function(item) {
419 | finalValue = callback(finalValue, item);
420 | });
421 | return finalValue;
422 | }
423 |
424 | // python's .zip() functionality, using the above arrayMap() function
425 | // given arrays of equal size
426 | function arrayZip(array1, array2 /*,... */) {
427 | var params = Array.prototype.slice.call(arguments);
428 | return arrayMap(params[0], function(a, i) {
429 | return arrayMap(params, function(item) {
430 | return item[i];
431 | });
432 | });
433 | }
434 |
435 | var secondArray = [6, 7, 8, 9, 10];
436 |
437 | var newArray = arrayZip(myArray, secondArray);
438 |
439 | function arrayIndexOf(array, item) {
440 | // indexOf() stops once the item is found
441 | var i;
442 | for (i = 0; i < array.length; i += 1) {
443 | if (array[i] === item) {
444 | return i;
445 | }
446 | }
447 | return -1;
448 | }
449 |
450 | var findFour = arrayIndexOf(myArray, 4);
451 |
452 | console.log(findFour);
453 |
454 |
455 |
456 |
457 | ### Best Practices
458 |
459 | // when using simple if/else: ternary operator
460 | var age = 22;
461 | var status = age >= 21 ? "major" : "minor";
462 | console.log("Status: " + status);
463 |
464 |
465 | // when using multiple if/else but with simple logic: switch
466 | var colorChosen = "orange";
467 |
468 | switch (colorChosen) {
469 | case "blue":
470 | console.log("I love blue!");
471 | break;
472 | case "red":
473 | console.log("I love red!");
474 | break;
475 | case "orange":
476 | console.log("I love orange!");
477 | break;
478 | default:
479 | console.log("I don't know that color.");
480 | }
481 |
482 | // Using operators in return statements
483 | // good when coupled with recursion to test "any" or "every" for truthy
484 | function either(on, off) {
485 | return on || off;
486 | }
487 |
488 | function both(on, off) {
489 | return on && off;
490 | }
491 |
492 | var on = false, off = true;
493 |
494 | console.log(either(on, off)); // returns true
495 | console.log(both(on, off)); // returns false
496 |
497 | > From [rzCodes/rzJSFundamentals](https://github.com/rzCodes/rzJSFundamentals)
498 |
--------------------------------------------------------------------------------
/ANSI Escape Codes.docset/Contents/Resources/Documents/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | ANSI
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 |
82 |
83 |
84 |
> "\033[31;1;4mHello\033[0m"
85 |
86 | Colors
87 |
88 |
89 |
90 | Standard Colors
91 |
92 |
294 |
295 |
296 |
297 | Font Effects
298 |
299 |
743 |
744 |
745 |
746 | Cursor Movement
747 |
748 |
851 |
852 |
853 |
856 |
857 |
858 |
--------------------------------------------------------------------------------
/Marked2.docset/Contents/Resources/Documents/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | Marked 2
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 |
88 |
89 |
Keyboard shortcuts for Marked 2
90 |
91 |
92 | Application Shortcuts
93 |
94 |
483 |
484 |
485 |
486 | Quick Toggles
487 |
488 |
580 |
581 |
582 |
583 | Preview Shortcuts
584 |
585 |
846 |
847 |
848 |
849 | Table of Contents navigation
850 |
851 |
941 |
942 |
943 |
946 |
947 |
948 |
--------------------------------------------------------------------------------