This file contains hidden or 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
| track_keywords: | |
| - keyword: "Keyword to watch 1" | |
| enabled: true | |
| - keyword: "Keyword to watch 2" | |
| enabled: false | |
| whole_word: true | |
| flags: "no-reddit, no-posts" |
This file contains hidden or 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
| ## | |
| # Builder | |
| ## | |
| FROM node:20.10-alpine AS builder | |
| WORKDIR /app | |
| COPY package.json yarn.lock ./ | |
| RUN yarn install --frozen-lockfile | |
| COPY . . |
This file contains hidden or 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
| ### | |
| # Run | |
| # npx tsc script.ts | |
| # node script.js | |
| ### | |
| async function sendToPlunk(email: string, referer: string) { | |
| const response = await fetch('https://api.useplunk.com/v1/track', { | |
| method: 'POST', | |
| headers: { |
This file contains hidden or 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
| "use client"; | |
| import Confetti from "react-confetti"; | |
| import { useState, useEffect } from "react"; | |
| export default function ConfettiComponent() { | |
| const [dimensions, setDimensions] = useState({ width: 0, height: 0 }); | |
| const [isSafari, setIsSafari] = useState(false); | |
| useEffect(() => { |
This file contains hidden or 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
| # /etc/rancher/k3s/config.yaml | |
| token: <super secure token> | |
| datastore-endpoint: "sqlite:///var/lib/rancher/k3s/server/db/k3s.db" | |
| write-kubeconfig: /home/lars/.kube/config | |
| write-kubeconfig-mode: 644 | |
| flannel-backend: wireguard-native | |
| tls-san: | |
| - server.dns.address.example.com | |
| disable: | |
| - servicelb |
This file contains hidden or 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
| {{- if .Values.enable_backup }} | |
| apiVersion: batch/v1 | |
| kind: CronJob | |
| metadata: | |
| name: {{ .Release.Name }}-backup | |
| namespace: {{ .Release.Namespace }} | |
| spec: | |
| schedule: "{{ .Values.backup_schedule }}" | |
| successfulJobsHistoryLimit: 0 | |
| jobTemplate: |
This file contains hidden or 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
| import { headers } from 'next/headers'; | |
| import { redirect } from 'next/navigation'; | |
| export default function Page({ searchParams }: { searchParams: { [key: string]: string } }) { | |
| const reqHeaders = headers(); | |
| // get referrer from headers this is the url of the page that the user was on before they were redirected to this page | |
| const referrer = reqHeaders.get('referer') || 'https://hilars.dev/v2e'; | |
| // get referrer from search params (?r=myreferrer), this overrides the referrer from headers if it exists |