View pg14.sql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--PostgreSQL 13 | |
SELECT * | |
FROM shirts | |
WHERE details->'attributes'->>'color' = 'neon yellow' | |
AND details->'attributes'->>'size' = 'medium'; | |
--PostgreSQL 14 | |
SELECT * | |
FROM shirts | |
WHERE details['attributes']['color'] = '"neon yellow"' |
View how-we-built-a-publisher-platform-with-next-js-graphql-and-vercel-3.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
export async function getStaticPaths() { | |
return { | |
paths: [ | |
{ params: { ... } } // See the "paths" section below | |
], | |
fallback: true or false // See the "fallback" section below | |
}; | |
} |
View how-we-built-a-publisher-platform-with-next-js-graphql-and-vercel-2.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
export async function getStaticProps(context) { | |
return { | |
props: {}, // will be passed to the page component as props | |
} | |
} |
View how-we-built-a-publisher-platform-with-next-js-graphql-and-vercel-1.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
export async function getServerSideProps(context) { | |
return { | |
props: {}, // will be passed to the page component as props | |
} | |
} |
View css-json.css
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- { | |
--: { | |
"css": true, | |
"totally": { | |
"not": "controversial!" | |
} | |
} | |
} | |
#cool { |
View gist:ba1e0146c1f5c21dc04424b6338d8d79
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# create the project | |
mkdir my-app | |
cd my-app | |
npm init svelte@next | |
# install dependencies | |
npm install | |
# start dev server and open a browser tab | |
npm run dev -- --open |
View custom-input-10.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!-- CustomInput.vue --> | |
<template> | |
<label> | |
{{ label }} | |
<input type="text" :name="name" :value="value" @input="onInput" @change="onChange" /> | |
</label> | |
</template> | |
<script> | |
export default { |
View custom-input-9.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!-- CustomInput.vue --> | |
<template> | |
<label> | |
{{ label }} | |
<input type="text" :name="name" v-model="model" /> | |
</label> | |
</template> | |
<script> | |
export default { |
View custom-input-8.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!-- CustomInput.vue --> | |
<template> | |
... | |
<input type="text" :name="name" v-model="model" /> | |
... | |
</template> | |
<script> | |
... | |
computed: { |
View custom-input-7.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!-- CustomInput.vue --> | |
... | |
<script> | |
... | |
watch: { | |
value: { | |
handler(value) { | |
if (value) { | |
this.error = ''; | |
} |
NewerOlder