migrate
This commit is contained in:
@@ -0,0 +1,267 @@
|
||||
---
|
||||
tags:
|
||||
- Cheetsheet
|
||||
---
|
||||
|
||||
---------------------------
|
||||
|
||||
Colors 0-15 are Xterm system colors.
|
||||
|
||||
| Xterm Number | Xterm Name | HEX | RGB | HSL |
|
||||
| ------------ | ----------------- | --------- | ---------------- | ----------------- |
|
||||
| 0 | Black (SYSTEM) | `#000000` | rgb(0,0,0) | hsl(0,0%,0%) |
|
||||
| 1 | Maroon (SYSTEM) | `#800000` | rgb(128,0,0) | hsl(0,100%,25%) |
|
||||
| 2 | Green (SYSTEM) | `#008000` | rgb(0,128,0) | hsl(120,100%,25%) |
|
||||
| 3 | Olive (SYSTEM) | `#808000` | rgb(128,128,0) | hsl(60,100%,25%) |
|
||||
| 4 | Navy (SYSTEM) | `#000080` | rgb(0,0,128) | hsl(240,100%,25%) |
|
||||
| 5 | Purple (SYSTEM) | `#800080` | rgb(128,0,128) | hsl(300,100%,25%) |
|
||||
| 6 | Teal (SYSTEM) | `#008080` | rgb(0,128,128) | hsl(180,100%,25%) |
|
||||
| 7 | Silver (SYSTEM) | `#c0c0c0` | rgb(192,192,192) | hsl(0,0%,75%) |
|
||||
| 8 | Grey (SYSTEM) | `#808080` | rgb(128,128,128) | hsl(0,0%,50%) |
|
||||
| 9 | Red (SYSTEM) | `#ff0000` | rgb(255,0,0) | hsl(0,100%,50%) |
|
||||
| 10 | Lime (SYSTEM) | `#00ff00` | rgb(0,255,0) | hsl(120,100%,50%) |
|
||||
| 11 | Yellow (SYSTEM) | `#ffff00` | rgb(255,255,0) | hsl(60,100%,50%) |
|
||||
| 12 | Blue (SYSTEM) | `#0000ff` | rgb(0,0,255) | hsl(240,100%,50%) |
|
||||
| 13 | Fuchsia (SYSTEM) | `#ff00ff` | rgb(255,0,255) | hsl(300,100%,50%) |
|
||||
| 14 | Aqua (SYSTEM) | `#00ffff` | rgb(0,255,255) | hsl(180,100%,50%) |
|
||||
| 15 | White (SYSTEM) | `#ffffff` | rgb(255,255,255) | hsl(0,0%,100%) |
|
||||
| 16 | Grey0 | `#000000` | rgb(0,0,0) | hsl(0,0%,0%) |
|
||||
| 17 | NavyBlue | `#00005f` | rgb(0,0,95) | hsl(240,100%,18%) |
|
||||
| 18 | DarkBlue | `#000087` | rgb(0,0,135) | hsl(240,100%,26%) |
|
||||
| 19 | Blue3 | `#0000af` | rgb(0,0,175) | hsl(240,100%,34%) |
|
||||
| 20 | Blue3 | `#0000d7` | rgb(0,0,215) | hsl(240,100%,42%) |
|
||||
| 21 | Blue1 | `#0000ff` | rgb(0,0,255) | hsl(240,100%,50%) |
|
||||
| 22 | DarkGreen | `#005f00` | rgb(0,95,0) | hsl(120,100%,18%) |
|
||||
| 23 | DeepSkyBlue4 | `#005f5f` | rgb(0,95,95) | hsl(180,100%,18%) |
|
||||
| 24 | DeepSkyBlue4 | `#005f87` | rgb(0,95,135) | hsl(97,100%,26%) |
|
||||
| 25 | DeepSkyBlue4 | `#005faf` | rgb(0,95,175) | hsl(07,100%,34%) |
|
||||
| 26 | DodgerBlue3 | `#005fd7` | rgb(0,95,215) | hsl(13,100%,42%) |
|
||||
| 27 | DodgerBlue2 | `#005fff` | rgb(0,95,255) | hsl(17,100%,50%) |
|
||||
| 28 | Green4 | `#008700` | rgb(0,135,0) | hsl(120,100%,26%) |
|
||||
| 29 | SpringGreen4 | `#00875f` | rgb(0,135,95) | hsl(62,100%,26%) |
|
||||
| 30 | Turquoise4 | `#008787` | rgb(0,135,135) | hsl(180,100%,26%) |
|
||||
| 31 | DeepSkyBlue3 | `#0087af` | rgb(0,135,175) | hsl(93,100%,34%) |
|
||||
| 32 | DeepSkyBlue3 | `#0087d7` | rgb(0,135,215) | hsl(02,100%,42%) |
|
||||
| 33 | DodgerBlue1 | `#0087ff` | rgb(0,135,255) | hsl(08,100%,50%) |
|
||||
| 34 | Green3 | `#00af00` | rgb(0,175,0) | hsl(120,100%,34%) |
|
||||
| 35 | SpringGreen3 | `#00af5f` | rgb(0,175,95) | hsl(52,100%,34%) |
|
||||
| 36 | DarkCyan | `#00af87` | rgb(0,175,135) | hsl(66,100%,34%) |
|
||||
| 37 | LightSeaGreen | `#00afaf` | rgb(0,175,175) | hsl(180,100%,34%) |
|
||||
| 38 | DeepSkyBlue2 | `#00afd7` | rgb(0,175,215) | hsl(91,100%,42%) |
|
||||
| 39 | DeepSkyBlue1 | `#00afff` | rgb(0,175,255) | hsl(98,100%,50%) |
|
||||
| 40 | Green3 | `#00d700` | rgb(0,215,0) | hsl(120,100%,42%) |
|
||||
| 41 | SpringGreen3 | `#00d75f` | rgb(0,215,95) | hsl(46,100%,42%) |
|
||||
| 42 | SpringGreen2 | `#00d787` | rgb(0,215,135) | hsl(57,100%,42%) |
|
||||
| 43 | Cyan3 | `#00d7af` | rgb(0,215,175) | hsl(68,100%,42%) |
|
||||
| 44 | DarkTurquoise | `#00d7d7` | rgb(0,215,215) | hsl(180,100%,42%) |
|
||||
| 45 | Turquoise2 | `#00d7ff` | rgb(0,215,255) | hsl(89,100%,50%) |
|
||||
| 46 | Green1 | `#00ff00` | rgb(0,255,0) | hsl(120,100%,50%) |
|
||||
| 47 | SpringGreen2 | `#00ff5f` | rgb(0,255,95) | hsl(42,100%,50%) |
|
||||
| 48 | SpringGreen1 | `#00ff87` | rgb(0,255,135) | hsl(51,100%,50%) |
|
||||
| 49 | MediumSpringGreen | `#00ffaf` | rgb(0,255,175) | hsl(61,100%,50%) |
|
||||
| 50 | Cyan2 | `#00ffd7` | rgb(0,255,215) | hsl(70,100%,50%) |
|
||||
| 51 | Cyan1 | `#00ffff` | rgb(0,255,255) | hsl(180,100%,50%) |
|
||||
| 52 | DarkRed | `#5f0000` | rgb(95,0,0) | hsl(0,100%,18%) |
|
||||
| 53 | DeepPink4 | `#5f005f` | rgb(95,0,95) | hsl(300,100%,18%) |
|
||||
| 54 | Purple4 | `#5f0087` | rgb(95,0,135) | hsl(82,100%,26%) |
|
||||
| 55 | Purple4 | `#5f00af` | rgb(95,0,175) | hsl(72,100%,34%) |
|
||||
| 56 | Purple3 | `#5f00d7` | rgb(95,0,215) | hsl(66,100%,42%) |
|
||||
| 57 | BlueViolet | `#5f00ff` | rgb(95,0,255) | hsl(62,100%,50%) |
|
||||
| 58 | Orange4 | `#5f5f00` | rgb(95,95,0) | hsl(60,100%,18%) |
|
||||
| 59 | Grey37 | `#5f5f5f` | rgb(95,95,95) | hsl(0,0%,37%) |
|
||||
| 60 | MediumPurple4 | `#5f5f87` | rgb(95,95,135) | hsl(240,17%,45%) |
|
||||
| 61 | SlateBlue3 | `#5f5faf` | rgb(95,95,175) | hsl(240,33%,52%) |
|
||||
| 62 | SlateBlue3 | `#5f5fd7` | rgb(95,95,215) | hsl(240,60%,60%) |
|
||||
| 63 | RoyalBlue1 | `#5f5fff` | rgb(95,95,255) | hsl(240,100%,68%) |
|
||||
| 64 | Chartreuse4 | `#5f8700` | rgb(95,135,0) | hsl(7,100%,26%) |
|
||||
| 65 | DarkSeaGreen4 | `#5f875f` | rgb(95,135,95) | hsl(120,17%,45%) |
|
||||
| 66 | PaleTurquoise4 | `#5f8787` | rgb(95,135,135) | hsl(180,17%,45%) |
|
||||
| 67 | SteelBlue | `#5f87af` | rgb(95,135,175) | hsl(210,33%,52%) |
|
||||
| 68 | SteelBlue3 | `#5f87d7` | rgb(95,135,215) | hsl(220,60%,60%) |
|
||||
| 69 | CornflowerBlue | `#5f87ff` | rgb(95,135,255) | hsl(225,100%,68%) |
|
||||
| 70 | Chartreuse3 | `#5faf00` | rgb(95,175,0) | hsl(7,100%,34%) |
|
||||
| 71 | DarkSeaGreen4 | `#5faf5f` | rgb(95,175,95) | hsl(120,33%,52%) |
|
||||
| 72 | CadetBlue | `#5faf87` | rgb(95,175,135) | hsl(150,33%,52%) |
|
||||
| 73 | CadetBlue | `#5fafaf` | rgb(95,175,175) | hsl(180,33%,52%) |
|
||||
| 74 | SkyBlue3 | `#5fafd7` | rgb(95,175,215) | hsl(200,60%,60%) |
|
||||
| 75 | SteelBlue1 | `#5fafff` | rgb(95,175,255) | hsl(210,100%,68%) |
|
||||
| 76 | Chartreuse3 | `#5fd700` | rgb(95,215,0) | hsl(3,100%,42%) |
|
||||
| 77 | PaleGreen3 | `#5fd75f` | rgb(95,215,95) | hsl(120,60%,60%) |
|
||||
| 78 | SeaGreen3 | `#5fd787` | rgb(95,215,135) | hsl(140,60%,60%) |
|
||||
| 79 | Aquamarine3 | `#5fd7af` | rgb(95,215,175) | hsl(160,60%,60%) |
|
||||
| 80 | MediumTurquoise | `#5fd7d7` | rgb(95,215,215) | hsl(180,60%,60%) |
|
||||
| 81 | SteelBlue1 | `#5fd7ff` | rgb(95,215,255) | hsl(195,100%,68%) |
|
||||
| 82 | Chartreuse2 | `#5fff00` | rgb(95,255,0) | hsl(7,100%,50%) |
|
||||
| 83 | SeaGreen2 | `#5fff5f` | rgb(95,255,95) | hsl(120,100%,68%) |
|
||||
| 84 | SeaGreen1 | `#5fff87` | rgb(95,255,135) | hsl(135,100%,68%) |
|
||||
| 85 | SeaGreen1 | `#5fffaf` | rgb(95,255,175) | hsl(150,100%,68%) |
|
||||
| 86 | Aquamarine1 | `#5fffd7` | rgb(95,255,215) | hsl(165,100%,68%) |
|
||||
| 87 | DarkSlateGray2 | `#5fffff` | rgb(95,255,255) | hsl(180,100%,68%) |
|
||||
| 88 | DarkRed | `#870000` | rgb(135,0,0) | hsl(0,100%,26%) |
|
||||
| 89 | DeepPink4 | `#87005f` | rgb(135,0,95) | hsl(17,100%,26%) |
|
||||
| 90 | DarkMagenta | `#870087` | rgb(135,0,135) | hsl(300,100%,26%) |
|
||||
| 91 | DarkMagenta | `#8700af` | rgb(135,0,175) | hsl(86,100%,34%) |
|
||||
| 92 | DarkViolet | `#8700d7` | rgb(135,0,215) | hsl(77,100%,42%) |
|
||||
| 93 | Purple | `#8700ff` | rgb(135,0,255) | hsl(71,100%,50%) |
|
||||
| 94 | Orange4 | `#875f00` | rgb(135,95,0) | hsl(2,100%,26%) |
|
||||
| 95 | LightPink4 | `#875f5f` | rgb(135,95,95) | hsl(0,17%,45%) |
|
||||
| 96 | Plum4 | `#875f87` | rgb(135,95,135) | hsl(300,17%,45%) |
|
||||
| 97 | MediumPurple3 | `#875faf` | rgb(135,95,175) | hsl(270,33%,52%) |
|
||||
| 98 | MediumPurple3 | `#875fd7` | rgb(135,95,215) | hsl(260,60%,60%) |
|
||||
| 99 | SlateBlue1 | `#875fff` | rgb(135,95,255) | hsl(255,100%,68%) |
|
||||
| 100 | Yellow4 | `#878700` | rgb(135,135,0) | hsl(60,100%,26%) |
|
||||
| 101 | Wheat4 | `#87875f` | rgb(135,135,95) | hsl(60,17%,45%) |
|
||||
| 102 | Grey53 | `#878787` | rgb(135,135,135) | hsl(0,0%,52%) |
|
||||
| 103 | LightSlateGrey | `#8787af` | rgb(135,135,175) | hsl(240,20%,60%) |
|
||||
| 104 | MediumPurple | `#8787d7` | rgb(135,135,215) | hsl(240,50%,68%) |
|
||||
| 105 | LightSlateBlue | `#8787ff` | rgb(135,135,255) | hsl(240,100%,76%) |
|
||||
| 106 | Yellow4 | `#87af00` | rgb(135,175,0) | hsl(3,100%,34%) |
|
||||
| 107 | DarkOliveGreen3 | `#87af5f` | rgb(135,175,95) | hsl(90,33%,52%) |
|
||||
| 108 | DarkSeaGreen | `#87af87` | rgb(135,175,135) | hsl(120,20%,60%) |
|
||||
| 109 | LightSkyBlue3 | `#87afaf` | rgb(135,175,175) | hsl(180,20%,60%) |
|
||||
| 110 | LightSkyBlue3 | `#87afd7` | rgb(135,175,215) | hsl(210,50%,68%) |
|
||||
| 111 | SkyBlue2 | `#87afff` | rgb(135,175,255) | hsl(220,100%,76%) |
|
||||
| 112 | Chartreuse2 | `#87d700` | rgb(135,215,0) | hsl(2,100%,42%) |
|
||||
| 113 | DarkOliveGreen3 | `#87d75f` | rgb(135,215,95) | hsl(100,60%,60%) |
|
||||
| 114 | PaleGreen3 | `#87d787` | rgb(135,215,135) | hsl(120,50%,68%) |
|
||||
| 115 | DarkSeaGreen3 | `#87d7af` | rgb(135,215,175) | hsl(150,50%,68%) |
|
||||
| 116 | DarkSlateGray3 | `#87d7d7` | rgb(135,215,215) | hsl(180,50%,68%) |
|
||||
| 117 | SkyBlue1 | `#87d7ff` | rgb(135,215,255) | hsl(200,100%,76%) |
|
||||
| 118 | Chartreuse1 | `#87ff00` | rgb(135,255,0) | hsl(8,100%,50%) |
|
||||
| 119 | LightGreen | `#87ff5f` | rgb(135,255,95) | hsl(105,100%,68%) |
|
||||
| 120 | LightGreen | `#87ff87` | rgb(135,255,135) | hsl(120,100%,76%) |
|
||||
| 121 | PaleGreen1 | `#87ffaf` | rgb(135,255,175) | hsl(140,100%,76%) |
|
||||
| 122 | Aquamarine1 | `#87ffd7` | rgb(135,255,215) | hsl(160,100%,76%) |
|
||||
| 123 | DarkSlateGray1 | `#87ffff` | rgb(135,255,255) | hsl(180,100%,76%) |
|
||||
| 124 | Red3 | `#af0000` | rgb(175,0,0) | hsl(0,100%,34%) |
|
||||
| 125 | DeepPink4 | `#af005f` | rgb(175,0,95) | hsl(27,100%,34%) |
|
||||
| 126 | MediumVioletRed | `#af0087` | rgb(175,0,135) | hsl(13,100%,34%) |
|
||||
| 127 | Magenta3 | `#af00af` | rgb(175,0,175) | hsl(300,100%,34%) |
|
||||
| 128 | DarkViolet | `#af00d7` | rgb(175,0,215) | hsl(88,100%,42%) |
|
||||
| 129 | Purple | `#af00ff` | rgb(175,0,255) | hsl(81,100%,50%) |
|
||||
| 130 | DarkOrange3 | `#af5f00` | rgb(175,95,0) | hsl(2,100%,34%) |
|
||||
| 131 | IndianRed | `#af5f5f` | rgb(175,95,95) | hsl(0,33%,52%) |
|
||||
| 132 | HotPink3 | `#af5f87` | rgb(175,95,135) | hsl(330,33%,52%) |
|
||||
| 133 | MediumOrchid3 | `#af5faf` | rgb(175,95,175) | hsl(300,33%,52%) |
|
||||
| 134 | MediumOrchid | `#af5fd7` | rgb(175,95,215) | hsl(280,60%,60%) |
|
||||
| 135 | MediumPurple2 | `#af5fff` | rgb(175,95,255) | hsl(270,100%,68%) |
|
||||
| 136 | DarkGoldenrod | `#af8700` | rgb(175,135,0) | hsl(6,100%,34%) |
|
||||
| 137 | LightSalmon3 | `#af875f` | rgb(175,135,95) | hsl(30,33%,52%) |
|
||||
| 138 | RosyBrown | `#af8787` | rgb(175,135,135) | hsl(0,20%,60%) |
|
||||
| 139 | Grey63 | `#af87af` | rgb(175,135,175) | hsl(300,20%,60%) |
|
||||
| 140 | MediumPurple2 | `#af87d7` | rgb(175,135,215) | hsl(270,50%,68%) |
|
||||
| 141 | MediumPurple1 | `#af87ff` | rgb(175,135,255) | hsl(260,100%,76%) |
|
||||
| 142 | Gold3 | `#afaf00` | rgb(175,175,0) | hsl(60,100%,34%) |
|
||||
| 143 | DarkKhaki | `#afaf5f` | rgb(175,175,95) | hsl(60,33%,52%) |
|
||||
| 144 | NavajoWhite3 | `#afaf87` | rgb(175,175,135) | hsl(60,20%,60%) |
|
||||
| 145 | Grey69 | `#afafaf` | rgb(175,175,175) | hsl(0,0%,68%) |
|
||||
| 146 | LightSteelBlue3 | `#afafd7` | rgb(175,175,215) | hsl(240,33%,76%) |
|
||||
| 147 | LightSteelBlue | `#afafff` | rgb(175,175,255) | hsl(240,100%,84%) |
|
||||
| 148 | Yellow3 | `#afd700` | rgb(175,215,0) | hsl(1,100%,42%) |
|
||||
| 149 | DarkOliveGreen3 | `#afd75f` | rgb(175,215,95) | hsl(80,60%,60%) |
|
||||
| 150 | DarkSeaGreen3 | `#afd787` | rgb(175,215,135) | hsl(90,50%,68%) |
|
||||
| 151 | DarkSeaGreen2 | `#afd7af` | rgb(175,215,175) | hsl(120,33%,76%) |
|
||||
| 152 | LightCyan3 | `#afd7d7` | rgb(175,215,215) | hsl(180,33%,76%) |
|
||||
| 153 | LightSkyBlue1 | `#afd7ff` | rgb(175,215,255) | hsl(210,100%,84%) |
|
||||
| 154 | GreenYellow | `#afff00` | rgb(175,255,0) | hsl(8,100%,50%) |
|
||||
| 155 | DarkOliveGreen2 | `#afff5f` | rgb(175,255,95) | hsl(90,100%,68%) |
|
||||
| 156 | PaleGreen1 | `#afff87` | rgb(175,255,135) | hsl(100,100%,76%) |
|
||||
| 157 | DarkSeaGreen2 | `#afffaf` | rgb(175,255,175) | hsl(120,100%,84%) |
|
||||
| 158 | DarkSeaGreen1 | `#afffd7` | rgb(175,255,215) | hsl(150,100%,84%) |
|
||||
| 159 | PaleTurquoise1 | `#afffff` | rgb(175,255,255) | hsl(180,100%,84%) |
|
||||
| 160 | Red3 | `#d70000` | rgb(215,0,0) | hsl(0,100%,42%) |
|
||||
| 161 | DeepPink3 | `#d7005f` | rgb(215,0,95) | hsl(33,100%,42%) |
|
||||
| 162 | DeepPink3 | `#d70087` | rgb(215,0,135) | hsl(22,100%,42%) |
|
||||
| 163 | Magenta3 | `#d700af` | rgb(215,0,175) | hsl(11,100%,42%) |
|
||||
| 164 | Magenta3 | `#d700d7` | rgb(215,0,215) | hsl(300,100%,42%) |
|
||||
| 165 | Magenta2 | `#d700ff` | rgb(215,0,255) | hsl(90,100%,50%) |
|
||||
| 166 | DarkOrange3 | `#d75f00` | rgb(215,95,0) | hsl(6,100%,42%) |
|
||||
| 167 | IndianRed | `#d75f5f` | rgb(215,95,95) | hsl(0,60%,60%) |
|
||||
| 168 | HotPink3 | `#d75f87` | rgb(215,95,135) | hsl(340,60%,60%) |
|
||||
| 169 | HotPink2 | `#d75faf` | rgb(215,95,175) | hsl(320,60%,60%) |
|
||||
| 170 | Orchid | `#d75fd7` | rgb(215,95,215) | hsl(300,60%,60%) |
|
||||
| 171 | MediumOrchid1 | `#d75fff` | rgb(215,95,255) | hsl(285,100%,68%) |
|
||||
| 172 | Orange3 | `#d78700` | rgb(215,135,0) | hsl(7,100%,42%) |
|
||||
| 173 | LightSalmon3 | `#d7875f` | rgb(215,135,95) | hsl(20,60%,60%) |
|
||||
| 174 | LightPink3 | `#d78787` | rgb(215,135,135) | hsl(0,50%,68%) |
|
||||
| 175 | Pink3 | `#d787af` | rgb(215,135,175) | hsl(330,50%,68%) |
|
||||
| 176 | Plum3 | `#d787d7` | rgb(215,135,215) | hsl(300,50%,68%) |
|
||||
| 177 | Violet | `#d787ff` | rgb(215,135,255) | hsl(280,100%,76%) |
|
||||
| 178 | Gold3 | `#d7af00` | rgb(215,175,0) | hsl(8,100%,42%) |
|
||||
| 179 | LightGoldenrod3 | `#d7af5f` | rgb(215,175,95) | hsl(40,60%,60%) |
|
||||
| 180 | Tan | `#d7af87` | rgb(215,175,135) | hsl(30,50%,68%) |
|
||||
| 181 | MistyRose3 | `#d7afaf` | rgb(215,175,175) | hsl(0,33%,76%) |
|
||||
| 182 | Thistle3 | `#d7afd7` | rgb(215,175,215) | hsl(300,33%,76%) |
|
||||
| 183 | Plum2 | `#d7afff` | rgb(215,175,255) | hsl(270,100%,84%) |
|
||||
| 184 | Yellow3 | `#d7d700` | rgb(215,215,0) | hsl(60,100%,42%) |
|
||||
| 185 | Khaki3 | `#d7d75f` | rgb(215,215,95) | hsl(60,60%,60%) |
|
||||
| 186 | LightGoldenrod2 | `#d7d787` | rgb(215,215,135) | hsl(60,50%,68%) |
|
||||
| 187 | LightYellow3 | `#d7d7af` | rgb(215,215,175) | hsl(60,33%,76%) |
|
||||
| 188 | Grey84 | `#d7d7d7` | rgb(215,215,215) | hsl(0,0%,84%) |
|
||||
| 189 | LightSteelBlue1 | `#d7d7ff` | rgb(215,215,255) | hsl(240,100%,92%) |
|
||||
| 190 | Yellow2 | `#d7ff00` | rgb(215,255,0) | hsl(9,100%,50%) |
|
||||
| 191 | DarkOliveGreen1 | `#d7ff5f` | rgb(215,255,95) | hsl(75,100%,68%) |
|
||||
| 192 | DarkOliveGreen1 | `#d7ff87` | rgb(215,255,135) | hsl(80,100%,76%) |
|
||||
| 193 | DarkSeaGreen1 | `#d7ffaf` | rgb(215,255,175) | hsl(90,100%,84%) |
|
||||
| 194 | Honeydew2 | `#d7ffd7` | rgb(215,255,215) | hsl(120,100%,92%) |
|
||||
| 195 | LightCyan1 | `#d7ffff` | rgb(215,255,255) | hsl(180,100%,92%) |
|
||||
| 196 | Red1 | `#ff0000` | rgb(255,0,0) | hsl(0,100%,50%) |
|
||||
| 197 | DeepPink2 | `#ff005f` | rgb(255,0,95) | hsl(37,100%,50%) |
|
||||
| 198 | DeepPink1 | `#ff0087` | rgb(255,0,135) | hsl(28,100%,50%) |
|
||||
| 199 | DeepPink1 | `#ff00af` | rgb(255,0,175) | hsl(18,100%,50%) |
|
||||
| 200 | Magenta2 | `#ff00d7` | rgb(255,0,215) | hsl(09,100%,50%) |
|
||||
| 201 | Magenta1 | `#ff00ff` | rgb(255,0,255) | hsl(300,100%,50%) |
|
||||
| 202 | OrangeRed1 | `#ff5f00` | rgb(255,95,0) | hsl(2,100%,50%) |
|
||||
| 203 | IndianRed1 | `#ff5f5f` | rgb(255,95,95) | hsl(0,100%,68%) |
|
||||
| 204 | IndianRed1 | `#ff5f87` | rgb(255,95,135) | hsl(345,100%,68%) |
|
||||
| 205 | HotPink | `#ff5faf` | rgb(255,95,175) | hsl(330,100%,68%) |
|
||||
| 206 | HotPink | `#ff5fd7` | rgb(255,95,215) | hsl(315,100%,68%) |
|
||||
| 207 | MediumOrchid1 | `#ff5fff` | rgb(255,95,255) | hsl(300,100%,68%) |
|
||||
| 208 | DarkOrange | `#ff8700` | rgb(255,135,0) | hsl(1,100%,50%) |
|
||||
| 209 | Salmon1 | `#ff875f` | rgb(255,135,95) | hsl(15,100%,68%) |
|
||||
| 210 | LightCoral | `#ff8787` | rgb(255,135,135) | hsl(0,100%,76%) |
|
||||
| 211 | PaleVioletRed1 | `#ff87af` | rgb(255,135,175) | hsl(340,100%,76%) |
|
||||
| 212 | Orchid2 | `#ff87d7` | rgb(255,135,215) | hsl(320,100%,76%) |
|
||||
| 213 | Orchid1 | `#ff87ff` | rgb(255,135,255) | hsl(300,100%,76%) |
|
||||
| 214 | Orange1 | `#ffaf00` | rgb(255,175,0) | hsl(1,100%,50%) |
|
||||
| 215 | SandyBrown | `#ffaf5f` | rgb(255,175,95) | hsl(30,100%,68%) |
|
||||
| 216 | LightSalmon1 | `#ffaf87` | rgb(255,175,135) | hsl(20,100%,76%) |
|
||||
| 217 | LightPink1 | `#ffafaf` | rgb(255,175,175) | hsl(0,100%,84%) |
|
||||
| 218 | Pink1 | `#ffafd7` | rgb(255,175,215) | hsl(330,100%,84%) |
|
||||
| 219 | Plum1 | `#ffafff` | rgb(255,175,255) | hsl(300,100%,84%) |
|
||||
| 220 | Gold1 | `#ffd700` | rgb(255,215,0) | hsl(0,100%,50%) |
|
||||
| 221 | LightGoldenrod2 | `#ffd75f` | rgb(255,215,95) | hsl(45,100%,68%) |
|
||||
| 222 | LightGoldenrod2 | `#ffd787` | rgb(255,215,135) | hsl(40,100%,76%) |
|
||||
| 223 | NavajoWhite1 | `#ffd7af` | rgb(255,215,175) | hsl(30,100%,84%) |
|
||||
| 224 | MistyRose1 | `#ffd7d7` | rgb(255,215,215) | hsl(0,100%,92%) |
|
||||
| 225 | Thistle1 | `#ffd7ff` | rgb(255,215,255) | hsl(300,100%,92%) |
|
||||
| 226 | Yellow1 | `#ffff00` | rgb(255,255,0) | hsl(60,100%,50%) |
|
||||
| 227 | LightGoldenrod1 | `#ffff5f` | rgb(255,255,95) | hsl(60,100%,68%) |
|
||||
| 228 | Khaki1 | `#ffff87` | rgb(255,255,135) | hsl(60,100%,76%) |
|
||||
| 229 | Wheat1 | `#ffffaf` | rgb(255,255,175) | hsl(60,100%,84%) |
|
||||
| 230 | Cornsilk1 | `#ffffd7` | rgb(255,255,215) | hsl(60,100%,92%) |
|
||||
| 231 | Grey100 | `#ffffff` | rgb(255,255,255) | hsl(0,0%,100%) |
|
||||
| 232 | Grey3 | `#080808` | rgb(8,8,8) | hsl(0,0%,3%) |
|
||||
| 233 | Grey7 | `#121212` | rgb(18,18,18) | hsl(0,0%,7%) |
|
||||
| 234 | Grey11 | `#1c1c1c` | rgb(28,28,28) | hsl(0,0%,10%) |
|
||||
| 235 | Grey15 | `#262626` | rgb(38,38,38) | hsl(0,0%,14%) |
|
||||
| 236 | Grey19 | `#303030` | rgb(48,48,48) | hsl(0,0%,18%) |
|
||||
| 237 | Grey23 | `#3a3a3a` | rgb(58,58,58) | hsl(0,0%,22%) |
|
||||
| 238 | Grey27 | `#444444` | rgb(68,68,68) | hsl(0,0%,26%) |
|
||||
| 239 | Grey30 | `#4e4e4e` | rgb(78,78,78) | hsl(0,0%,30%) |
|
||||
| 240 | Grey35 | `#585858` | rgb(88,88,88) | hsl(0,0%,34%) |
|
||||
| 241 | Grey39 | `#626262` | rgb(98,98,98) | hsl(0,0%,37%) |
|
||||
| 242 | Grey42 | `#6c6c6c` | rgb(108,108,108) | hsl(0,0%,40%) |
|
||||
| 243 | Grey46 | `#767676` | rgb(118,118,118) | hsl(0,0%,46%) |
|
||||
| 244 | Grey50 | `#808080` | rgb(128,128,128) | hsl(0,0%,50%) |
|
||||
| 245 | Grey54 | `#8a8a8a` | rgb(138,138,138) | hsl(0,0%,54%) |
|
||||
| 246 | Grey58 | `#949494` | rgb(148,148,148) | hsl(0,0%,58%) |
|
||||
| 247 | Grey62 | `#9e9e9e` | rgb(158,158,158) | hsl(0,0%,61%) |
|
||||
| 248 | Grey66 | `#a8a8a8` | rgb(168,168,168) | hsl(0,0%,65%) |
|
||||
| 249 | Grey70 | `#b2b2b2` | rgb(178,178,178) | hsl(0,0%,69%) |
|
||||
| 250 | Grey74 | `#bcbcbc` | rgb(188,188,188) | hsl(0,0%,73%) |
|
||||
| 251 | Grey78 | `#c6c6c6` | rgb(198,198,198) | hsl(0,0%,77%) |
|
||||
| 252 | Grey82 | `#d0d0d0` | rgb(208,208,208) | hsl(0,0%,81%) |
|
||||
| 253 | Grey85 | `#dadada` | rgb(218,218,218) | hsl(0,0%,85%) |
|
||||
| 254 | Grey89 | `#e4e4e4` | rgb(228,228,228) | hsl(0,0%,89%) |
|
||||
| 255 | Grey93 | `#eeeeee` | rgb(238,238,238) | hsl(0,0%,93%) |
|
||||
@@ -0,0 +1,26 @@
|
||||
---
|
||||
tags:
|
||||
- Cheetsheet
|
||||
---
|
||||
|
||||
|
||||
| Command | Description |
|
||||
| ----------------------------------------------------------- | ----------------------------------------------------------- |
|
||||
| `arp` | View the ARP table |
|
||||
| `arp -a` | View the ARP table |
|
||||
| `arp -n` | View the ARP table (don't resolve names) |
|
||||
| `arp -d <ip>` | Delete an entry from the ARP table |
|
||||
| `arp -s <ip> <mac_address>` | Add an entry to the ARP table |
|
||||
| `arp -i <interface> -s <ip> <mac_address>` | Add an entry to the ARP table for a specific interface |
|
||||
| `arp -i <interface> -d <ip>` | Delete an entry from the ARP table for a specific interface |
|
||||
| `arp -i <interface> -n` | View the ARP table for a specific interface |
|
||||
| `arp -i <interface> -a` | View the ARP table for a specific interface |
|
||||
| `ip neigh show` | View the ARP table |
|
||||
| `ip neigh show <ip>` | View the ARP table for a specific IP address |
|
||||
| `ip neigh add <ip> lladdr <mac_address> dev <interface>` | Add an entry to the ARP table |
|
||||
| `ip neigh change <ip> lladdr <mac_address> dev <interface>` | Change an entry in the ARP table |
|
||||
| `ip neigh del <ip> dev <interface>` | Delete an entry from the ARP table |
|
||||
| `ip neigh flush dev <interface>` | Flush the ARP table for a specific interface |
|
||||
| `ip neigh flush all` | Flush the ARP table |
|
||||
| `ip -s neigh show` | Show ARP statistics |
|
||||
| `ip -s neigh flush all` | Flush the ARP cache |
|
||||
@@ -0,0 +1,32 @@
|
||||
---
|
||||
tags:
|
||||
- Cheetsheet
|
||||
---
|
||||
|
||||
|
||||
| Command | Description |
|
||||
| --- | --- |
|
||||
| `awk '/pattern/ {print $1}'` | standard Unix shells |
|
||||
| `awk '/pattern/ {print "$1"}'` | compiled with DJGPP, Cygwin |
|
||||
| `awk "/pattern/ {print \"$1\"}"` | GnuWin32, UnxUtils, Mingw |
|
||||
| `awk '1;{print ""}'` | double space a file |
|
||||
| `awk 'BEGIN{ORS="\n\n"};1'` | double space a file |
|
||||
| `awk 'NF{print $0 "\n"}'` | double space a file which already has blank lines |
|
||||
| `awk '1;{print "\n"}'` | triple space a file |
|
||||
| `awk '{print FNR "\t" $0}' files*` | precede each line by its line number |
|
||||
| `awk '{print NR "\t" $0}' files*` | precede each line by its line number for all files together |
|
||||
| `awk '{printf("%5d : %s\n", NR,$0)}'` | number each line of a file |
|
||||
| `awk 'NF{$0=++a " :" $0};1'` | number each line of a file, but only print numbers if line is not blank |
|
||||
| `awk 'END{print NR}'` | count lines (emulates "wc -l") |
|
||||
| `awk '{s=0; for (i=1; i<=NF; i++) s=s+$i; print s}'` | print the sums of the fields of every line |
|
||||
| `awk '{for (i=1; i<=NF; i++) s=s+$i}; END{print s}'` | add all fields in all lines and print the sum |
|
||||
| `awk '{for (i=1; i<=NF; i++) if ($i < 0) $i = -$i; print }'` | print every line after replacing each field with its absolute value |
|
||||
| `awk '{for (i=1; i<=NF; i++) $i = ($i < 0) ? -$i : $i; print }'` | print every line after replacing each field with its absolute value |
|
||||
| `awk '{ total = total + NF }; END {print total}' file` | print the total number of fields ("words") in all lines |
|
||||
| `awk '/Beth/{n++}; END {print n+0}' file` | print the total number of lines that contain "Beth" |
|
||||
| `awk '$1 > max {max=$1; maxline=$0}; END{ print max, maxline}'` | print the largest first field and the line that contains it |
|
||||
| `awk '{ print NF ":" $0 }'` | print the number of fields in each line, followed by the line |
|
||||
| `awk '{ print $NF }'` | print the last field of each line |
|
||||
| `awk '{ field = $NF }; END{ print field }'` | print the last field of the last line |
|
||||
| `awk 'NF > 4'` | print every line with more than 4 fields |
|
||||
| `awk '$NF > 4'` | print every line where the value of the last field is > 4 |
|
||||
@@ -0,0 +1,20 @@
|
||||
---
|
||||
tags:
|
||||
- Cheetsheet
|
||||
---
|
||||
|
||||
| Command | Description |
|
||||
| --- | --- |
|
||||
| `certutil -store MY` | List personal certificates |
|
||||
| `certutil -store ROOT` | List root certificates |
|
||||
| `certutil -store CA` | List intermediate certificates |
|
||||
| `certutil -addstore -f "ROOT" new-root-certificate.crt` | Add a root certificate |
|
||||
| `certutil -delstore "ROOT" serial-number-hex` | Remove a root certificate |
|
||||
| `certutil -addstore -f "CA" new-intermediate-certificate.crt` | Add an intermediate certificate |
|
||||
| `certutil -delstore "CA" serial-number-hex` | Remove an intermediate certificate |
|
||||
| `certutil -addstore -f "MY" new-personal-certificate.pfx` | Add a personal certificate |
|
||||
| `certutil -delstore "MY" serial-number-hex` | Remove a personal certificate |
|
||||
| `certutil -dump certificate.crt` | Display certificate information |
|
||||
| `certutil -encode certificate.crt encoded-certificate.txt` | Encode a certificate |
|
||||
| `certutil -decode encoded-certificate.txt decoded-certificate.crt` | Decode a certificate |
|
||||
| `certutil -hashfile file.txt SHA256` | Calculate the SHA256 hash of a file |
|
||||
@@ -0,0 +1,20 @@
|
||||
---
|
||||
tags:
|
||||
- Cheetsheet
|
||||
---
|
||||
|
||||
Package Management
|
||||
------------------
|
||||
|
||||
| Command | Description |
|
||||
| --- | --- |
|
||||
| `choco install <package>` | Install a package |
|
||||
| `choco uninstall <package>` | Uninstall a package |
|
||||
| `choco upgrade <package>` | Upgrade a package |
|
||||
| `choco list -lo` | List installed packages |
|
||||
| `choco search <string>` | Search for a package |
|
||||
| `choco outdated` | List outdated packages |
|
||||
| `choco upgrade all` | Upgrade all packages |
|
||||
| `choco pin <package>` | Pin a package to prevent upgrades |
|
||||
| `choco outdated --local-only` | List outdated packages installed locally |
|
||||
| `choco upgrade all --local-only` | Upgrade all packages installed locally |
|
||||
@@ -0,0 +1,45 @@
|
||||
---
|
||||
tags:
|
||||
- Cheetsheet
|
||||
---
|
||||
|
||||
Instances
|
||||
---------
|
||||
|
||||
| Command | Description |
|
||||
| --- | --- |
|
||||
| `civo instance ls` | List instances |
|
||||
| `civo instance show <instance>` | Show instance details |
|
||||
| `civo instance create <hostname>` | Create a new instance |
|
||||
| `civo instance firewall <hostname> <firewall>` | Set firewall for instance |
|
||||
| `civo instance password` | Show instance's default password |
|
||||
| `civo instance public-ip` | Enable/disable controls if instance should have a public IP |
|
||||
| `civo instance reboot <hostname>` | Hard reboot an instance |
|
||||
| `civo instance remove <hostname>` | Remove/delete instance |
|
||||
| `civo instance size` | List instances size |
|
||||
| `civo instance soft-reboot` | Soft reboot an instance |
|
||||
| `civo instance start` | Start an instance |
|
||||
| `civo instance stop` | Stop an instance |
|
||||
| `civo instance tag` | Change the instance's tags |
|
||||
| `civo instance update` | Change the instance |
|
||||
| `civo instance upgrade` | Upgrade an instance |
|
||||
|
||||
### Instance Creation Flags
|
||||
|
||||
| Flag | Description |
|
||||
| --- | --- |
|
||||
| `--size`, `-i` | Size of the instance |
|
||||
| `--diskimage`, `-t` | Disk image to use |
|
||||
| `--public-ip`, `-p` | Enable a public IP |
|
||||
| `--firewall`, `-l` | Firewall to apply |
|
||||
| `--region` | Region to create the instance in |
|
||||
| `--ssh-key`, `-k` | SSH key to add to the instance |
|
||||
| `--wait`, `-w` | Wait for the instance to be created |
|
||||
|
||||
### Query Disk Images Sizes
|
||||
|
||||
| Command | Description |
|
||||
| ------------------------------ | ------------------------ |
|
||||
| `civo diskimage ls` | List disk images |
|
||||
| `civo diskimage find <string>` | Find disk images by name |
|
||||
| `civo size ls` | List sizes |
|
||||
@@ -0,0 +1,40 @@
|
||||
---
|
||||
tags:
|
||||
- Cheetsheet
|
||||
---
|
||||
|
||||
|
||||
### Commonly used DNS Records
|
||||
|
||||
| Type | Description |
|
||||
| --- | --- |
|
||||
| **A** | The record that holds the IP address of a domain. |
|
||||
| **AAAA** | The record that contains the IPv6 address for a domain (as opposed to A records, which list the IPv4 address). |
|
||||
| **CNAME** | Forwards one domain or subdomain to another domain, does NOT provide an IP address. |
|
||||
| **MX** | Directs mail to an email server. |
|
||||
| **TXT** | Lets an admin store text notes in the record. These records are often used for email security. |
|
||||
| **NS** | Stores the name server for a DNS entry. |
|
||||
| **SOA** | Stores admin information about a domain. |
|
||||
| **SRV** | Specifies a port for specific services. |
|
||||
| **PTR** | Provides a domain name in reverse-lookups. |
|
||||
|
||||
### Less commonly used DNS Records
|
||||
|
||||
| Type | Description |
|
||||
| --- | --- |
|
||||
| **APL** | The ‘address prefix list’ is an experiment record that specifies lists of address ranges. |
|
||||
| **AFSDB** | This record is used for clients of the Andrew File System (AFS) developed by Carnegie Melon. The AFSDB record functions to find other AFS cells. |
|
||||
| **CAA** | This is the ‘certification authority authorization’ record, it allows domain owners state which certificate authorities can issue certificates for that domain. If no CAA record exists, then anyone can issue a certificate for the domain. These records are also inherited by subdomains. |
|
||||
| **DNSKEY** | The ‘DNS Key Record’ contains a public key used to verify Domain Name System Security Extension (DNSSEC) signatures |
|
||||
| **CDNSKEY** | This is a child copy of the DNSKEY record, meant to be transferred to a parent. |
|
||||
| **CERT** | The ‘certificate record’ stores public key certificates. |
|
||||
| **DCHID** | The ‘DHCP Identifier’ stores info for the Dynamic Host Configuration Protocol (DHCP), a standardized network protocol used on IP networks. |
|
||||
| **DNAME** | The ‘delegation name’ record creates a domain alias, just like CNAME, but this alias will redirect all subdomains as well. For instance if the owner of ‘example.com’ bought the domain ‘website.net’ and gave it a DNAME record that points to ‘example.com’, then that pointer would also extend to ‘blog.website.net’ and any other subdomains. |
|
||||
| **HIP** | This record uses ‘Host identity protocol’, a way to separate the roles of an IP address; this record is used most often in mobile computing. |
|
||||
| **IPSECKEY** | The ‘IPSEC key’ record works with the Internet Protocol Security (IPSEC), an end-to-end security protocol framework and part of the Internet Protocol Suite (TCP/IP). |
|
||||
| **LOC** | The ‘location’ record contains geographical information for a domain in the form of longitude and latitude coordinates. |
|
||||
| **NAPTR** | The ‘name authority pointer’ record can be combined with an SRV record to dynamically create URI’s to point to based on a regular expression. |
|
||||
| **NSEC** | The ‘next secure record’ is part of DNSSEC, and it’s used to prove that a requested DNS resource record does not exist. |
|
||||
| **RRSIG** | The ‘resource record signature’ is a record to store digital signatures used to authenticate records in accordance with DNSSEC. |
|
||||
| **RP** | This is the ‘responsible person’ record and it stores the email address of the person responsible for the domain. |
|
||||
| **SSHFP** | This record stores the ‘SSH public key fingerprints’; SSH stands for Secure Shell and it’s a cryptographic networking protocol for secure communication over an unsecure network. |
|
||||
@@ -0,0 +1,104 @@
|
||||
---
|
||||
tags:
|
||||
- Cheetsheet
|
||||
---
|
||||
|
||||
Running Containers
|
||||
------------------
|
||||
|
||||
| COMMAND | DESCRIPTION |
|
||||
| ---------------------------- | ------------------------------------------------- |
|
||||
| `docker run <image>` | Start a new container from an image |
|
||||
| `docker run -it <image>` | Start a new container in interactive mode |
|
||||
| `docker run --rm <image>` | Start a new container and remove it when it exits |
|
||||
| `docker create <image>` | Create a new container |
|
||||
| `docker start <container>` | Start a container |
|
||||
| `docker stop <container>` | Graceful stop a container |
|
||||
| `docker kill <container>` | Kill (SIGKILL) a container |
|
||||
| `docker restart <container>` | Graceful stop and restart a container |
|
||||
| `docker pause <container>` | Suspend a container |
|
||||
| `docker unpause <container>` | Resume a container |
|
||||
| `docker rm <container>` | Destroy a container |
|
||||
|
||||
Container Bulk Management
|
||||
-------------------------
|
||||
|
||||
| COMMAND | DESCRIPTION |
|
||||
| --- | --- |
|
||||
| `docker stop $(docker ps -q)` | To stop all the running containers |
|
||||
| `docker stop $(docker ps -a -q)` | To stop all the stopped and running containers |
|
||||
| `docker kill $(docker ps -q)` | To kill all the running containers |
|
||||
| `docker kill $(docker ps -a -q)` | To kill all the stopped and running containers |
|
||||
| `docker restart $(docker ps -q)` | To restart all running containers |
|
||||
| `docker restart $(docker ps -a -q)` | To restart all the stopped and running containers |
|
||||
| `docker rm $(docker ps -q)` | To destroy all running containers |
|
||||
| `docker rm $(docker ps -a -q)` | To destroy all the stopped and running containers |
|
||||
| `docker pause $(docker ps -q)` | To pause all running containers |
|
||||
| `docker pause $(docker ps -a -q)` | To pause all the stopped and running containers |
|
||||
| `docker start $(docker ps -q)` | To start all running containers |
|
||||
| `docker start $(docker ps -a -q)` | To start all the stopped and running containers |
|
||||
| `docker rm -vf $(docker ps -a -q)` | To delete all containers including its volumes use |
|
||||
| `docker rmi -f $(docker images -a -q)` | To delete all the images |
|
||||
| `docker system prune` | To delete all dangling and unused images, containers, cache and volumes |
|
||||
| `docker system prune -a` | To delete all used and unused images |
|
||||
| `docker system prune --volumes` | To delete all docker volumes |
|
||||
|
||||
Inspect Containers
|
||||
------------------
|
||||
|
||||
| COMMAND | DESCRIPTION |
|
||||
| --- | --- |
|
||||
| `docker ps` | List running containers |
|
||||
| `docker ps --all` | List all containers, including stopped |
|
||||
| `docker logs <container>` | Show a container output |
|
||||
| `docker logs -f <container>` | Follow a container output |
|
||||
| `docker top <container>` | List the processes running in a container |
|
||||
| `docker diff` | Show the differences with the image (modified files) |
|
||||
| `docker inspect` | Show information of a container (json formatted) |
|
||||
|
||||
Executing Commands
|
||||
------------------
|
||||
|
||||
| COMMAND | DESCRIPTION |
|
||||
| --- | --- |
|
||||
| `docker attach <container>` | Attach to a container |
|
||||
| `docker cp <container>:<container-path> <host-path>` | Copy files from the container |
|
||||
| `docker cp <host-path> <container>:<container-path>` | Copy files into the container |
|
||||
| `docker export <container>` | Export the content of the container (tar archive) |
|
||||
| `docker exec <container>` | Run a command inside a container |
|
||||
| `docker exec -it <container> /bin/bash` | Open an interactive shell inside a container (there is no bash in some images, use /bin/sh) |
|
||||
| `docker wait <container>` | Wait until the container terminates and return the exit code |
|
||||
|
||||
Images
|
||||
------
|
||||
|
||||
| COMMAND | DESCRIPTION |
|
||||
| --- | --- |
|
||||
| `docker image ls` | List all local images |
|
||||
| `docker history <image>` | Show the image history |
|
||||
| `docker inspect <image>` | Show information (json formatted) |
|
||||
| `docker tag <image> <tag>` | Tag an image |
|
||||
| `docker commit <container> <image>` | Create an image (from a container) |
|
||||
| `docker import <url>` | Create an image (from a tarball) |
|
||||
| `docker rmi <image>` | Delete images |
|
||||
| `docker pull <user>/<repository>:<tag>` | Pull an image from a registry |
|
||||
| `docker push <user>/<repository>:<tag>` | Push and image to a registry |
|
||||
| `docker search <test>` | Search an image on the official registry |
|
||||
| `docker login` | Login to a registry |
|
||||
| `docker logout` | Logout from a registry |
|
||||
| `docker save <user>/<repository>:<tag>` | Export an image/repo as a tarball |
|
||||
| `docker load` | Load images from a tarball |
|
||||
|
||||
Volumes
|
||||
-------
|
||||
|
||||
| COMMAND | DESCRIPTION |
|
||||
| --- | --- |
|
||||
| `docker volume ls` | List all vol1umes |
|
||||
| `docker volume create <volume>` | Create a volume |
|
||||
| `docker volume inspect <volume>` | Show information (json formatted) |
|
||||
| `docker volume rm <volume>` | Destroy a volume |
|
||||
| `docker volume ls --filter="dangling=true"` | List all dangling volumes (not referenced by any container) |
|
||||
| `docker volume prune` | Delete all volumes (not referenced by any container) |
|
||||
| `docker run --rm --volumes-from <container> -v $(pwd):/backup busybox tar cvfz /backup/backup.tar.gz <container-path>` | Backup a container |
|
||||
| `docker run --rm --volumes-from <container> -v $(pwd):/backup busybox sh -c "cd <container-path> && tar xvfz /backup/backup.tar.gz --strip 1"` | Restore a container from backup |
|
||||
@@ -0,0 +1,29 @@
|
||||
---
|
||||
tags:
|
||||
- Cheetsheet
|
||||
---
|
||||
|
||||
-------------------------------
|
||||
|
||||
> Please note that the presence and specific **EHLO response codes** will depend on the **SMTP server software**, its version, and its configuration. The above table includes some commonly encountered **EHLO response codes**, but it may not cover every possible code or extension.
|
||||
|
||||
| EHLO Response Code | Description |
|
||||
| --- | --- |
|
||||
| 250 | Requested mail action okay, completed |
|
||||
| 250-PIPELINING | Server supports command pipelining |
|
||||
| 250-SIZE `<value>` | Server specifies maximum message size |
|
||||
| 250-ETRN | Server supports the ETRN extension |
|
||||
| 250-ENHANCEDSTATUSCODES | Server uses enhanced status codes |
|
||||
| 250-8BITMIME | Server supports the 8BITMIME extension |
|
||||
| 250-DSN | Server supports delivery status notifications (DSN) |
|
||||
| 250-STARTTLS | Server supports TLS encryption |
|
||||
| 250-AUTH `<authentication_types>` | Server specifies supported authentication types |
|
||||
| 250-DELIVERBY | Server supports the DELIVERBY extension |
|
||||
| 250-RSET | Server supports the RSET command |
|
||||
| 250-HELP | Server provides help information |
|
||||
| 250-BINARYMIME | Server supports binary MIME (Multipurpose Internet Mail Extensions) |
|
||||
| 250-CHUNKING | Server supports chunking for message transmission |
|
||||
| 250-EXPN | Server supports the EXPN command |
|
||||
| 250-VRFY | Server supports the VRFY command |
|
||||
| 250-X-EXPS `<extension>` | Server supports an additional extension |
|
||||
| 250 X-LINK2STATE | Server provides link-related state information |
|
||||
@@ -0,0 +1,41 @@
|
||||
---
|
||||
tags:
|
||||
- Cheetsheet
|
||||
---
|
||||
|
||||
|
||||
Displaying Information
|
||||
----------------------
|
||||
|
||||
| Command | Description |
|
||||
| --- | --- |
|
||||
| `ethtool <interface>` | Display information about a specific network interface |
|
||||
| `ethtool -i <interface>` | Display driver information |
|
||||
| `ethtool -a <interface>` | Display all settings |
|
||||
| `ethtool -k <interface>` | Display offload settings |
|
||||
| `ethtool -c <interface>` | Display coalescing settings |
|
||||
| `ethtool -g <interface>` | Display ring buffer settings |
|
||||
| `ethtool -l <interface>` | Display large receive offload settings |
|
||||
| `ethtool -S <interface>` | Display statistics |
|
||||
| `ethtool -t <interface>` | Test the network interface for offloading capabilities |
|
||||
| `ethtool -T <interface>` | Display time stamping settings |
|
||||
| `ethtool -x <interface>` | Display channel settings |
|
||||
| `ethtool -P <interface>` | Display permanent MAC address |
|
||||
| `ethtool -N <interface>` | Display offload settings |
|
||||
| `ethtool -u <interface>` | Display bus information |
|
||||
| `ethtool -d <interface>` | Display register dump |
|
||||
| `ethtool -g <interface>` | Display ring buffer settings |
|
||||
|
||||
Setting Parameters
|
||||
------------------
|
||||
|
||||
| Command | Description |
|
||||
| --- | --- |
|
||||
| `ethtool -G <interface>` | Set ring buffer settings |
|
||||
| `ethtool -L <interface>` | Set large receive offload settings |
|
||||
| `ethtool -A <interface>` | Set pause parameters |
|
||||
| `ethtool -C <interface>` | Set coalescing settings |
|
||||
| `ethtool -K <interface>` | Set offload settings |
|
||||
| `ethtool -N <interface>` | Set offload settings |
|
||||
| `ethtool -p <interface>` | Blink the LED on the network interface |
|
||||
| `ethtool -r <interface>` | Reset the network interface |
|
||||
@@ -0,0 +1,54 @@
|
||||
---
|
||||
tags:
|
||||
- Cheetsheet
|
||||
---
|
||||
|
||||
Repository Management
|
||||
---------------------
|
||||
|
||||
| Command | Description |
|
||||
| --- | --- |
|
||||
| `git init` | Initialize a new Git repository |
|
||||
| `git clone <url>` | Clone a remote repository |
|
||||
| `git status` | Show the working tree status |
|
||||
| `git add <file>` | Add a file to the staging area |
|
||||
| `git commit -m <message>` | Commit changes to the repository |
|
||||
| `git push` | Push changes to the remote repository |
|
||||
| `git pull` | Pull changes from the remote repository |
|
||||
| `git fetch` | Fetch changes from the remote repository |
|
||||
| `git merge <branch>` | Merge a branch into the current branch |
|
||||
| `git branch` | List all branches |
|
||||
| `git branch <branch>` | Create a new branch |
|
||||
| `git checkout <branch>` | Switch to a branch |
|
||||
| `git checkout -b <branch>` | Create and switch to a new branch |
|
||||
| `git branch -d <branch>` | Delete a branch |
|
||||
| `git log` | Show commit logs |
|
||||
| `git diff` | Show changes between commits |
|
||||
| `git blame <file>` | Show who changed each line in a file |
|
||||
| `git reflog` | Show a log of changes to HEAD |
|
||||
| `git reset --hard <commit>` | Reset the repository to a commit |
|
||||
| `git revert <commit>` | Revert a commit |
|
||||
| `git stash` | Stash changes in the working directory |
|
||||
| `git stash pop` | Apply stashed changes to the working directory |
|
||||
| `git tag <tag>` | Create a tag for a commit |
|
||||
|
||||
Configuration
|
||||
-------------
|
||||
|
||||
| Command | Description |
|
||||
| --- | --- |
|
||||
| `git config --global user.name <user>` | Set the user name for Git |
|
||||
| `git config --global user.email <email>` | Set the user email for Git |
|
||||
| `git config --global core.editor <editor>` | Set the default text editor for Git |
|
||||
| `git config --global color.ui auto` | Enable colored output for Git |
|
||||
|
||||
Remote Repositories
|
||||
-------------------
|
||||
|
||||
| Command | Description |
|
||||
| --- | --- |
|
||||
| `git remote add <repository> <url>` | Add a remote repository |
|
||||
| `git remote -v` | List remote repositories |
|
||||
| `git remote show <repository>` | Show information about a remote repository |
|
||||
| `git remote rename <repository> <new_repository>` | Rename a remote repository |
|
||||
| `git remote remove <repository>` | Remove a remote repository |
|
||||
@@ -0,0 +1,86 @@
|
||||
---
|
||||
tags:
|
||||
- Cheetsheet
|
||||
---
|
||||
|
||||
|
||||
Categories
|
||||
----------
|
||||
|
||||
| Code | Description |
|
||||
| --- | --- |
|
||||
| **1XX** | Informational Requests |
|
||||
| **2XX** | Successful Requests |
|
||||
| **3XX** | Redirects |
|
||||
| **4XX** | Client Errors |
|
||||
| **5XX** | Server Errors |
|
||||
|
||||
Complete List
|
||||
-------------
|
||||
|
||||
| Code | Name | Description |
|
||||
| --- | --- | --- |
|
||||
| 100 | Continue | Everything so far is OK and that the client should continue with the request or ignore it if it is already finished. |
|
||||
| 101 | Switching Protocols | The client has asked the server to change protocols and the server has agreed to do so. |
|
||||
| 102 | Processing | The server has received and is processing the request, but that it does not have a final response yet. |
|
||||
| 103 | Early Hints | Used to return some response headers before final HTTP message. |
|
||||
| 200 | OK | Successful request. |
|
||||
| 201 | Created | The server acknowledged the created resource. |
|
||||
| 202 | Accepted | The client's request has been received but the server is still processing it. |
|
||||
| 203 | Non-Authoritative Information | The response that the server sent to the client is not the same as it was when the server sent it. |
|
||||
| 204 | No Content | There is no content to send for this request |
|
||||
| 205 | Reset Content | Tells the user agent to reset the document which sent this request. |
|
||||
| 206 | Partial Content | This response code is used when the range-header is sent from the client to request only part of a resource. |
|
||||
| 207 | Multi-Status | Conveys information about multiple resources, for situations where multiple status codes might be appropriate. |
|
||||
| 208 | Already Reported | The members of a DAV binding have already been enumerated in a preceding part of the multi-status response. |
|
||||
| 226 | IM Used | IM is a specific extension of the HTTP protocol. The extension allows a HTTP server to send diffs (changes) of resources to clients. |
|
||||
| 300 | Multiple Choices | The request has more than one possible response. The user agent should choose one. |
|
||||
| 301 | Moved Permanently | The URL of the requested resource has been changed permanently. The new URL is given in the response. |
|
||||
| 302 | Found | This response code means that the URI of requested resource has been changed temporarily |
|
||||
| 303 | See Other | The server sent this response to direct the client to get the requested resource at another URI with a GET request. |
|
||||
| 304 | Not Modified | It tells the client that the response has not been modified, so the client can continue to use the same cached version of the response. |
|
||||
| 305 | Use Proxy | Defined in a previous version of the HTTP specification to indicate that a requested response must be accessed by a proxy. (discontinued) |
|
||||
| 307 | Temporary Redirect | The server sends this response to direct the client to get the requested resource at another URI with same method that was used in the prior request. |
|
||||
| 308 | Permanent Redirect | This means that the resource is now permanently located at another URI, specified by the Location: HTTP Response header. |
|
||||
| 400 | Bad Request | The server could not understand the request |
|
||||
| 401 | Unauthorized | The client didn't authenticate himself. |
|
||||
| 402 | Payment Required | This response code is reserved for future use. The initial aim for creating this code was using it for digital payment systems, however this status code is used very rarely and no standard convention exists. |
|
||||
| 403 | Forbidden | The client does not have access rights to the content |
|
||||
| 404 | Not Found | The server can not find the requested resource |
|
||||
| 405 | Method Not Allowed | The request method is known by the server but is not supported by the target resource |
|
||||
| 406 | Not Acceptable | The reponse doens't conforms to the creteria given by the client |
|
||||
| 407 | Proxy Authentication Required | This is similar to 401 Unauthorized but authentication is needed to be done by a proxy. |
|
||||
| 408 | Request Timeout | This response is sent on an idle connection by some servers, even without any previous request by the client. |
|
||||
| 409 | Conflict | This response is sent when a request conflicts with the current state of the server. |
|
||||
| 410 | Gone | This response is sent when the requested content has been permanently deleted from server, with no forwarding address. |
|
||||
| 411 | Length Required | Server rejected the request because the Content-Length header field is not defined and the server requires it. |
|
||||
| 412 | Precondition Failed | Access to the target resource has been denied. |
|
||||
| 413 | Payload Too Large | Request entity is larger than limits defined by server. |
|
||||
| 414 | Request-URI Too Long | The URI requested by the client is longer than the server is willing to interpret. |
|
||||
| 415 | Unsupported Media Type | The media format is not supported by the server. |
|
||||
| 416 | Requested Range Not Satisfiable | The range specified by the Range header field in the request cannot be fulfilled. |
|
||||
| 417 | Expectation Failed | the expectation indicated by the Expect request header field cannot be met by the server. |
|
||||
| 418 | I'm a teapot | The server refuses the attempt to brew coffee with a teapot. |
|
||||
| 421 | Misdirected Request | The request was directed at a server that is not able to produce a response. |
|
||||
| 422 | Unprocessable Entity | The request was well-formed but was unable to be followed due to semantic errors. |
|
||||
| 423 | Locked | The resource that is being accessed is locked. |
|
||||
| 424 | Failed Dependency | The request failed due to failure of a previous request. |
|
||||
| 426 | Upgrade Required | The server refuses to perform the request using the current protocol but might be willing to do so after the client upgrades to a different protocol. |
|
||||
| 428 | Precondition Required | his response is intended to prevent the 'lost update' problem, where a client GETs a resource's state, modifies it and PUTs it back to the server, when meanwhile a third party has modified the state on the server, leading to a conflict. |
|
||||
| 429 | Too Many Requests | The user has sent too many requests in a given amount of time |
|
||||
| 431 | Request Header Fields Too Large | The server is can't process the request because its header fields are too large. |
|
||||
| 444 | Connection Closed Without Response | The connection opened, but no data was written. |
|
||||
| 451 | Unavailable For Legal Reasons | The user agent requested a resource that cannot legally be provided (such as a web page censored by a government) |
|
||||
| 499 | Client Closed Request | The client closed the connection, despite the server was processing the request already. |
|
||||
| 500 | Internal Server Error | The server has encountered a situation it does not know how to handle. |
|
||||
| 501 | Not Implemented | The request method is not supported by the server and cannot be handled. |
|
||||
| 502 | Bad Gateway | This error response means that the server, while working as a gateway to get a response needed to handle the request, got an invalid response. |
|
||||
| 503 | Service Unavailable | The server is not ready to handle the request. |
|
||||
| 504 | Gateway Timeout | This error response is given when the server is acting as a gateway and cannot get a response in time. |
|
||||
| 505 | HTTP Version Not Supported | The HTTP version used in the request is not supported by the server. |
|
||||
| 506 | Variant Also Negotiates | the chosen variant resource is configured to engage in transparent content negotiation itself, and is therefore not a proper end point in the negotiation process. |
|
||||
| 507 | Insufficient Storage | The method could not be performed on the resource because the server is unable to store the representation needed to successfully complete the request. |
|
||||
| 508 | Loop Detected | The server detected an infinite loop while processing the request. |
|
||||
| 510 | Not Extended | Further extensions to the request are required for the server to fulfill it. |
|
||||
| 511 | Network Authentication Required | Indicates that the client needs to authenticate to gain network access. |
|
||||
| 599 | Network Connect Timeout Error | The connection timed out due to a overloaded server, a hardware error or a infrastructure error. |
|
||||
@@ -0,0 +1,54 @@
|
||||
---
|
||||
tags:
|
||||
- Cheetsheet
|
||||
---
|
||||
|
||||
Repository Management
|
||||
---------------------
|
||||
|
||||
| Command | Description |
|
||||
| --- | --- |
|
||||
| `helm repo list` | List Helm repositories |
|
||||
| `helm repo update` | Update list of Helm charts from repositories |
|
||||
|
||||
Chart Management
|
||||
----------------
|
||||
|
||||
| Command | Description |
|
||||
| --- | --- |
|
||||
| `helm search` | List all installed charts |
|
||||
| `helm search <chart>` | Search for a chart |
|
||||
| `helm ls` | List all installed Helm charts |
|
||||
| `helm ls --deleted` | List all deleted Helm charts |
|
||||
| `helm ls --all` | List installed and deleted Helm charts |
|
||||
| `helm inspect values <repo>/<chart>` | Inspect the variables in a chart |
|
||||
|
||||
Install/Delete Helm Charts
|
||||
--------------------------
|
||||
|
||||
| Command | Description |
|
||||
| --- | --- |
|
||||
| `helm install --name <name> <repo>/<chart>` | Install a Helm chart |
|
||||
| `helm install --name <name> --values <VALUES.YML> <repo>/<chart>` | Install a Helm chart and override variables |
|
||||
| `helm status <name>` | Show status of Helm chart being installed |
|
||||
| `helm delete --purge <name>` | Delete a Helm chart |
|
||||
|
||||
Upgrading Helm Charts
|
||||
---------------------
|
||||
|
||||
| Command | Description |
|
||||
| --- | --- |
|
||||
| `helm get values <name>` | Return the variables for a release |
|
||||
| `helm upgrade --values <file> <name> <repo>/<chart>` | Upgrade the chart or variables in a release |
|
||||
| `helm history <name>` | List release numbers |
|
||||
| `helm rollback <name> 1` | Rollback to a previous release number |
|
||||
|
||||
Creating Helm Charts
|
||||
--------------------
|
||||
|
||||
| Command | Description |
|
||||
| --- | --- |
|
||||
| `helm create <name>` | Create a blank chart |
|
||||
| `helm lint <name>` | Lint the chart |
|
||||
| `helm package <name>` | Package the chart into foo.tgz |
|
||||
| `helm dependency update` | Install chart dependencies |
|
||||
@@ -0,0 +1,19 @@
|
||||
---
|
||||
tags:
|
||||
- Cheetsheet
|
||||
---
|
||||
|
||||
|
||||
| Command | Description |
|
||||
| --- | --- |
|
||||
| `lspci` | List all PCI devices in the system. |
|
||||
| `lspci -v` | List all PCI devices in the system with verbose output, including vendor and device IDs, subsystem IDs, and more. |
|
||||
| `lspci -vv` | List all PCI devices in the system with very verbose output, including device capabilities, IRQ settings, and ASPM (Active State Power Management) settings. |
|
||||
| `lspci -s <bus_address>` | Display information for a specific PCI device with the specified bus address. |
|
||||
| `lspci -k` | Show kernel driver in use for each device. |
|
||||
| `lspci -n` | Show numeric IDs for vendor and device instead of names. |
|
||||
| `lspci -nn` | Show numeric IDs for vendor, device, subsystem vendor, and subsystem device instead of names. |
|
||||
| `lspci -t` | Display a tree-like diagram of the PCI bus hierarchy. |
|
||||
| `lspci -D` | Show only PCI devices that are not behind a bridge. |
|
||||
| `lspci -H1` | Show device numbers in hexadecimal format instead of decimal. |
|
||||
| `lspci -x` | Show hex dump of the PCI configuration space for each device. |
|
||||
@@ -0,0 +1,217 @@
|
||||
---
|
||||
tags:
|
||||
- Cheetsheet
|
||||
---
|
||||
|
||||
Mac Keyboard Modifier keys
|
||||
--------------------------
|
||||
|
||||
| key | description |
|
||||
| --- | --- |
|
||||
| ⌘ | ⌘ + / Cmd |
|
||||
| ⌃ | Control / Ctrl |
|
||||
| ⌥ | ⌥ + s / Alt |
|
||||
| ⇧ | Shift |
|
||||
| ⇪ | Caps Lock |
|
||||
| Fn | Function key |
|
||||
|
||||
Cut, copy, paste, and other common shortcuts
|
||||
--------------------------------------------
|
||||
|
||||
| keys | description |
|
||||
| --- | --- |
|
||||
| ⌘ + x | Cut the selected item and copy it to the Clipboard |
|
||||
| ⌘ + c | Copy the selected item to the Clipboard. This also works for files in the Finder |
|
||||
| ⌘ + v | Paste the contents of the Clipboard into the current document or app. This also works for files in the Finder |
|
||||
| ⌘ + z | Undo the previous comamnd |
|
||||
| ⇧ + ⌘ + z | Redo, reversing the undo command |
|
||||
| ⌘ + a | Select All items |
|
||||
| ⌘ + f | Find items in a document or open a Find window |
|
||||
| ⌘ + g | Find Again: Find the next occurrence of the item previously found |
|
||||
| ⇧ + ⌘ + G | Find the previous occurrence |
|
||||
| ⌘ + h | Hide the windows of the front app |
|
||||
| ⌥ + ⌘ + h | View the front app but hide all other apps |
|
||||
| ⌘ + m | Minimize the front window to the Dock |
|
||||
| ⌥ + ⌘ + m | Minimize all windows of the front app |
|
||||
| ⌘ + o | Open the selected item, or open a dialog to select a file to open |
|
||||
| ⌘ + p | Print the current document |
|
||||
| ⌘ + s | Save the current document |
|
||||
| ⌘ + t | Open a new tab |
|
||||
| ⌘ + w | Close the front window |
|
||||
| ⌥ + ⌘ + w | Close all windows of the app |
|
||||
| ⌥ + ⌘ + Esc | Force quit an app |
|
||||
| ⌘ + Space | Show or hide the Spotlight search field |
|
||||
| ⌘ + ⌥ + Space | Perform a Spotlight search from a Finder window |
|
||||
| ⌃ + ⌘ + Space | Show the Character Viewer, from which you can choose emoji and other symbols |
|
||||
| ⌃ + ⌘ + f | Use the app in full screen, if supported by the app |
|
||||
| Space | Use Quick Look to preview the selected item |
|
||||
| ⌘ + Tab | Switch to the next most recently used app among your open apps |
|
||||
| ⇧ + ⌘ + 5 | In macOS Mojave or later, take a screenshot or make a screen recording |
|
||||
| ⇧ + ⌘ + 3 | Take whole display screenshot |
|
||||
| ⇧ + ⌘ + 4 | Take custom screenshot |
|
||||
| ⇧ + ⌘ + n | Create a new folder in the Finder |
|
||||
| ⌘ + , | Open preferences for the front app |
|
||||
|
||||
Sleep, log out, and shut down shortcuts
|
||||
---------------------------------------
|
||||
|
||||
| keys | description |
|
||||
| --- | --- |
|
||||
| Power button | Press to turn on your Mac or wake it from sleep |
|
||||
| Power button | Press and hold for 1.5 seconds to put your Mac to sleep |
|
||||
| Power button | Press and continue holding to force your Mac to turn off |
|
||||
| ⌥ + ⌘ + Power | Put your Mac to sleep |
|
||||
| ⌥ + ⌘ + Eject | Put your Mac to sleep |
|
||||
| ⌃ + ⇧ + Power | Put your displays to sleep |
|
||||
| ⌃ + ⇧ + Eject | Put your displays to sleep |
|
||||
| ⌃ + Power | Display a dialog asking whether you want to restart, sleep, or shut down |
|
||||
| ⌃ + Eject | Display a dialog asking whether you want to restart, sleep, or shut down |
|
||||
| ⌃ + ⌘ + Power | Force your Mac to restart, without prompting to save any open and unsaved documents |
|
||||
| ⌃ + ⌘ + Eject | Quit all apps, then restart your Mac |
|
||||
| ⌃ + ⌥ + ⌘ + Power | Quit all apps, then shut down your Mac |
|
||||
| ⌃ ⌥ + ⌘ + Eject | Quit all apps, then shut down your Mac |
|
||||
| ⌃ + ⌘ + q | Immediately lock your screen |
|
||||
| ⇧ + ⌘ + q | Log out of your macOS user account. You will be asked to confirm |
|
||||
| ⌥ + ⇧ + ⌘ + q | Log out immediately without confirming |
|
||||
|
||||
Finder and system shortcuts
|
||||
---------------------------
|
||||
|
||||
| keys | description |
|
||||
| --- | --- |
|
||||
| ⌘ + d | Duplicate the selected files |
|
||||
| ⌘ + e | Eject the selected disk or volume |
|
||||
| ⌘ + f | Start a Spotlight search in the Finder window |
|
||||
| ⌘ + i | Show the Get Info window for a selected file |
|
||||
| ⌘ + r | (1) When an alias is selected in the Finder: show the original file for the selected alias |
|
||||
| ⌘ + r | (2) In some apps, such as Calendar or Safari, refresh or reload the page |
|
||||
| ⌘ + r | (3) In Software Update preferences, check for software updates again |
|
||||
| ⇧ + ⌘ + c | Open the Computer window |
|
||||
| ⇧ + ⌘ + d | Open the desktop folder |
|
||||
| ⇧ + ⌘ + f | Open the Recents window, showing all of the files you viewed or changed recently |
|
||||
| ⇧ + ⌘ + g | Open a Go to Folder window |
|
||||
| ⇧ + ⌘ + h | Open the Home folder of the current macOS user account |
|
||||
| ⇧ + ⌘ + i | Open iCloud Drive |
|
||||
| ⇧ + ⌘ + k | Open the Network window |
|
||||
| ⌥ + ⌘ + l | Open the Downloads folder |
|
||||
| ⇧ + ⌘ + n | Create a new folder |
|
||||
| ⇧ + ⌘ + o | Open the Documents folder |
|
||||
| ⇧ + ⌘ + p | Show or hide the Preview pane in Finder windows |
|
||||
| ⇧ + ⌘ + r | Open the AirDrop window |
|
||||
| ⇧ + ⌘ + t | Show or hide the tab bar in Finder windows |
|
||||
| ⌃ + ⇧ + ⌘ + t | Add selected Finder item to the Dock (OS X Mavericks or later) |
|
||||
| ⇧ + ⌘ + u | Open the Utilities folder |
|
||||
| ⌥ + ⌘ + d | Show or hide the Dock |
|
||||
| ⌃ + ⌘ + t | Add the selected item to the sidebar (OS X Mavericks or later) |
|
||||
| ⌥ + ⌘ + p | Hide or show the path bar in Finder windows |
|
||||
| ⌥ + ⌘ + s | Hide or show the Sidebar in Finder windows |
|
||||
| ⌘ + / | Hide or show the status bar in Finder windows |
|
||||
| ⌘ + j | Show View Options |
|
||||
| ⌘ + k | Open the Connect to Server window |
|
||||
| ⌃ + ⌘ + a | Make an alias of the selected item |
|
||||
| ⌘ + n | Open a new Finder window |
|
||||
| ⌥ + ⌘ + n | Create a new Smart Folder |
|
||||
| ⌘ + t | Show or hide the tab bar when a single tab is open in the current Finder window |
|
||||
| ⌥ + ⌘ + t | Show or hide the toolbar when a single tab is open in the current Finder window |
|
||||
| ⌥ + ⌘ + v | Move the files in the Clipboard from their original location to the current location |
|
||||
| ⌘ + y | Use Quick Look to preview the selected files |
|
||||
| ⌥ + ⌘ + v | View a Quick Look slideshow of the selected files |
|
||||
| ⌘ + 1 | View the items in the Finder window as icons |
|
||||
| ⌘ + 2 | View the items in a Finder window as a list |
|
||||
| ⌘ + 3 | View the items in a Finder window in columns |
|
||||
| ⌘ + 4 | View the items in a Finder window in a gallery |
|
||||
| ⌘ + \[ | Go to the previous folder |
|
||||
| ⌘ + \] | Go to the next folder |
|
||||
| ⌘ + ↑ | Open the folder that contains the current folder |
|
||||
| ⌃ + ⌘ + ↑ | Open the folder that contains the current folder in a new window |
|
||||
| ⌘ + ↓ | Open the selected item |
|
||||
| → | Open the selected folder. This works only when in list view |
|
||||
| ← | Close the selected folder. This works only when in list view |
|
||||
| ⌘ + Delete | Move the selected item to the Trash |
|
||||
| ⇧ + ⌘ + Delete | Empty the Trash |
|
||||
| ⌥ + ⇧ + ⌘ + Delete | Empty the Trash without confirmation dialog |
|
||||
| ⌘ + Brightness Down | Turn video mirroring on or off when your Mac is connected to more than one display |
|
||||
| ⌥ + Brightness Up | Open Displays preferences. This works with either Brightness key |
|
||||
| ⌃ + Brightness Up/Down | Adjust brightness of your external display, if supported by your display |
|
||||
| ⌥ + ⇧ + Brightness Up/Down | Adjust display brightness in smaller steps |
|
||||
| ⌃ + ⌥ + ⇧ + Brightness Up/Down | Adjust external display brightness in smaller steps, if supported by display |
|
||||
| ⌥ + Mission Control | Open Mission Control preferences |
|
||||
| ⌃ + Mission Control | Show the desktop |
|
||||
| ⌃ + ↓ | Show all windows of the front app |
|
||||
| ⌥ + Volume Up | Open Sound preferences. This works with any of the volume keys |
|
||||
| ⌥ + ⇧ + Volume up/Down | Adjust the sound volume in smaller steps |
|
||||
| ⌥ + Brightness Up | Open Keyboard preferences. This works with either Keyboard Brightness key |
|
||||
| ⌥ + ⇧ + Brightness Up/Down | Adjust the keyboard brightness in smaller steps |
|
||||
| ⌥ + double-clicking | Open the item in a separate window, then close the original window |
|
||||
| ⌘ + double-clicking | Open a folder in a separate tab or window |
|
||||
| ⌘ + dragging to another volume | Move the dragged item to the other volume, instead of copying it |
|
||||
| ⌥ + dragging | Copy the dragged item. The pointer changes while you drag the item |
|
||||
| ⌥ + ⌘ + while dragging | Make an alias of the dragged item. The pointer changes while you drag the item |
|
||||
| ⌥ + click a disclosure triangle | Open all folders within the selected folder. This works only when in list view |
|
||||
| ⌘ + click a window title | See the folders that contain the current folder |
|
||||
|
||||
Document shortcuts
|
||||
------------------
|
||||
|
||||
| keys | description |
|
||||
| --- | --- |
|
||||
| ⌘ + b | Boldface the selected text, or turn boldfacing on or off |
|
||||
| ⌘ + i | Italicize the selected text, or turn italics on or off |
|
||||
| ⌘ + k | Add a web link |
|
||||
| ⌘ + u | Underline the selected text, or turn underlining on or off |
|
||||
| ⌘ + t | Show or hide the Fonts window |
|
||||
| ⌘ + d | Select the Desktop folder from within an Open dialog or Save dialog |
|
||||
| ⌃ + ⌘ + d | Show or hide the definition of the selected word |
|
||||
| ⇧ + ⌘ + : | Display the Spelling and Grammar window |
|
||||
| ⌘ + ; | Find misspelled words in the document |
|
||||
| ⌥ + Delete | Delete the word to the left of the insertion point |
|
||||
| ⌃ + h | Delete the character to the left of the insertion point. Or use Delete |
|
||||
| ⌃ + d | Delete the character to the right of the insertion point |
|
||||
| Fn + Delete | Forward delete on keyboards that don't have a Forward Delete key |
|
||||
| ⌃ + k | Delete the text between the insertion point and the end of the line or paragraph |
|
||||
| Fn + ↑ | Page Up: Scroll up one page |
|
||||
| Fn + ↓ | Page Down: Scroll down one page. |
|
||||
| Fn + ← | Home: Scroll to the beginning of a document. |
|
||||
| Fn + → | End: Scroll to the end of a document. |
|
||||
| ⌘ + ↑ | Move the insertion point to the beginning of the document |
|
||||
| ⌘ + ↓ | Move the insertion point to the end of the document. |
|
||||
| ⌘ + ← | Move the insertion point to the beginning of the current line. |
|
||||
| ⌘ + → | Move the insertion point to the end of the current line. |
|
||||
| ⌥ + ← | Move the insertion point to the beginning of the previous word |
|
||||
| ⌥ + → | Move the insertion point to the end of the next word |
|
||||
| ⇧ + ⌘ + ↑ | Select the text between the insertion point and the beginning of the document |
|
||||
| ⇧ + ⌘ + ↓ | Select the text between the insertion point and the end of the document |
|
||||
| ⇧ + ⌘ + ← | Select the text between the insertion point and the beginning of the current line |
|
||||
| ⇧ + ⌘ + → | Select the text between the insertion point and the end of the current line |
|
||||
| ⇧ + ↑ | Extend text selection to the nearest character at the same horizontal location on the line above |
|
||||
| ⇧ + ↓ | Extend text selection to the nearest character at the same horizontal location on the line below |
|
||||
| ⇧ + ← | Extend text selection one character to the left |
|
||||
| ⇧ + → | Extend text selection one character to the right |
|
||||
| ⌥ + ⇧ + ↑ | Extend text selection to the beginning of the current paragraph, then to the beginning of the following paragraph if pressed again |
|
||||
| ⌥ + ⇧ + ↓ | Extend text selection to the end of the current paragraph, then to the end of the following paragraph if pressed again |
|
||||
| ⌥ + ⇧ + ← | Extend text selection to the beginning of the current word, then to the beginning of the following word if pressed again |
|
||||
| ⌥ + ⇧ + → | Extend text selection to the end of the current word, then to the end of the following word if pressed again |
|
||||
| ⌃ + a | Move to the beginning of the line or paragraph |
|
||||
| ⌃ + e | Move to the end of a line or paragraph |
|
||||
| ⌃ + f | Move one character forward |
|
||||
| ⌃ + b | Move one character backward |
|
||||
| ⌃ + l | Center the cursor or selection in the visible area |
|
||||
| ⌃ + p | Move up one line |
|
||||
| ⌃ + n | Move down one line |
|
||||
| ⌃ + o | Insert a new line after the insertion point |
|
||||
| ⌃ + t | Swap the character behind the insertion point with the character in front of the insertion point |
|
||||
| ⌘ + { | Left align |
|
||||
| ⌘ + } | Right align |
|
||||
| ⇧ + ⌘ + \| | Center align |
|
||||
| ⌥ + ⌘ + f | Go to the search field |
|
||||
| ⌥ + ⌘ + t | Show or hide a toolbar in the app |
|
||||
| ⌥ + ⌘ + c | Copy Style: Copy the formatting settings of the selected item to the Clipboard |
|
||||
| ⌥ + ⌘ + v | Paste Style: Apply the copied style to the selected item |
|
||||
| ⌥ + ⇧ + ⌘ + v | Paste and Match Style: Apply the style of the surrounding content to the item pasted within that content |
|
||||
| ⌥ + ⌘ + i | Show or hide the inspector window |
|
||||
| ⇧ + ⌘ + p | Page setup: Display a window for selecting document settings |
|
||||
| ⇧ + ⌘ + s | Display the Save As dialog, or duplicate the current document |
|
||||
| ⇧ + ⌘ + (-) | Decrease the size of the selected item |
|
||||
| ⇧ + ⌘ + (+) | Increase the size of the selected item |
|
||||
| ⌘ + = | performs the same function |
|
||||
| ⇧ + ⌘ + ? | Open the Help menu |
|
||||
@@ -0,0 +1,21 @@
|
||||
---
|
||||
tags:
|
||||
- Cheetsheet
|
||||
---
|
||||
|
||||
Connect to MySQL
|
||||
----------------
|
||||
|
||||
| Command | Description |
|
||||
| --- | --- |
|
||||
| `mysql -u root -p` | Connect to MySQL as root user |
|
||||
| `mysql -u <user> -p` | Connect to MySQL as a specific user |
|
||||
| `mysql -u root -p -h <host>` | Connect to MySQL on a specific host |
|
||||
|
||||
Backup and Restore
|
||||
------------------
|
||||
|
||||
| Command | Description |
|
||||
| --- | --- |
|
||||
| `mysqldump -u root -p <database> > backup.sql` | Backup a database to a file |
|
||||
| `mysql -u root -p <database> < backup.sql` | Restore a database from a file |
|
||||
@@ -0,0 +1,69 @@
|
||||
---
|
||||
tags:
|
||||
- Cheetsheet
|
||||
---
|
||||
|
||||
Certificate Management
|
||||
----------------------
|
||||
|
||||
| Command | Description |
|
||||
| --- | --- |
|
||||
| `openssl req -new -key <key> -out <csr>` | Generate a new certificate signing request |
|
||||
| `openssl req -x509 -key <key> -in <csr> -out <cert>` | Generate a self-signed certificate |
|
||||
| `openssl x509 -in <cert> -text -noout` | Display the details of a certificate |
|
||||
| `openssl x509 -in <cert> -pubkey -noout` | Extract the public key from a certificate |
|
||||
| `openssl x509 -in <cert> -fingerprint -noout` | Display the fingerprint of a certificate |
|
||||
|
||||
Key Management
|
||||
--------------
|
||||
|
||||
| Command | Description |
|
||||
| --- | --- |
|
||||
| `openssl genrsa -out <key> 2048` | Generate a new RSA private key |
|
||||
| `openssl rsa -in <key> -pubout -out <pub_key>` | Extract the public key from a private key |
|
||||
| `openssl rsa -in <key> -out <new_key>` | Convert a private key to a different format |
|
||||
| `openssl rand -hex 16` | Generate a random hex string |
|
||||
|
||||
Certificate Signing
|
||||
-------------------
|
||||
|
||||
| Command | Description |
|
||||
| --- | --- |
|
||||
| `openssl ca -in <csr> -out <cert>` | Sign a certificate request |
|
||||
| `openssl ca -config <config> -in <csr> -out <cert>` | Sign a certificate request with a custom configuration |
|
||||
| `openssl verify -CAfile <ca> <cert>` | Verify a certificate against a CA file |
|
||||
|
||||
Certificate Conversion
|
||||
----------------------
|
||||
|
||||
| Command | Description |
|
||||
| --- | --- |
|
||||
| `openssl pkcs12 -export -in <cert> -inkey <key> -out <file>` | Convert a certificate and key to PKCS#12 format |
|
||||
| `openssl pkcs12 -in <file> -out <cert> -nodes` | Extract a certificate and key from a PKCS#12 file |
|
||||
| `openssl x509 -in <cert> -outform DER -out <file>` | Convert a certificate to DER format |
|
||||
| `openssl x509 -in <cert> -outform PEM -out <file>` | Convert a certificate to PEM format |
|
||||
|
||||
Encryption and Decryption
|
||||
-------------------------
|
||||
|
||||
| Command | Description |
|
||||
| --- | --- |
|
||||
| `openssl enc -aes-256-cbc -salt -in <file> -out <encrypted_file>` | Encrypt a file with AES-256-CBC |
|
||||
| `openssl enc -d -aes-256-cbc -in <file> -out <decrypted_file>` | Decrypt a file encrypted with AES-256-CBC |
|
||||
| `openssl dgst -sha256 FILE` | Calculate the SHA-256 hash of a file |
|
||||
| `openssl dgst -md5 FILE` | Calculate the MD5 hash of a file |
|
||||
|
||||
Miscellaneous
|
||||
-------------
|
||||
|
||||
| Command | Description |
|
||||
| --- | --- |
|
||||
| `openssl version` | Display the OpenSSL version |
|
||||
| `openssl s_client -connect <host>:<port>` | Connect to a server using SSL/TLS |
|
||||
| `openssl s_server -accept <port> -cert <cert> -key <key>` | Start an SSL/TLS server |
|
||||
| `openssl speed` | Run benchmark tests on OpenSSL algorithms |
|
||||
| `openssl ciphers -v` | List all available ciphers |
|
||||
| `openssl rand -base64 32` | Generate a random base64 string |
|
||||
| `openssl rand -base64 -out <file> 32` | Generate a random base64 string and save it to a file |
|
||||
| `openssl rand -out <file> 32` | Generate a random binary string and save it to a file |
|
||||
| `openssl rand -hex 32` | Generate a random hex string |
|
||||
@@ -0,0 +1,43 @@
|
||||
---
|
||||
tags:
|
||||
- Cheetsheet
|
||||
---
|
||||
|
||||
|
||||
Connect to PostgreSQL
|
||||
---------------------
|
||||
|
||||
| Command | Description |
|
||||
| --- | --- |
|
||||
| `psql -U postgres` | Connect to PostgreSQL as the `postgres` user |
|
||||
| `psql -U <user> -d <database>` | Connect to PostgreSQL as a specific user and database |
|
||||
| `psql -U <user> -d <database> -h <host>` | Connect to PostgreSQL on a specific host |
|
||||
|
||||
PostreSQL CLI Commands
|
||||
----------------------
|
||||
|
||||
| Command | Description |
|
||||
| --- | --- |
|
||||
| `\c <database>` | Connect to a specific database |
|
||||
| `\password <user>` | Change password for a specific user |
|
||||
| `\l` | List all databases |
|
||||
| `\d+` | Show detailed information about various database objects |
|
||||
| `\dt` | List all tables in the current database |
|
||||
| `\du` | List all users |
|
||||
| `\df` | List all functions |
|
||||
| `\dv` | List all views |
|
||||
| `\dn` | List all schemas |
|
||||
| `\dp` | List all permissions |
|
||||
| `\di` | List all indexes |
|
||||
| `\ds` | List all sequences |
|
||||
| `\d+` | Show detailed information about various database objects |
|
||||
| `\q` | Quit psql |
|
||||
| `\x` | Toggle expanded output |
|
||||
|
||||
Backup and Restore
|
||||
------------------
|
||||
|
||||
| Command | Description |
|
||||
| --- | --- |
|
||||
| `pg_dump <database> > backup.sql` | Backup a database to a file |
|
||||
| `psql <database> < backup.sql` | Restore a database from a file |
|
||||
@@ -0,0 +1,31 @@
|
||||
---
|
||||
tags:
|
||||
- Cheetsheet
|
||||
---
|
||||
|
||||
|
||||
| Status Code | Description |
|
||||
| --- | --- |
|
||||
| 211 | System status or system help response |
|
||||
| 214 | Help message |
|
||||
| 220 | Service ready |
|
||||
| 221 | Service closing transmission channel |
|
||||
| 235 | Authentication successful |
|
||||
| 250 | Requested mail action completed |
|
||||
| 251 | User not local; will forward |
|
||||
| 252 | Cannot verify the user; will attempt delivery |
|
||||
| 354 | Start mail input; end with `<CRLF>.<CRLF>` |
|
||||
| 421 | Service not available, closing transmission channel |
|
||||
| 450 | Requested action not taken - mailbox unavailable |
|
||||
| 451 | Requested action aborted: local error in processing |
|
||||
| 452 | Requested action not taken - insufficient system storage |
|
||||
| 500 | Syntax error, command unrecognized |
|
||||
| 501 | Syntax error in parameters or arguments |
|
||||
| 502 | Command not implemented |
|
||||
| 503 | Bad sequence of commands |
|
||||
| 504 | Command parameter not implemented |
|
||||
| 550 | Requested action not taken - mailbox unavailable |
|
||||
| 551 | User not local; please try `<forward-path>` |
|
||||
| 552 | Requested mail action aborted - exceeded storage allocation |
|
||||
| 553 | Requested action not taken - mailbox name not allowed |
|
||||
| 554 | Transaction failed |
|
||||
@@ -0,0 +1,100 @@
|
||||
---
|
||||
tags:
|
||||
- Cheetsheet
|
||||
---
|
||||
|
||||
|
||||
Data Definition Language (DDL)
|
||||
------------------------------
|
||||
|
||||
| Command | Description |
|
||||
| --- | --- |
|
||||
| `CREATE DATABASE <db>` | Create a new database |
|
||||
| `DROP DATABASE <db>` | Delete a database |
|
||||
| `CREATE TABLE <table> (<column_1> <column_1_type>, <column_2> <column_2_type>)` | Create a new table |
|
||||
| `DROP TABLE <table>` | Delete a table |
|
||||
| `ALTER TABLE <table> ADD COLUMN <column> <column_type>` | Add a new column to a table |
|
||||
| `ALTER TABLE <table> DROP COLUMN <column>` | Remove a column from a table |
|
||||
| `ALTER TABLE <table> RENAME COLUMN <column> TO <new_column>` | Rename a column in a table |
|
||||
| `ALTER TABLE <table> RENAME TO <new_column>` | Rename a table |
|
||||
| `TRUNCATE TABLE <table>` | Remove all rows from a table |
|
||||
| `CREATE INDEX INDEXNAME ON <table> (<column>)` | Create an index on a table |
|
||||
| `DROP INDEX INDEXNAME` | Remove an index from a table |
|
||||
|
||||
Data Manipulation Language (DML)
|
||||
--------------------------------
|
||||
|
||||
| Command | Description |
|
||||
| --- | --- |
|
||||
| `INSERT INTO <table> (<column_1>, <column_2>) VALUES (<value_1>, <value_2>)` | Insert a new row into a table |
|
||||
| `SELECT * FROM <table>` | Retrieve all rows from a table |
|
||||
| `UPDATE <table> SET <column_1> = <value_1> WHERE <column_2> = <value_2>` | Update rows in a table |
|
||||
| `DELETE FROM <table> WHERE <column> = <value>` | Delete rows from a table |
|
||||
|
||||
Data Query Language (DQL)
|
||||
-------------------------
|
||||
|
||||
| Command | Description |
|
||||
| --- | --- |
|
||||
| `SELECT <column_1>, <column_2> FROM <table>` | Retrieve specific columns from a table |
|
||||
| `SELECT * FROM <table> WHERE <column> = VALUE` | Retrieve rows that match a condition |
|
||||
| `SELECT * FROM <table> ORDER BY <column>` | Retrieve rows sorted by a column |
|
||||
| `SELECT * FROM <table> LIMIT N` | Retrieve the first N rows from a table |
|
||||
| `SELECT * FROM <table> OFFSET N` | Retrieve rows starting from the Nth row |
|
||||
| `SELECT * FROM <table> JOIN <table_2> ON <table_1>.<column_1> = <table_2>.<column_2>` | Retrieve rows from two tables that match a condition |
|
||||
| `SELECT * FROM <table> UNION SELECT * FROM <table_2>` | Retrieve rows from two tables without duplicates |
|
||||
| `SELECT * FROM <table> GROUP BY <column>` | Group rows that have the same value in a column |
|
||||
| `SELECT * FROM <table> HAVING COUNT(<column>) > N` | Filter grouped rows that have more than N rows |
|
||||
| `SELECT * FROM <table> WHERE <column> IN (<value_1>, <value_2>)` | Retrieve rows where a column value matches any value in a list |
|
||||
| `SELECT * FROM <table> WHERE <column> BETWEEN <value_1> AND <value_2>` | Retrieve rows where a column value is within a range |
|
||||
| `SELECT * FROM <table> WHERE <column> LIKE '<value>%'` | Retrieve rows where a column value matches a pattern |
|
||||
| `SELECT * FROM <table> WHERE <column> IS NULL` | Retrieve rows where a column value is NULL |
|
||||
| `SELECT * FROM <table> WHERE <column> IS NOT NULL` | Retrieve rows where a column value is not NULL |
|
||||
|
||||
Data Control Language (DCL)
|
||||
---------------------------
|
||||
|
||||
| Command | Description |
|
||||
| --- | --- |
|
||||
| `GRANT PERMISSIONS ON <table> TO <user>` | Grant permissions to a user |
|
||||
| `REVOKE PERMISSIONS ON <table> FROM <user>` | Revoke permissions from a user |
|
||||
|
||||
Transaction Control Language (TCL)
|
||||
----------------------------------
|
||||
|
||||
| Command | Description |
|
||||
| --- | --- |
|
||||
| `BEGIN TRANSACTION` | Start a new transaction |
|
||||
| `COMMIT` | Save changes to the database |
|
||||
| `ROLLBACK` | Discard changes to the database |
|
||||
| `SAVEPOINT <savepoint>` | Create a savepoint in a transaction |
|
||||
| `ROLLBACK TO SAVEPOINT <savepoint>` | Rollback to a savepoint in a transaction |
|
||||
| `RELEASE SAVEPOINT <savepoint>` | Remove a savepoint in a transaction |
|
||||
|
||||
System Commands
|
||||
---------------
|
||||
|
||||
| Command | Description |
|
||||
| --- | --- |
|
||||
| `SHOW DATABASES` | List all databases |
|
||||
| `SHOW TABLES` | List all tables in the current database |
|
||||
| `SHOW COLUMNS FROM <table>` | List all columns in a table |
|
||||
| `SHOW INDEXES FROM <table>` | List all indexes in a table |
|
||||
| `SHOW CREATE TABLE <table>` | Show the SQL statement that creates a table |
|
||||
| `DESCRIBE <table>` | Show the structure of a table |
|
||||
| `EXPLAIN SELECT * FROM <table>` | Show the execution plan of a query |
|
||||
| `SET autocommit = 0` | Disable autocommit mode |
|
||||
| `SET autocommit = 1` | Enable autocommit mode |
|
||||
| `SET FOREIGN_KEY_CHECKS = 0` | Disable foreign key checks |
|
||||
|
||||
User Commands
|
||||
-------------
|
||||
|
||||
| Command | Description |
|
||||
| --- | --- |
|
||||
| `CREATE <user> '<user>'@'<host>' IDENTIFIED BY '<password>'` | Create a new user |
|
||||
| `DROP <user> '<user>'@'<host>'` | Delete a user |
|
||||
| `ALTER <user> '<user>'@'<host>' IDENTIFIED BY '<password>'` | Change password for a user |
|
||||
| `GRANT ALL PRIVILEGES ON <db> TO '<user>'@'<host>'` | Grant all privileges to a user |
|
||||
| `REVOKE ALL PRIVILEGES ON <db> FROM '<user>'@'<host>'` | Revoke all privileges from a user |
|
||||
| `FLUSH PRIVILEGES` | Reload privileges from the grant tables |
|
||||
@@ -0,0 +1,35 @@
|
||||
---
|
||||
tags:
|
||||
- Cheetsheet
|
||||
---
|
||||
|
||||
|
||||
Connect to SQLite
|
||||
-----------------
|
||||
|
||||
| Command | Description |
|
||||
| --- | --- |
|
||||
| `sqlite3 <db>` | Connect to a SQLite database |
|
||||
|
||||
SQLite CLI Commands
|
||||
-------------------
|
||||
|
||||
| Command | Description |
|
||||
| --- | --- |
|
||||
| `.databases` | List all databases |
|
||||
| `.tables` | List all tables in the current database |
|
||||
| `.schema <table>` | Show the schema of a table |
|
||||
| `.indexes <table>` | List all indexes in a table |
|
||||
| `.show` | Show the current settings |
|
||||
| `.help` | Show help information |
|
||||
| `.shell <command` | Run a shell command |
|
||||
| `.exit` | Quit SQLite |
|
||||
|
||||
Backup and Restore
|
||||
------------------
|
||||
|
||||
| Command | Description |
|
||||
| --- | --- |
|
||||
| `.backup <file>` | Backup the current database to a file |
|
||||
| `.restore <file>` | Restore a database from a file |
|
||||
| `.dump` | Dump the database as SQL statements |
|
||||
@@ -0,0 +1,76 @@
|
||||
---
|
||||
tags:
|
||||
- Cheetsheet
|
||||
---
|
||||
|
||||
Format and Validate
|
||||
-------------------
|
||||
|
||||
| Command | Description |
|
||||
| --- | --- |
|
||||
| `terraform fmt` | Reformat your configuration in the standard style |
|
||||
| `terraform validate` | Check whether the configuration is valid |
|
||||
|
||||
Initialize Working Directory
|
||||
----------------------------
|
||||
|
||||
| Command | Description |
|
||||
| --- | --- |
|
||||
| `terraform init` | Prepare your working directory for other commands |
|
||||
|
||||
Plan, Deploy and Cleanup
|
||||
------------------------
|
||||
|
||||
| Command | Description |
|
||||
| --- | --- |
|
||||
| `terraform apply --auto-approve` | Create or update infrastructure without confirmation prompt |
|
||||
| `terraform destroy --auto-approve` | Destroy previously-created infrastructure without confirmation prompt |
|
||||
| `terraform plan -out plan.out` | Output the deployment plan to plan.out |
|
||||
| `terraform apply plan.out` | Use the plan.out to deploy infrastructure |
|
||||
| `terraform plan -destroy` | Outputs a destroy plan |
|
||||
| `terraform apply -target=aws_instance.myinstance` | Only apply/deploy changes to targeted resource |
|
||||
| `terraform apply -var myregion=us-east-1` | Pass a variable via CLI while applying a configuration |
|
||||
| `terraform apply -lock=true` | Lock the state file so it can't be modified |
|
||||
| `terraform apply refresh=false` | Do not reconcile state file with real-world resources |
|
||||
| `terraform apply --parallelism=5` | Number of simultaneous resource operations |
|
||||
| `terraform refresh` | Reconcile the state in Terraform state file with real-world resources |
|
||||
| `terraform providers` | Get informatino about providers used in the current configuration |
|
||||
|
||||
Workspaces
|
||||
----------
|
||||
|
||||
| Command | Description |
|
||||
| --- | --- |
|
||||
| `terraform workspace new <workspace>` | Create a new workspace |
|
||||
| `terraform workspace select default` | Change to a workspace |
|
||||
| `terraform workspace list` | List all workspaces |
|
||||
|
||||
State Manipulation
|
||||
------------------
|
||||
|
||||
| Command | Description |
|
||||
| --- | --- |
|
||||
| `terraform state show aws_instance.myinstance` | Show details stored in the Terraform state file |
|
||||
| `terraform state pull > terraform.tfstate` | Output Terraform state to a file |
|
||||
| `terraform state mv aws_iam_role.my_ssm_role module.mymodule` | Move a resource tracked via state to different module |
|
||||
| `terraform state replace-provider hashicorp/aws registry.custom.com/aws` | Replace an existing provider with another |
|
||||
| `terraform state list` | List all resources tracked in the Terraform state file |
|
||||
| `terraform state rm aws_instance.myinstance` | Unmanage a resource, delete it from the Terraform state file |
|
||||
|
||||
Import and Outputs
|
||||
------------------
|
||||
|
||||
| Command | Description |
|
||||
| --- | --- |
|
||||
| `terraform import <resource_type>.<resource> <id>` | Import a Resource |
|
||||
| `terraform output` | List all outputs |
|
||||
| `terraform output <output>` | List a specific output |
|
||||
| `terraform output -json` | List all outputs in JSON format |
|
||||
|
||||
Terraform Cloud
|
||||
---------------
|
||||
|
||||
| Command | Description |
|
||||
| --- | --- |
|
||||
| `terraform login` | Login to Terraform Cloud with an API token |
|
||||
| `terraform logout` | Logout from Terraform Cloud |
|
||||
@@ -0,0 +1,60 @@
|
||||
---
|
||||
tags:
|
||||
- Cheetsheet
|
||||
---
|
||||
|
||||
|
||||
Cable Types
|
||||
-----------
|
||||
|
||||
| Cable Type | Shielding | Description | Use Case |
|
||||
| --- | --- | --- | --- |
|
||||
| **UTP** | None | Twisted wires to reduce EMI and crosstalk | Most common and basic type of cable |
|
||||
| **STP** | Foil wrapping or copper braid jacket | Twisted wires wrapped with shielding material | Reduces EMI and crosstalk more than UTP |
|
||||
| **FTP** | Foil wrapping around each twisted pair | Each pair of wires wrapped in foil for added protection | Provides better shielding than UTP |
|
||||
| **S/FTP** | Combines FTP and STP shielding | Twisted wires wrapped in foil, then wrapped in a shielding material | Provides highest level of protection against EMI and crosstalk |
|
||||
|
||||
Wiring
|
||||
------
|
||||
|
||||
### TIA/EIA 568A Wiring
|
||||
|
||||
| PIN | Color |
|
||||
| --- | --- |
|
||||
| 1 | White and Green |
|
||||
| 2 | Green |
|
||||
| 3 | White and Orange |
|
||||
| 4 | Blue |
|
||||
| 5 | White and Blue |
|
||||
| 6 | Orange |
|
||||
| 7 | White and Brown |
|
||||
| 8 | Brown |
|
||||
|
||||
### TIA/EIA 568B Wiring
|
||||
|
||||
| PIN | Color |
|
||||
| --- | --- |
|
||||
| 1 | White and Orange |
|
||||
| 2 | Orange |
|
||||
| 3 | White and Green |
|
||||
| 4 | Blue |
|
||||
| 5 | White and Blue |
|
||||
| 6 | Green |
|
||||
| 7 | White and Brown |
|
||||
| 8 | Brown |
|
||||
|
||||
Categories
|
||||
----------
|
||||
|
||||
| CATEGORY | MHz | Speed |
|
||||
| --- | --- | --- |
|
||||
| CAT 3 UTP | 16MHz | 10Mps up to 100m |
|
||||
| CAT 4 UTP | 20MHz | 16Mps up to 100m |
|
||||
| CAT 5 UTP | 100MHz | 100Mbps up to 100m |
|
||||
| CAT 5e UTP | 100MHz | 1000Mbps up to 100m |
|
||||
| CAT 5e STP | 100MHz | 1000Mbps up to 100m |
|
||||
| CAT 6 UTP | 250MHz | 10Gbps over to 33-55m |
|
||||
| CAT 6a STP | 500MHz | 10Gbps over 100m |
|
||||
| CAT 7 STP | 600MHz | 10Gbps over 100m |
|
||||
| CAT 7a STP | 1000MHz | 10Gbps over 100m |
|
||||
| CAT 8 STP | 2000MHz | 25/40Gps up to 30m |
|
||||
@@ -0,0 +1,110 @@
|
||||
---
|
||||
tags:
|
||||
- Cheetsheet
|
||||
---
|
||||
|
||||
|
||||
Side Menu
|
||||
---------
|
||||
|
||||
| Shortcut | Description |
|
||||
| --- | --- |
|
||||
| ⌘ + B | Hide show side menu |
|
||||
| ⌘ + ⇧ + E | Explorer window |
|
||||
| ⌘ + ⇧ + F | Find window |
|
||||
| ⌘ + ⇧ + J | Find in files window |
|
||||
| ⌃ + ⇧ + G | Git window |
|
||||
| ⌘ + ⇧ + D | Debug window |
|
||||
| ⌘ + ⇧ + X | Extension window |
|
||||
|
||||
Multi-Cursor Editing
|
||||
--------------------
|
||||
|
||||
| Shortcut | Description |
|
||||
| --- | --- |
|
||||
| ⌘ + ⌥ + ↓ | add a new cursor below |
|
||||
| ⌥ + Click | add a new cursor at the mouse click |
|
||||
| ⌘ + ⇧ + L | add new cursor behind all instances of a word |
|
||||
|
||||
Split editor
|
||||
------------
|
||||
|
||||
| Shortcut | Description |
|
||||
| --- | --- |
|
||||
| ⌘ + \\ | split |
|
||||
|
||||
Split Window focusing
|
||||
---------------------
|
||||
|
||||
| Shortcut | Description |
|
||||
| --- | --- |
|
||||
| ⌘ + 0 | explorer panel |
|
||||
| ⌘ + 1 | 1st window split window |
|
||||
| ⌘ + 2 | 2nd window split window |
|
||||
| ⌃ + ~ | terminal window |
|
||||
| ^ + tab | switch between tabs |
|
||||
| ⌘ + ~ | switch between VS code editor windows |
|
||||
|
||||
IntelliSense
|
||||
------------
|
||||
|
||||
| shortcut | description |
|
||||
| --- | --- |
|
||||
| ⌃ + Space | to invoke IntelliSense |
|
||||
|
||||
Line Action
|
||||
-----------
|
||||
|
||||
| | description |
|
||||
| --- | --- |
|
||||
| ⇧ + ⌥ + ↓ | copy the line and insert below |
|
||||
| ⇧ + ⌥ + ↑ | copy the line and insert above |
|
||||
| ⌥ + ↓ | move entire line below |
|
||||
| ⌥ + ↑ | move entire line above |
|
||||
| ⌘ + ⇧ + K | delete entire line |
|
||||
|
||||
Rename Refactoring
|
||||
------------------
|
||||
|
||||
| Shortcut | Description |
|
||||
| --- | --- |
|
||||
| F2 (Fn + F2) | Rename Symbol in the current project |
|
||||
| Right Mouse Click -> Rename Symbol | Rename Symbol in the current project |
|
||||
|
||||
Formatting
|
||||
----------
|
||||
|
||||
| Shortcut | Description |
|
||||
| --- | --- |
|
||||
| ⇧ + ⌥ + F | format entire document |
|
||||
| ⌘ + K and ⌘ F | format selected text |
|
||||
|
||||
Transform selected
|
||||
------------------
|
||||
|
||||
| Shortcut | Description |
|
||||
| --- | --- |
|
||||
| ^ + ⇧ + ⌥ + L | transform selected to lower |
|
||||
| ^ + ⇧ + ⌥ + U | transform selected to upper |
|
||||
| ^ + ⇧ + ⌥ + S | transform selected to snake |
|
||||
| ^ + ⇧ + ⌥ + T | transform selected to titelcase |
|
||||
|
||||
Code Folding
|
||||
------------
|
||||
|
||||
| Shortcut | Description |
|
||||
| --- | --- |
|
||||
| ⌘ + ⌥ + \[ | fold |
|
||||
| ⌘ + ⌥ + \] | unfold |
|
||||
| ⌘ K and ⌘ 0 | fold all |
|
||||
| ⌘ K and ⌘ J | unfold all |
|
||||
| ⌘ K and ⌘ 1 | fold 1 level |
|
||||
| ⌘ K and ⌘ 2 | fold 2 levels |
|
||||
| ⌘ K and ⌘ 5 | fold 5 levels |
|
||||
|
||||
Errors and Warnings
|
||||
-------------------
|
||||
|
||||
| Shortcut | Description |
|
||||
| --- | --- |
|
||||
| F8 | navigate across errors |
|
||||
@@ -0,0 +1,48 @@
|
||||
---
|
||||
tags:
|
||||
- Cheetsheet
|
||||
---
|
||||
|
||||
General Management
|
||||
------------------
|
||||
|
||||
| Command | Description |
|
||||
| --- | --- |
|
||||
| `vagrant status` | Outputs status of the vagrant machine |
|
||||
| `vagrant global-status` | Outputs status of all vagrant machines |
|
||||
| `vagrant global-status --prune` | Same as above, but prunes invalid entries |
|
||||
|
||||
Managing VMs
|
||||
------------
|
||||
|
||||
| Command | Description |
|
||||
| --- | --- |
|
||||
| `vagrant init` | Initialize Vagrant with a Vagrantfile and ./.vagrant directory, using no specified base image. Before you can do vagrant up, you'll need to specify a base image in the Vagrantfile. |
|
||||
| `vagrant up` | Starts vagrant environment (also provisions only on the FIRST vagrant up) |
|
||||
| `vagrant halt` | Stops the vagrant machine |
|
||||
| `vagrant suspend` | Suspends a virtual machine (remembers state) |
|
||||
| `vagrant resume` | Resume a suspended machine (vagrant up works just fine for this as well) |
|
||||
| `vagrant ssh` | Sonnects to machine via SSH |
|
||||
| `vagrant ssh <box>` | If you give your box a name in your Vagrantfile, you can ssh into it with boxname. Works from any directory. |
|
||||
| `vagrant destroy` | Stops and deletes all traces of the vagrant machine |
|
||||
| `vagrant destroy -f` | Same as above, without confirmation |
|
||||
|
||||
Provisioning VMs
|
||||
----------------
|
||||
|
||||
| Command | Description |
|
||||
| --- | --- |
|
||||
| `vagrant provision` | Forces reprovisioning of the vagrant machine |
|
||||
| `vagrant provision --debug` | Use the debug flag to increase the verbosity of the output |
|
||||
| `vagrant up --provision \| tee provision.log` | Runs `vagrant up`, forces provisioning and logs all output to a file |
|
||||
|
||||
Manage Boxes
|
||||
------------
|
||||
|
||||
| Command | Description |
|
||||
| --- | --- |
|
||||
| `vagrant box list` | See a list of all installed boxes on your computer |
|
||||
| `vagrant box add <box> <url>` | Download a box image to your computer |
|
||||
| `vagrant box outdated` | Check for updates vagrant box update |
|
||||
| `vagrant box remove <box>` | Deletes a box from the machine |
|
||||
| `vagrant package` | Packages a running virtualbox env in a reusable box |
|
||||
@@ -0,0 +1,36 @@
|
||||
---
|
||||
tags:
|
||||
- Cheetsheet
|
||||
---
|
||||
|
||||
|
||||
Backup and Restore WSL
|
||||
----------------------
|
||||
|
||||
| Command | Description |
|
||||
| --- | --- |
|
||||
| `wsl --list --verbose` | List Running Distros |
|
||||
| `wsl --distribution <distro>` | Start/Restart a Distro |
|
||||
| `wsl --t <distro>` | Terminate a Running Distro |
|
||||
| `wsl --shutdown` | Terminate All Running Distros and WSL process |
|
||||
| `wsl --export (distribution) (filename.tar)` | Backup a WSL Distro |
|
||||
| `wsl --import (distribution) (install location) (file location and filename)` | Restore a WSL Distro from Backup |
|
||||
|
||||
Symbolic Links
|
||||
--------------
|
||||
|
||||
| Command | Description |
|
||||
| --- | --- |
|
||||
| `sudo ln -s /mnt/c/Users/<user>/.ssh ~/.ssh` | Link .ssh folder |
|
||||
| `sudo ln -s /mnt/c/Users/<user>/.kube ~/.kube` | Link .kube folder |
|
||||
|
||||
Networking
|
||||
----------
|
||||
|
||||
| Command | Description |
|
||||
| --- | --- |
|
||||
| `netsh interface portproxy add v4tov4 listenport=$port connectport=$port connectaddress=$remoteaddr` | Add Port Forwarding |
|
||||
| `netsh advfirewall firewall add rule name=$port dir=in action=allow protocol=TCP localport=$port` | Add Firewall Rule |
|
||||
| `netsh interface portproxy delete v4tov4 listenport=$port` | Delete PortForwarding |
|
||||
| `netsh advfirewall firewall delete rule name=$port` | Delete Firewall Rule |
|
||||
| `netsh interface portproxy show v4tov4` | Show PortForwardings |
|
||||
@@ -0,0 +1,58 @@
|
||||
---
|
||||
tags:
|
||||
- Cheetsheet
|
||||
---
|
||||
|
||||
|
||||
File System Management
|
||||
----------------------
|
||||
|
||||
| Command | Description |
|
||||
| --- | --- |
|
||||
| `zfs list` | List ZFS file systems |
|
||||
| `zfs create <pool>/<filesystem>` | Create a ZFS file system |
|
||||
| `zfs set <property>=<value> <pool>/<filesystem>` | Set ZFS file system properties |
|
||||
| `zfs get <property> <pool>/<filesystem>` | Get ZFS file system properties |
|
||||
| `zfs destroy <pool>/<filesystem>` | Destroy a ZFS file system |
|
||||
|
||||
Pool Management
|
||||
---------------
|
||||
|
||||
| Command | Description |
|
||||
| --- | --- |
|
||||
| `zpool list` | List ZFS pools |
|
||||
| `zpool create <pool> <device>` | Create a ZFS pool |
|
||||
| `zpool destroy <pool>` | Destroy a ZFS pool |
|
||||
| `zpool iostat` | Display ZFS pool I/O statistics |
|
||||
| `zpool status` | Display ZFS pool status |
|
||||
| `zpool history` | Display ZFS pool history |
|
||||
| `zpool events` | Display ZFS pool events |
|
||||
| `zpool scrub <pool>` | Scrub a ZFS pool |
|
||||
| `zpool clear <pool>` | Clear ZFS pool errors |
|
||||
| `zpool trim <pool>` | Trim a ZFS pool |
|
||||
| `zpool add <pool> <device>` | Add a device to a ZFS pool |
|
||||
| `zpool remove <pool> <device>` | Remove a device from a ZFS pool |
|
||||
| `zpool replace <pool> <device>` | Replace a device in a ZFS pool |
|
||||
| `zpool offline <pool> <device>` | Offline a device in a ZFS pool |
|
||||
|
||||
Snapshots
|
||||
---------
|
||||
|
||||
| Command | Description |
|
||||
| --- | --- |
|
||||
| `zfs list -t snapshot` | List ZFS snapshots |
|
||||
| `zfs snapshot <pool>/<filesystem>@<snapshot>` | Create a ZFS snapshot |
|
||||
| `zfs rollback <pool>/<filesystem>@<snapshot>` | Rollback a ZFS snapshot |
|
||||
| `zfs diff <pool>/<filesystem>@<snapshot_1> <pool>/<filesystem>@<snapshot_2>` | Compare ZFS snapshots |
|
||||
| `zfs send <pool>/<filesystem>@<snapshot>` | Send ZFS snapshots |
|
||||
| `zfs receive <pool>/<filesystem>` | Receive ZFS snapshots |
|
||||
|
||||
Clones
|
||||
------
|
||||
|
||||
| Command | Description |
|
||||
| --- | --- |
|
||||
| `zfs clone <pool>/<filesystem>@<snapshot> <pool>/<filesystem>` | Create a ZFS clone |
|
||||
| `zfs promote <pool>/<filesystem>` | Promote a ZFS clone |
|
||||
| `zfs rollback <pool>/<filesystem>` | Rollback a ZFS clone |
|
||||
| `zfs destroy <pool>/<filesystem>` | Destroy a ZFS clone |
|
||||
@@ -0,0 +1,94 @@
|
||||
---
|
||||
tags:
|
||||
- Cheetsheet
|
||||
---
|
||||
|
||||
Contexts and Configuration
|
||||
--------------------------
|
||||
|
||||
| Command | Description |
|
||||
| --- | --- |
|
||||
| `kubectl config view` | Show the current kubeconfig file |
|
||||
| `kubectl config get-contexts` | List all contexts in the kubeconfig file |
|
||||
| `kubectl config current-context` | Show the current context |
|
||||
| `kubectl config use-context <context>` | Change the current context |
|
||||
| `kubectl config set-context <context> --namespace=<namespace>` | Set the namespace for a context |
|
||||
| `kubectl config set-context <context> --cluster=<cluster>` | Set the cluster for a context |
|
||||
| `kubectl config set-context <context> --user=<user>` | Set the user for a context |
|
||||
| `kubectl config set-context <context> --namespace=<namespace> --cluster=<cluster> --user=<user>` | Set all context properties |
|
||||
|
||||
Cluster Management
|
||||
------------------
|
||||
|
||||
| Command | Description |
|
||||
| --- | --- |
|
||||
| `kubectl cluster-info` | Display addresses of the master and services |
|
||||
| `kubectl get nodes` | List all nodes in the cluster |
|
||||
| `kubectl get pods` | List all pods in the cluster |
|
||||
| `kubectl get services` | List all services in the cluster |
|
||||
| `kubectl get deployments` | List all deployments in the cluster |
|
||||
| `kubectl get namespaces` | List all namespaces in the cluster |
|
||||
| `kubectl get events` | List all events in the cluster |
|
||||
|
||||
Resource Management
|
||||
-------------------
|
||||
|
||||
| Command | Description |
|
||||
| --- | --- |
|
||||
| `kubectl apply -f <file>` | Apply a configuration file |
|
||||
| `kubectl delete -f <file>` | Delete a configuration file |
|
||||
| `kubectl get <resource>` | List all resources of a type |
|
||||
| `kubectl describe <resource> <name>` | Describe a resource |
|
||||
| `kubectl edit <resource> <name>` | Edit a resource |
|
||||
| `kubectl exec -it <pod> -- <command>` | Execute a command in a pod |
|
||||
|
||||
Pod Management
|
||||
--------------
|
||||
|
||||
| Command | Description |
|
||||
| --- | --- |
|
||||
| `kubectl run <name> --image=<image>` | Create a new pod |
|
||||
| `kubectl delete pod <name>` | Delete a pod |
|
||||
| `kubectl get pod <name>` | Get details of a pod |
|
||||
| `kubectl describe pod <name>` | Describe a pod |
|
||||
| `kubectl logs <name>` | Show logs of a pod |
|
||||
| `kubectl exec -it <name> -- /bin/bash` | Execute a command in a pod |
|
||||
| `kubectl cp <pod>:<source> <destination>` | Copy files from a pod |
|
||||
| `kubectl top node` | Show metrics for all nodes |
|
||||
| `kubectl top pod` | Show metrics for all pods |
|
||||
| `kubectl top pod <name>` | Show metrics for a specific pod |
|
||||
|
||||
Service Management
|
||||
------------------
|
||||
|
||||
| Command | Description |
|
||||
| --- | --- |
|
||||
| `kubectl expose pod <name> --port=444 --target-port=555` | Expose a pod as a service |
|
||||
| `kubectl delete service <name>` | Delete a service |
|
||||
| `kubectl get service <name>` | Get details of a service |
|
||||
| `kubectl describe service <name>` | Describe a service |
|
||||
|
||||
Deployment Management
|
||||
---------------------
|
||||
|
||||
| Command | Description |
|
||||
| --- | --- |
|
||||
| `kubectl create deployment <name> --image=<image>` | Create a new deployment |
|
||||
| `kubectl delete deployment <name>` | Delete a deployment |
|
||||
| `kubectl get deployment <name>` | Get details of a deployment |
|
||||
| `kubectl describe deployment <name>` | Describe a deployment |
|
||||
| `kubectl scale deployment <name> --replicas=3` | Scale a deployment to 3 replicas |
|
||||
| `kubectl rollout status deployment/<name>` | Check the status of a deployment rollout |
|
||||
| `kubectl rollout history deployment/<name>` | Show the history of a deployment rollout |
|
||||
| `kubectl rollout undo deployment/<name>` | Rollback a deployment to the previous version |
|
||||
| `kubectl rollout undo deployment/<name> --to-revision=1` | Rollback a deployment to a specific revision |
|
||||
|
||||
Namespace Management
|
||||
--------------------
|
||||
|
||||
| Command | Description |
|
||||
| --- | --- |
|
||||
| `kubectl create namespace <name>` | Create a new namespace |
|
||||
| `kubectl delete namespace <name>` | Delete a namespace |
|
||||
| `kubectl get namespace <name>` | Get details of a namespace |
|
||||
| `kubectl describe namespace <name>` | Describe a namespace |
|
||||
Reference in New Issue
Block a user