Created in VSCode, using the GistPad extension
Let's upload a screenshot from the clipboard, because I can
Apparently I can't. I'm on WSL2, maybe that's why, it's in my Windows clipboard
- Making a list.
- Checking it twice.
import React from 'react' | |
import { Link } from 'gatsby' | |
import { rhythm, scale } from '../utils/typography' | |
import { StaticQuery, graphql } from 'gatsby' | |
class Template extends React.Component { | |
render() { | |
const { location, children } = this.props |
{ | |
"terminal.integrated.shell.windows": "C:\\Program Files\\Git\\bin\\bash.exe", | |
"editor.fontSize": 18, | |
"terminal.integrated.fontSize": 18, | |
"editor.renderWhitespace": "all", | |
"window.menuBarVisibility": "toggle", | |
"editor.fontFamily": "Fira Code", | |
"editor.fontLigatures": true, | |
"terminal.integrated.fontFamily": "consolas", | |
"files.eol": "\n", |
let urlObj = new URL(`https://publish.twitter.com/oembed`); | |
urlObj.search = new URLSearchParams({ | |
url: "https://twitter.com/NMeuleman/status/1211692091954339841", | |
theme: "dark", | |
dnt: true, | |
omit_script: true | |
}); | |
const urlString = urlObj.toString(); | |
// https://publish.twitter.com/oembed?url=https%3A%2F%2Ftwitter.com%2FNMeuleman%2Fstatus%2F1211692091954339841&theme=dark&dnt=true&omit_script=true |
// Totally fine option that takes 2 lines | |
import { infiniteBooper } from "./some/other/file.js"; | |
export { infiniteBooper }; | |
// Same thing, done on a single line | |
export { infiniteBooper } from "./some/other/file.js"; |
/** @jsx jsx */ | |
// import React from 'react'; | |
import { jsx } from 'theme-ui'; | |
import { Link, graphql } from 'gatsby'; | |
import { PostCard } from '@nickymeuleman/gatsby-theme-blog'; | |
import testImg from './test.jpg'; | |
const IndexPage = ({ data }) => { | |
console.log(data); |
const value = 0 | |
const defaultWithLogicalOR = value || 1 | |
// result: 1 | |
const defaultWithNullishCoalescing = value ?? 1; | |
// result: 0 |
<template> | |
<div> | |
<!-- these two links are identical --> | |
<a v-bind:href="twitter">@NMeuleman</a> | |
<a :href="twitter">@NMeuleman</a> | |
</div> | |
</template> | |
<script> | |
export default { |
<template> | |
<!-- pass in the "like" variable that corresponds to the input-value by using v-model --> | |
<form v-on:submit.prevent="onSubmit(like)"> | |
<label | |
>What do you like: | |
<input v-model="like" /> | |
</label> | |
<input type="submit" /> | |
</form> | |
</template> |