Skip to content

Instantly share code, notes, and snippets.

<?php
wp_embed_register_handler( 'gist', '/https?:\/\/gist\.github\.com\/([a-z0-9]+)\/([a-z0-9]+)(#file=.*)?/i', function( $matches, $attr, $url, $rawattr ) {
$embed = sprintf(
'<script src="https://gist.github.com/%1$s/%2$s.js"></script>',
esc_attr( $matches[1] ),
esc_attr( $matches[2] )
);
return apply_filters( 'embed_gist', $embed, $matches, $attr, $url, $rawattr );
} );
.gist .file {
height: auto;
}
.wp-embed {
padding: 25px;
font: 400 14px/1.5 sans-serif;
color: #82878c;
background: #fff;
border: 1px solid #e5e5e5;
box-shadow: 0 1px 1px rgba(0, 0, 0, .05);
overflow: auto;
zoom: 1;
margin-bottom: 25px;
@y-krn
y-krn / style.css
Last active August 13, 2016 03:37
div.wpappbox {
height: auto;
background-color: #f5f5f5;
overflow: hidden;
border: 0;
padding: 5px;
clear: both;
font-family: inherit;;
background-color: #f9f9f9;
width: auto;
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>EnvironmentVariables</key>
<dict>
<key>PATH</key>
<string>/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin</string>
</dict>
<key>Label</key>