Created by Christopher Manning
Nodes are linked to nodes in neighboring cells. The cell's color is a function of its area.
The white lines are the Delaunay triangulation and the purple cells are the Voronoi diagram.
addEventListener("fetch", (event) => { | |
event.respondWith( | |
handleRequest(event.request).catch( | |
(err) => new Response(err.stack, { status: 500 }) | |
) | |
); | |
}); | |
const addPreloadAfter = (href) => ({ | |
element: (el) => { |
<?php | |
/* | |
Plugin Name: Return translated WooCommerce page | |
Plugin URI: http://www.damiencarbery.com | |
Description: Required Polylang plugin. Returns ID of translated page. | |
Author: Damien Carbery | |
Version: 0.1 | |
*/ | |
// A safe version of code suggested at: |
<?php | |
/** | |
* gets the current post type in the WordPress Admin | |
*/ | |
function get_current_post_type() { | |
global $post, $typenow, $current_screen; | |
//we have a post so we can just get the post type from that | |
if ( $post && $post->post_type ) { | |
return $post->post_type; |
Created by Christopher Manning
Nodes are linked to nodes in neighboring cells. The cell's color is a function of its area.
The white lines are the Delaunay triangulation and the purple cells are the Voronoi diagram.
addEventListener('fetch', event => { | |
event.respondWith(fetchAndCheckOrigin(event.request)) | |
}) | |
async function fetchAndCheckOrigin(req) { | |
try { | |
startTime = new Date(); | |
const body = await req.body; | |
const ip = req.headers.get('cf-connecting-ip'); | |
const es = req.headers.get('cf-ipcountry'); |
// ==UserScript== | |
// @name Convert post to Gutenberg | |
// @namespace http://tampermonkey.net/ | |
// @version 0.1 | |
// @description Convert Wordpress classic posts to Gutenberg layout | |
// @author Micah Engle-Eshleman | |
// @include /^https:\/\/subdomain\.domain\.com\/wp-admin\/post.php\?post=\d+&action=edit/ | |
// @grant none | |
// ==/UserScript== |
Base URL: http://translate.google.com/translate_tts
It converts written words into audio. It accepts GET
requests.
q
The query string to convert to audio
tl
Translation language, for example, ar
for Arabic, or en-us
for English
/** | |
* Convert Excel file to Sheets | |
* @param {Blob} excelFile The Excel file blob data; Required | |
* @param {String} filename File name on uploading drive; Required | |
* @param {Array} arrParents Array of folder ids to put converted file in; Optional, will default to Drive root folder | |
* @return {Spreadsheet} Converted Google Spreadsheet instance | |
**/ | |
function convertExcel2Sheets(excelFile, filename, arrParents) { | |
var parents = arrParents || []; // check if optional arrParents argument was provided, default to empty array if not |
#!/bin/bash | |
#1) on https://console.developers.google.com/ register project and associate API from library | |
# OUTPUT: client_id,client_secret | |
client_id="..." | |
client_secret="...." | |
#2) get authorization code at the following link using web browser | |
# OUTPUT: code | |
scope="https://www.googleapis.com/auth/drive" |
<?php // Don't use this line. | |
/* | |
* Add the script below to wherever you store custom code snippets | |
* in your site, whether that's your child theme's functions.php, | |
* a custom plugin file, or through a code snippet plugin. | |
*/ | |
/** | |
* This function will connect wp_mail to your authenticated |