Skip to content

Instantly share code, notes, and snippets.

@SamCed
SamCed / linkfields.txt
Last active June 22, 2023 02:49
Link Fields based on matches
//Copy Values to a linked field
//Declare tables
var activeTbl = base.getTable("The table where you need to copy values to");
var linkTbl = base.getTable("Table that contains your linked records");
//Declare queries
var activeQry = await activeTbl.selectRecordsAsync();
var linkQry = await linkTbl.selectRecordsAsync();
<!-- This is for a single page that lists a group of products on it -->
<script type="application/ld+json">
{
"@context": "http://schema.org",
"@type": "ItemList",
"url": "https://www.myexamplestore.com/products/",
"numberOfItems": "2",
"itemListElement": [
{
"@type": "ListItem",
127.0.0.1 us.rdx2.lgtvsdp.com
127.0.0.1 us.info.lgsmartad.com
127.0.0.1 us.ibs.lgappstv.com
127.0.0.1 us.lgtvsdp.com
127.0.0.1 ad.lgappstv.com
127.0.0.1 smartshare.lgtvsdp.com
127.0.0.1 ibis.lgappstv.com
# added after fork
# from https://www.reddit.com/r/pihole/comments/6qmpv6/blacklists_for_lg_webos_tvs/ and others
@miya0001
miya0001 / cors-for-the-wordpress-rest-api.php
Last active January 31, 2023 07:42
CORS for the WordPress REST API
<?php
function my_customize_rest_cors() {
remove_filter( 'rest_pre_serve_request', 'rest_send_cors_headers' );
add_filter( 'rest_pre_serve_request', function( $value ) {
header( 'Access-Control-Allow-Origin: *' );
header( 'Access-Control-Allow-Methods: GET' );
header( 'Access-Control-Allow-Credentials: true' );
header( 'Access-Control-Expose-Headers: Link', false );
@ElMatella
ElMatella / Countdown.vue
Created September 17, 2016 13:36
Countdown component for VueJS with momentjs
<template>
<div class="countdown">
<div class="time-unite created" v-show="years">
<div class="time-unite-title">Y</div>
<div class="time-unite-value">{{ years }}</div>
</div>
<div class="time-unite created" v-show="months">
<div class="time-unite-title">Mois</div>
<div class="time-unite-value">{{ months }}</div>
</div>