Paste screenshots from your clipboard into the gist:
- From context menu:
Paste Screenshotcommand. - From command palette:
GistPad: Paste Screenshotcommand. - With a shortcut:
super + shift + v.
| // --------------------------------------------------------------------------------------------------------------------------- | |
| ```javascript | |
| function foo () { | |
| console.log(a); | |
| } | |
| var a = 2; | |
| function bar () { |
| /* | |
| (Copy and paste) | |
| Rotary encoder decoding using two interrupt lines. | |
| Most Arduino boards have two external interrupts, | |
| numbers 0 (on digital pin 2) and 1 (on digital pin 3). | |
| Program sketch is for SparkFun Rotary Encoder sku: COM-09117 | |
| Connect the middle pin of the three to ground. |
| export const promiseState = async (p: Promise<any>): Promise<string> => { | |
| const t = {}; | |
| return await Promise.race([p, t]).then( | |
| (v) => { | |
| return (v === t) | |
| ? 'pending' | |
| : 'fulfilled'; | |
| }, | |
| () => 'rejected'); | |
| }; |
| @import url("https://fonts.googleapis.com/css?family=Source+Code+Pro:400,500,600,700|Source+Sans+Pro:400,600,700&display=swap"); | |
| body { | |
| background: #ddeefc; | |
| font-family: "Source Sans Pro", sans-serif; | |
| font-size: 16px; | |
| } | |
| * { | |
| box-sizing: border-box; | |
| } |
| <div id="app"></div> |
| <div id="app"> | |
| <h1>{{ header }}</h1> | |
| <p>Feel free to edit the HTML, JavaScript and CSS in this playground. The preview will update in real-time, so that | |
| you can visually explore your ideas.</p> | |
| <button @click="sayHi">Say Hi! <span class="fa fa-heart" /></button> | |
| </div> |