| date | 2022-08-10 |
|---|---|
| title | Basic Markdown Formatting |
| category | Tutorial |
| tags | vue |
The Ultimate Guide to Markdown. This will also be bold
| // Working code with Vue3 | |
| // Create Folder plugin > Create file useEmitter.js | |
| import { defineNuxtPlugin } from '#app' | |
| import mitt from 'mitt' | |
| const emitter = mitt() | |
| export default defineNuxtPlugin((nuxtApp) => { | |
| nuxtApp.provide('bus', { |
| import type { Ref } from 'vue'; | |
| export const useLang: () => Ref<string> = () => { | |
| if (process.client) { | |
| return ref(navigator.language); | |
| } | |
| const parseLangString: (languages: string) => string = (languages) => { | |
| return languages.split(',')[0]; | |
| }; |
| 000abv | |
| 0db | |
| 0mb | |
| 0we | |
| 0wf | |
| 0z | |
| 1 | |
| 11v | |
| 18ani | |
| 18plus |
| export interface GridInstance { | |
| el: HTMLElement | |
| items: HTMLElement[] | |
| gap: number | |
| columns: number | |
| count: number | |
| } | |
| export function masonryGridPolyfill(selectors = '.masonry-grid') { | |
| const elements = [...document.querySelectorAll<HTMLElement>(selectors)] |
| 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) => { |
| #!/bin/bash | |
| OPTION=$1 | |
| HOSTNAME=$(hostname) | |
| DATE=$(date +%Y-%m-%d-%H-%M-%S) | |
| REPORT_FILE="report-${HOSTNAME}-${DATE}.txt" | |
| INTERESTING_FILES='.bash_history .bash_logout .bashrc .ssh known_hosts authorized_keys id_rsa id_rsa.pub authorized_keys2' | |
| INTERESTING_PLACES='/var /tmp /dev/shm' | |
| COMPRESSED_FILE_EXTENSIONS='.zip .tar .gz .rar' |
| export default async (request, context) => { | |
| return new Response( | |
| JSON.stringify({ | |
| ...context.geo, | |
| ip: context.ip, | |
| }), | |
| { headers: { 'content-type': 'application/json' } } | |
| ); | |
| }; |
| #!/bin/bash | |
| # Check if the user provided the branch name and commit message as arguments | |
| if [ "$#" -ne 2 ]; then | |
| echo "Usage: $0 <branch_name> <commit_message>" | |
| exit 1 | |
| fi | |
| branch_name="$1" | |
| commit_message="$2" |
| date | 2022-08-10 |
|---|---|
| title | Basic Markdown Formatting |
| category | Tutorial |
| tags | vue |
The Ultimate Guide to Markdown. This will also be bold
| 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, |