date | title | category | tags |
---|---|---|---|
2022-08-10 |
Basic Markdown Formatting |
Tutorial |
vue |
The Ultimate Guide to Markdown. This will also be bold
export const shades = [ | |
50, | |
...Array.from({ length: 9 }).map((_, i) => (i + 1) * 100), | |
950, | |
]; | |
export const makeVariable = ({ fallbackValue, name, shade, withVar }) => { | |
const variable = `--${name}-${shade}`; | |
const value = fallbackValue ? variable + ", " + fallbackValue : variable; | |
return withVar ? `var(${value})` : variable; |
// remoteScript.js | |
(function() { | |
// Define a global function | |
window.remoteFunction = function() { | |
console.log('Remote function called!'); | |
// You can add more functionality here | |
}; | |
// Optionally, you can define more functions or objects | |
window.anotherRemoteFunction = function(message) { |
import { defineEventHandler, getRequestHeader, readBody } from 'h3' | |
import { transformContent } from '@nuxt/content/transformers' | |
// @ts-expect-error Missing imports | |
import { useStorage, useRuntimeConfig } from '#imports' | |
export default defineEventHandler(async (event) => { | |
const secret = getRequestHeader(event, 'X-Gitlab-Token') | |
const body = await readBody(event) | |
const commits = body.commits | |
const config = useRuntimeConfig() |
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, |
date | title | category | tags |
---|---|---|---|
2022-08-10 |
Basic Markdown Formatting |
Tutorial |
vue |
The Ultimate Guide to Markdown. This will also be bold
#!/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" |
export default async (request, context) => { | |
return new Response( | |
JSON.stringify({ | |
...context.geo, | |
ip: context.ip, | |
}), | |
{ headers: { 'content-type': 'application/json' } } | |
); | |
}; |
#!/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' |
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) => { |