Skip to content

Instantly share code, notes, and snippets.

View mathiasmadsen's full-sized avatar

Mathias Madsen mathiasmadsen

  • Klausen og Partners
  • Copenhagen
View GitHub Profile
# Parent code
<iframe
id="iframe"
src="child.html"
allowtransparency="true"
width="100%"
type="text/html"
frameborder="0"
style="width: 100%; border: none"
></iframe>
@mathiasmadsen
mathiasmadsen / .block
Created December 21, 2017 15:50
kp-test
license: mit
// Send copy, if radio checked – Based on http://www.motomax.de/wordpress/contact-form-7-send-copy-to-sender-with-checkbox-in-3-9-update/
function check_mail_send_contactform($cf7) {
//get CF7's mail and posted_data objects
$submission = WPCF7_Submission::get_instance();
if ( $submission ) {
$posted_data = $submission->get_posted_data();
}
$mail = $cf7->prop( 'mail' );
if(isset($posted_data['checkbox'][0])) { //if Checkbox checked
!function(){function t(){window.rfb.sendKey(e.shift().charCodeAt()),e.length>0&&setTimeout(t,10)}var e=prompt("Enter text to be sent to console").split("");t()}();
@mathiasmadsen
mathiasmadsen / 0_reuse_code.js
Created May 28, 2016 19:50
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
Verifying that +mathiasmadsen is my openname (Bitcoin username). https://onename.io/mathiasmadsen