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
// Deploy as a Supabase function with --no-verify-jwt | |
// as we are providing an Outseta token, not a Supabase token | |
// command: supabase functions deploy exchange --no-verify-jwt | |
import * as jose from "https://deno.land/x/jose@v4.14.4/index.ts"; | |
const corsHeaders = { | |
"Access-Control-Allow-Origin": "*", | |
"Access-Control-Allow-Headers": | |
"authorization, x-client-info, apikey, content-type", |
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
// Replace const stripe .... with the snippet below. | |
const [stripe, setStripe] = useState() | |
useEffect(() => { | |
setStripe(window.Stripe(STRIPE_KEY)) | |
}, []) |
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> | |
<transition name="fade"> | |
<img v-if="imageSrc" :src="imageSrc" /> | |
</transition> | |
</template> | |
<script> | |
export default { | |
props: [ |
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
add_filter( 'rest_api_allowed_public_metadata', 'allow_my_metadata' ); | |
function allow_my_metadata() { | |
$allowed_meta_keys[] = 'audio_url'; | |
$allowed_meta_keys[] = 'start_station'; | |
$allowed_meta_keys[] = 'end_station'; | |
return $allowed_meta_keys; | |
} |
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
/* Do for each site */ | |
/* x is site number, for site 1 omit "_x" */ | |
UPDATE `wp_x_options` SET `option_value` = REPLACE(option_value, "old_domain", "new_domain"); | |
UPDATE `wp_x_comments` SET `comment_author_url` = REPLACE(comment_author_url, "old_domain", "new_domain"); | |
UPDATE `wp_x_postmeta` SET `meta_value` = REPLACE(meta_value, "old_domain", "new_domain"); | |
UPDATE `wp_x_posts` SET `post_content` = REPLACE(post_content, "old_domain", "new_domain"); |
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
// Read full blogpost explaining this at http://labs.lillyapps.no/2014/04/12/handle-timezones-parse-com | |
var moment = require('cloud/moment-timezone.js'); | |
moment.tz.add(require('cloud/moment-timezone-data.js')); | |
Parse.Cloud.define("momentTest", function (request, response) | |
{ | |
var osloSummerTime = moment.tz('2014-04-12 11:55', 'Europe/Oslo'); | |
var osloWinterTime = moment.tz('2013-11-18 11:55', 'Europe/Oslo'); |
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 <MapKit/MapKit.h> | |
@interface NorwayMapUtility : NSObject | |
+ (MKCoordinateRegion) regionContainingTheKingdomOfNorway; | |
+ (MKCoordinateRegion) regionContainingMainlandNorway; | |
+ (MKCoordinateRegion) regionContainingMainlandNorwayWithIslands; | |
@end |