Browser form action. When you need to submit form but you don't want to send request to server with regular routeAction$ Doesn't work when js disabled.
This file contains 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 { generatePreservedRoutes, generateRegularRoutes } from '@generouted/react-router/core'; | |
import { createBrowserRouter, Outlet, RouterProvider } from 'react-router-dom'; | |
import type { RouteObject } from 'react-router-dom'; | |
import { Fragment } from 'react'; | |
type Module = { default: () => JSX.Element; Catch?: () => JSX.Element }; | |
const patterns = { | |
route: [/^.*\/src\/pages\/|\.(jsx|tsx|mdx)$/g, ''], | |
splat: [/\[\.{3}\w+\]/g, '*'], |
This file contains 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 puppeteer = require('puppeteer'); | |
const nodemailer = require('nodemailer'); | |
class Webpage { | |
static async generatePDF(url) { | |
const browser = await puppeteer.launch({ headless: true }); // Puppeteer can only generate pdf in headless mode. | |
const page = await browser.newPage(); | |
await page.goto(url, { waitUntil: 'networkidle', networkIdleTimeout: 5000 }); // Adjust network idle as required. | |
const pdfConfig = { | |
format: 'A4', |
This file contains 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 Logo from '../assets/logo.png?jsx'; | |
//<Logo/> | |
function ImageJSX() { | |
const supportedExtensions = ['.jpg', '.jpeg', '.png', '.webp', '.gif', '.avif', '.tiff']; | |
return { | |
name: 'my-plugin', | |
transform(code: any, id: any) { | |
const parseId = (originalId: string) => { | |
const [pathId, query] = originalId.split('?'); | |
const queryStr = query || ''; |
This file contains 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 { | |
component$, | |
Slot, | |
useStyles$, | |
} from "@builder.io/qwik"; | |
import { Link, routeLoader$, useLocation } from "@builder.io/qwik-city"; | |
import type { RequestHandler, LinkProps } from "@builder.io/qwik-city"; | |
import Header from "~/components/starter/header/header"; | |
import Footer from "~/components/starter/footer/footer"; |
This file contains 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
.rounded-corners-gradient-borders { | |
width: 300px; | |
height: 80px; | |
border: double 4px transparent; | |
border-radius: 80px; | |
background-image: linear-gradient(white, white), radial-gradient(circle at top left, #f00,#3020ff); | |
background-origin: border-box; | |
background-clip: padding-box, border-box; | |
} |
This file contains 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
<?php | |
<?php | |
///amo integra begin | |
$values = $hook->getValues(); | |
$subject = $modx->getOption('emailSubject', $formit->config, 'form-'.$modx->resource->get('emailSubject')); | |
$name = $values['name']; | |
$phone = $values['phone']; | |
$email = $values['email']; | |
This file contains 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 | |
if [ -f "/etc/apache2/sites-available/$1.conf" ] | |
then | |
a2dissite $1.conf > /dev/null 2>&1 | |
rm /etc/apache2/sites-available/$1.conf | |
rm -rf /var/www/$1 | |
rm /etc/apache2/ssl/$1.pem | |
rm /etc/apache2/ssl/$1.key | |
else | |
echo "File is not found" |
This file contains 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 | |
if [ $# -eq 0 ] | |
then | |
echo "No arguments supplied" | |
exit 1 | |
fi | |
if [ -f "/etc/apache2/sites-available/$1.conf" ] | |
then | |
echo "File exist!" | |
else |
NewerOlder