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
| <script lang="ts"> | |
| let sections = [ | |
| { | |
| title: 'WEBSITES', | |
| content: 'Content for section 1', | |
| color: 'bg-[#85aa74]' | |
| }, | |
| { | |
| title: 'WEB HOSTING', | |
| color: 'bg-[#fee6a6]', |
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
| // Patches bits-ui's Link Preview trigger component to use Runes in Svelte 5. A hydration mismatch occurs which breaks Svelte 5 apps. | |
| // Running this with the postinstall task, defined in packages.json, will ensure that this file gets patched on updates until this is fixed. | |
| const fs = require('fs'); | |
| const path = require('path'); | |
| // Define the file path | |
| const filePath = path.join(__dirname, 'node_modules', 'bits-ui', 'dist', 'bits', 'link-preview', 'components', 'link-preview-trigger.svelte'); | |
| // Read the file |
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
| #!/bin/bash | |
| docker exec -i coolify-db psql -U coolify -t -c "\ | |
| SELECT | |
| json_agg(json_build_object( | |
| 'uuid', uuid, | |
| 'destination_id', destination_id, | |
| 'name', name, | |
| 'domain', domain, | |
| 'ip', ip, |
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
| docker exec -i coolify-db psql -U coolify -t -c "\ | |
| SELECT | |
| json_agg(json_build_object( | |
| 'uuid', uuid, | |
| 'destination_id', destination_id, | |
| 'name', name, | |
| 'domain', domain, | |
| 'ip', ip, | |
| 'source_table', source_table, | |
| 'docker_compose', docker_compose |
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
| type Metadata struct { | |
| ReplyCode string `json:"ReplyCode"` | |
| ReplyText string `json:"ReplyText"` | |
| MetadataSys struct { | |
| Version string `json:"Version"` | |
| Date string `json:"Date"` | |
| System struct { | |
| SystemID string `json:"SystemID"` | |
| SystemDescription string `json:"SystemDescription"` | |
| } `json:"System"` |
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
| // npm i node-fetch cheerio | |
| // npx ts-node reps2csv.js | |
| import fetch from 'node-fetch'; | |
| import cheerio from 'cheerio'; | |
| import fs from 'fs'; | |
| async function fetchAndParseHouseGov() { | |
| try { | |
| const response = await fetch('https://www.house.gov/representatives'); |
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
| #!/bin/bash | |
| # Exit if any command fails | |
| set -e | |
| # Check if the .env.production file exists | |
| if [ ! -f .env.production ]; then | |
| echo "The .env.production file does not exist. Please create it and add the necessary environment variables to deploy to CapRover." | |
| exit 1 | |
| fi |
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 type { LayoutServerLoad } from './$types'; | |
| import { ServicesOffered } from '$lib/db/schema'; | |
| import { db } from '$lib/db/db'; | |
| export const load = (async () => { | |
| const result1 = await db.query.ServicesOffered.findMany({ | |
| select: { | |
| id: true, | |
| name: true |
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
| #!/bin/bash | |
| set -e | |
| # Define the backup base path | |
| backup_base_path="backups" | |
| # Check if the service name argument is provided | |
| if [ $# -ne 1 ]; then | |
| echo "Usage: $0 <service_name>" | |
| exit 1 |
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
| const keyValueStore = new KeyValueStore('./key-value-store.txt'); | |
| // Get a value from the store | |
| const value = await keyValueStore.get('key1'); | |
| // Set a value in the store | |
| await keyValueStore.set('key2', 'value2'); |