Skip to content

Instantly share code, notes, and snippets.

View ManUtopiK's full-sized avatar
:octocat:
Ready to code.

Emmanuel Salomon ManUtopiK

:octocat:
Ready to code.
View GitHub Profile
@ManUtopiK
ManUtopiK / landingpages.spec.ts
Created October 19, 2023 20:41 — forked from CodeDredd/landingpages.spec.ts
Full e2e test example with nuxt 3
import { fileURLToPath } from 'node:url';
import { describe, test } from 'vitest';
import { expect } from '@playwright/test';
import { setup, createPage } from '@nuxt/test-utils';
describe('Landing page', async () => {
await setup({
rootDir: fileURLToPath(new URL('..', import.meta.url)),
server: true,
browser: true,
@ManUtopiK
ManUtopiK / urql.ts
Created March 9, 2023 00:45 — forked from productdevbook/urql.ts
Nuxt 3 urql graphql
import { Client, createClient, dedupExchange, errorExchange, fetchExchange, ssrExchange } from '@urql/core'
import { ref } from 'vue'
import { devtoolsExchange } from '@urql/devtools'
import * as Session from 'supertokens-web-js/recipe/session'
import { authExchange } from '@urql/exchange-auth'
import { defineNuxtPlugin } from '#app'
const ssrKey = '__URQL_DATA__'
export default defineNuxtPlugin((nuxtApp) => {
@ManUtopiK
ManUtopiK / Editor.vue
Created November 26, 2020 00:48 — forked from Julien1138/Editor.vue
Tiptap collaboration server handles multiple document using namespaces and rooms
<template>
<div class="editor">
<template v-if="editor && !loading">
<div class="count">
{{ count }} {{ count === 1 ? 'user' : 'users' }} connected to {{ projectPath }}/{{ docName }}
</div>
<editor-content class="editor__content" :editor="editor" />
</template>
<em v-else>
Connecting to socket server …
@ManUtopiK
ManUtopiK / fetch-graphql-schema.js
Last active September 1, 2019 22:06 — forked from rmarscher/fetch-graphql-schema.js
Get root schema of graphql endpoint
// A script that can pull down the result of the introspection query
// from a running graphql server.
// Dependencies:
// npm i -S isomorphic-fetch graphql-tag graphql apollo-client
// Usage:
// node fetch-graphql-schema [graphql url]
// Example:
@ManUtopiK
ManUtopiK / README.md
Created June 3, 2016 12:35 — forked from rowanmanning/README.md
Writing a Friendly README. This a companion-gist to the post: http://rowanmanning.com/posts/writing-a-friendly-readme/