This was tested on:
- Ubuntu 14.04 x64
- Ubuntu 16.04 x64
#!/usr/bin/php | |
<?php | |
// copied from http://phpadvent.org/2008/dont-commit-that-error-by-travis-swicegood | |
// authored by Travis Swicegood | |
$output = array(); | |
$return = 0; | |
exec('git rev-parse --verify HEAD 2> /dev/null', $output, $return); | |
$against = $return == 0 ? 'HEAD' : '4b825dc642cb6eb9a060e54bf8d69288fbee4904'; |
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta http-equiv="Content-type" content="text/html; charset=utf-8" /> | |
<title>Stripe Sample Form</title> | |
<script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.6.2/jquery.min.js"></script> | |
<script type="text/javascript" src="https://ajax.aspnetcdn.com/ajax/jquery.validate/1.8.1/jquery.validate.min.js"></script> | |
<script type="text/javascript" src="https://js.stripe.com/v1/"></script> | |
<script type="text/javascript"> |
<?php | |
$tour_pages = get_posts( | |
array( | |
'post_type' => 'tour', | |
'meta_query' => array( | |
array( | |
'key' => 'tour_author_relationship', // name of custom field | |
'value' => '"' . get_the_ID() . '"', | |
'compare' => 'LIKE' | |
) |
# The idea of this deployment script is to create a deploy copy of your website and handle | |
# Git and Composer updates in there. Aferwards, it just renames that deploy copy to become the | |
# live website. We then run the database migrations and take the application out of maintenance mode. | |
# Obviously, you will have to replace all instances of {{ websiteName }} with the name of your website and | |
# {{ branchName }} with the name of the branch you would like to pull changes from. This is usually the master branch. | |
# Start by checking for for old deployment folder and remove it if we have one. | |
if [ -d "/home/forge/{{ websiteName }}-deploy" ]; then | |
rm -Rf /home/forge/{{ websiteName }}-deploy |
County | Region | |
---|---|---|
Guernsey | Crown Dependencies | |
IOM | Crown Dependencies | |
Jersey | Crown Dependencies | |
North East Derbyshire | East Midlands | |
Amber Valley | East Midlands | |
Ashfield | East Midlands | |
Bassetlaw | East Midlands | |
Blaby | East Midlands | |
Bolsover | East Midlands |
//Get package | |
wget https://github.com/wkhtmltopdf/wkhtmltopdf/releases/download/0.12.4/wkhtmltox-0.12.4_linux-generic-amd64.tar.xz | |
sudo apt install wkhtmltopdf | |
//create symlink. | |
sudo ln -s /usr/bin/wkhtmltopdf /usr/local/bin/wkhtmltopdf | |
//At this point you can run this command to test that everything works. | |
/usr/local/bin/wkhtmltopdf google.com google.pdf |
function iframeURLChange(iframe, callback) { | |
var lastDispatched = null; | |
var dispatchChange = function () { | |
var newHref = iframe.contentWindow.location.href; | |
if (newHref !== lastDispatched) { | |
callback(newHref); | |
lastDispatched = newHref; | |
} |
Image.js
from the source below (it is almost a copy of Image.js from tiptap-extensions
except that it has a constructor that accepts uploadFunc
(function to be called with image
being uploaded) and additional logic if(upload) { ... } else { ... previous base64 logic .. }
in the new Plugin
section.import {Node, Plugin} from 'tiptap'
import {nodeInputRule} from 'tiptap-commands'
/**
* Matches following attributes in Markdown-typed image: [, alt, src, title]
*