Skip to content

Instantly share code, notes, and snippets.

@ChrisLTD
ChrisLTD / key-fingerprint
Last active December 2, 2018 23:19 — forked from hasssan/key-fingerprint
view your ssh public key's fingerprint; compare this to what Github has listed in the ssh key audit
# Old format
$ ssh-keygen -l -f ~/.ssh/id_rsa.pub
# New format
$ ssh-keygen -l -E md5 -f ~/.ssh/id_rsa.pub
@ChrisLTD
ChrisLTD / recalculate-acf-locations.php
Last active November 22, 2021 15:40 — forked from RadGH/recalculate-acf-locations.php
Update ACF location fields
<?php
// Update google map latitude/longitude after importing, using address
//
// https://support.advancedcustomfields.com/forums/topic/how-to-update-google-map-latitudelongitude-after-importing-using-address/
// https://gist.githubusercontent.com/RadGH/428bd8133c34dae60c0c/raw/fbfb0536abd1afc0fad1d2ed2b51c69304406c78/recalculate-acf-locations.php
//
// INSTRUCTIONS
// 1. Grab the file from this Gist and upload it to your theme.
// 2. Configure the options in the variable $ld_recalc. You MUST set the post type, and set the different field keys (see Finding the Field Key).
// 3. Call the file at the top of your functions.php script using include "recalculate-acf-locations.php";
@ChrisLTD
ChrisLTD / pardot-form-handler-iframe.html
Created October 19, 2017 20:51 — forked from afischoff/pardot-form-handler-iframe.html
Example of using a hidden iframe to pass data to a Pardot form handler before continuing with normal form submission.
<html>
<head>
<title>Pardot Example Form Handler Submit</title>
<!-- Include jQuery -->
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js"></script>
<!-- Post to Pardot function -->
<script type="text/javascript">
// set the pardot form handler url and form element id
@ChrisLTD
ChrisLTD / 1-tablemarkup.html
Created April 26, 2012 14:37 — forked from paulirish/1-tablemarkup.html
whitespace use for html/css readability
<!-- formatting fun #1: tables! -->
<!-- use whitespace to mimic the layout you want. leave off optional end tags for readability -->
<table>
<caption>Selector engines, parse direction</caption>
<thead>
<tr><th>Left to right <th>Right to left
<tbody>
<tr><td>Mootools <td>Sizzle
@ChrisLTD
ChrisLTD / gist:988796
Created May 24, 2011 14:25 — forked from anonymous/gist:988792
Add Custom CSS to MCE Editor
add_filter('mce_css', 'my_editor_style');
function my_editor_style($url) {
if ( !empty($url) )
$url .= ',';
// Change the path here if using sub-directory
$url .= trailingslashit( get_stylesheet_directory_uri() ) . 'editor-style.css';
return $url;