This content moved here: https://exploringjs.com/impatient-js/ch_arrays.html#quickref-arrays
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 type { DataFunctionArgs } from '@remix-run/node' | |
import { json, redirect } from '@remix-run/node' | |
import { Form } from '@remix-run/react' | |
import Stripe from 'stripe' | |
export async function loader({ request }: DataFunctionArgs) { | |
// Gets params from URL. | |
const url = new URL(request.url) | |
const userId = url.searchParams.get('userId') | |
const successPayment = url.searchParams.get('success') |
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
<template> | |
<Teleport to="body"> | |
<div v-show="open" | |
class="fixed z-10 inset-0 overflow-y-hidden h-full" | |
role="dialog" | |
aria-modal="true" | |
> | |
<div class="flex items-center justify-center min-h-full text-center"> | |
<!-- Overlay --> | |
<div class="fixed inset-0 bg-gray-500 bg-opacity-75 transition-opacity" aria-hidden="true" |
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
{% if cart.attributes.yourCartAttribute %} | |
<script> | |
$.ajax({ | |
type: 'POST', | |
url: '/cart/update.js', | |
data: 'attributes[yourCartAttribute]=', | |
dataType: 'json' | |
}); | |
</script> | |
{% endif %} |
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 | |
//Use this function to create pagingation links that are styleable with Twitter Bootstrap | |
function paging() { | |
global $wp_query; | |
$total_pages = $wp_query->max_num_pages; | |
if ($total_pages > 1){ | |
$current_page = max(1, get_query_var('paged')); |
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
#301 Redirects for .htaccess | |
#Redirect a single page: | |
Redirect 301 /pagename.php http://www.domain.com/pagename.html | |
#Redirect an entire site: | |
Redirect 301 / http://www.domain.com/ | |
#Redirect an entire site to a sub folder | |
Redirect 301 / http://www.domain.com/subfolder/ |