Create Bookmarklet (browser bookmark that executes Javsacript) to copy a given text to Clipboard.
This is the base javascript:
(function (text) {
var node = document.createElement('textarea')
var selection = document.getSelection()
# Uses these 2 tools: | |
# http://wp-cli.org/ | |
# https://github.com/xwp/wp-cli-ssh | |
# Remote to local | |
wp ssh db export - --host=production | wp db import - | |
# Local to remote BEWARE THIS IS DANGEROUS BUT KEPT AS REFERENCE | |
wp db export - | wp ssh db import - --host=production |
<?php | |
// Adds a new hook that catches a submitted acf_form by field group key. Only supports a single field group, but could be expanded. | |
// Just use the new action: | |
// capture-acf-form/field_group=%%%%%%%%%%% | |
// Replace %%%%%%% with your field group key. | |
/** | |
* Capture user registration form for processing. |
<?php | |
// source: http://wordpress.stackexchange.com/questions/211703/need-a-simple-but-complete-example-of-adding-metabox-to-taxonomy | |
// code authored by jgraup - http://wordpress.stackexchange.com/users/84219/jgraup | |
// REGISTER TERM META | |
add_action( 'init', '___register_term_meta_text' ); | |
function ___register_term_meta_text() { |
#!/bin/bash | |
# Install dependencies | |
# older ubuntus | |
#apt-get install build-essential libsqlite3-dev ruby1.9.1-dev | |
# xenial | |
apt install build-essential libsqlite3-dev ruby-dev | |
# Install the gem | |
gem install mailcatcher --no-ri --no-rdoc |
<?php | |
/** | |
* Get human readable time difference between 2 dates | |
* | |
* Return difference between 2 dates in year, month, hour, minute or second | |
* The $precision caps the number of time units used: for instance if | |
* $time1 - $time2 = 3 days, 4 hours, 12 minutes, 5 seconds | |
* - with precision = 1 : 3 days | |
* - with precision = 2 : 3 days, 4 hours |
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset=utf-8 /> | |
<title>JS Bin</title> | |
</head> | |
<body> | |
<h2>Original CSS</h2> | |
<style style="display: block; white-space: pre; font-family: monospace"> | |
h2 { margin:0; } |
<!-- Country List in Arabic | source: https://github.com/umpirsky/country-list -- > | |
<select name="country"> | |
<option value="AW">آروبا</option> | |
<option value="AZ">أذربيجان</option> | |
<option value="AM">أرمينيا</option> | |
<option value="ES">أسبانيا</option> | |
<option value="AU">أستراليا</option> | |
<option value="AF">أفغانستان</option> | |
<option value="AL">ألبانيا</option> | |
<option value="DE">ألمانيا</option> |
<?php | |
/* | |
This script will allow you to send a custom email from anywhere within wordpress | |
but using the woocommerce template so that your emails look the same. | |
Created by craig@123marbella.com on 27th of July 2017 | |
Put the script below into a function or anywhere you want to send a custom email | |
*/ |