I hereby claim:
- I am johndigital on github.
- I am johndigital (https://keybase.io/johndigital) on keybase.
- I have a public key ASCOkHYF0Viv9M_3T0SuPYJg5fKss09ugqDP2ineqQM3KAo
To claim this, I am signing this object:
import linkResolver from './linkResolver' | |
import prismicDOM from 'prismic-dom' | |
const Elements = prismicDOM.RichText.Elements | |
// https://prismic.io/docs/vuejs/getting-started/prismic-nuxt | |
export default function (type, element, content, children) { | |
// Generate links to Prismic Documents as <router-link> components | |
// Present by default, it is recommended to keep this | |
if (type === Elements.hyperlink) { |
<template> | |
<div class="scrolling-layout"> | |
<!-- This is just an 800vh spacer, | |
it ensures the page is tall | |
enough to scroll --> | |
<div class="spacer" /> | |
<!-- This is the actual content that gets scrolled. | |
It is position fixed and the "scrolling" is done | |
with transforms --> |
<template> | |
<div class="shared-gradient-playground"> | |
<fragment-shader :uniforms="uniforms" :timescale="60"> | |
<script type="shader/fragment"> | |
precision highp float; | |
uniform vec2 uResolution; | |
uniform float uTime; | |
uniform vec3 color1; | |
uniform vec3 color2; | |
uniform vec3 color3; |
I hereby claim:
To claim this, I am signing this object:
/* | |
home.js | |
-- | |
This script takes the JSON data from the home page for posts and tweets and | |
randomly displays them into a randomly selected template which is then | |
Variables from Home HTML: |
const distance = require( 'compute-cosine-distance' ) | |
const _ = require('lodash') | |
// helper to average an array of vectors | |
// down to a single vector | |
const average = points => { | |
return _.range(points[0].length).map(dim => { | |
return _.mean(points.map(p => p[dim])) | |
}) | |
} |
const _ = require('lodash') | |
const tokenize = string => { | |
return string.split(' ').map(w => { | |
return w.trim().toLowerCase().replace(/[^a-zA-Z]/g, '') | |
}).filter(w => w) | |
} | |
const similarPosts = (posts, targetPost) => { |
<?php | |
// Add this to the functions.php file of the SENDING site | |
function fh_export_page_metadata(){ | |
$post = get_post(); | |
// change this to target site URL | |
$target_site = 'http://www.example-site.com'; | |
// add 'run' to URL query string to run this |
<?php | |
/* | |
* Override default vimeo oembed behavior | |
*/ | |
function set_vimeo_defaults(){ | |
// set vimeo oembed args | |
// see full list here: developer.vimeo.com/apis/oembed | |
$args = array( |