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
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
// ==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== |
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'); |
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.
<?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; |
<?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: |
addEventListener("fetch", (event) => { | |
event.respondWith( | |
handleRequest(event.request).catch( | |
(err) => new Response(err.stack, { status: 500 }) | |
) | |
); | |
}); | |
const addPreloadAfter = (href) => ({ | |
element: (el) => { |
<style> | |
body{margin:0;width:100%;height:100%} body,td,input,textarea,select{font-family:arial,sans-serif} input,textarea,select{font-size:100%} #loading{position:absolute;width:100%;height:100%;z-index:1000;background-color:#fff} .msg{ color: #757575; font: 20px/20px Arial, sans-serif; letter-spacing: .2px; text-align: center } #nlpt{ animation: a-s .5s 2.5s 1 forwards; background-color: #f1f1f1; height: 4px; margin: 56px auto 20px; opacity: 0; overflow: hidden; position: relative; width: 300px } #nlpt::before{ animation: a-lb 20s 3s linear forwards; background-color: #db4437; content: ''; display: block; height: 100%; position: absolute; transform: translateX(-300px); width: 100% } @keyframes a-lb{ 0%{transform:translateX(-300px)}5%{transform:translateX(-240px)}15%{transform:translateX(-30px)}25%{transform:translateX(-30px)}30%{transform:translateX(-20px)}45%{transform:translateX(-20px)}50%{transform:translateX(-15px)}65%{transform:translateX(-15px)}70%{transform:translateX(-10px)}95%{transform:translateX(-1 |
<?php | |
require_once 'app/Mage.php'; | |
Mage::app(); | |
$quote = Mage::getModel('sales/quote') | |
->setStoreId(Mage::app()->getStore('default')->getId()); | |
$product = Mage::getModel('catalog/product')->load(6); /* 6 => Some product ID */ |
From http://concord-consortium.github.io/developer-notes/automating-gh-pages-integration.html:
How to setup a git repo so gh-pages automatically tracks commits to master and ‘git push origin’ updates the remote master and gh-pages branches.
Setup a test repo:
mkdir pages-test
cd pages-test/
git init .