Skip to content

Instantly share code, notes, and snippets.

View Ramoonus's full-sized avatar
🏠
Working from home

Ramon van Belzen Ramoonus

🏠
Working from home
View GitHub Profile
@markjaquith
markjaquith / fix-twitter-https.php
Created January 21, 2014 02:14
Fix Twitter embeds in WordPress < 3.8.1
<?php
add_filter( 'oembed_providers', 'oembed_fix_twitter', 10, 1 );
function oembed_fix_twitter( $providers ) {
$providers[ '#https?://(www\.)?twitter\.com/.+?/status(es)?/.*#i' ] = array( 'https://api.twitter.com/1/statuses/oembed.{format}', true );
return $providers;
}
@GaryJones
GaryJones / gist:1901483
Created February 24, 2012 15:03
Media query sizes defined with meta tag.
<head>
<meta name="media" content="large=screen and (min-device-width:1024px)" />
<meta name="media" content="medium=screen and (min-device-width:640px and max-device-width:320px)" />
<meta name="media" content="tiny=screen and (max-device-width:320px)" />
<meta name="media" content="foo=print" />
</head>
<body>
<!-- whatever the decided content markup is, but referencing the meta values -->
<picture alt="...">
@GaryJones
GaryJones / .htaccess
Created February 8, 2012 15:31
.htaccess conditional application/xhtml+xml serving solutions
# Contains a list of potential solutions to amend and investigate later.
# http://www.xml.com/pub/a/2003/03/19/dive-into-xml.html
RewriteEngine on
RewriteBase /
RewriteCond %{HTTP_ACCEPT} application/xhtml\+xml
@mikejolley
mikejolley / template-stock-report.php
Created December 5, 2011 20:18
WooCommerce - Stock Report. A template page snippet to (if you are logged in as admin) output a list of products/stock (which you are managing stock for) ready for printing.
<?php
/*
Template Name: Stock Report :)
*/
if (!is_user_logged_in() || !current_user_can('manage_options')) wp_die('This page is private.');
?>
<!DOCTYPE HTML>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
@mikejolley
mikejolley / template-print-processing-orders.php
Created November 4, 2011 12:45
WooCommerce - Print Processing orders. A template page snippet to (if you are logged in as admin) output all of your orders with 'processing' status (paid) ready for printing.
<?php
/*
Template Name: Print Processing Orders :)
*/
if (!is_user_logged_in() || !current_user_can('manage_options')) wp_die('This page is private.');
?>
<!DOCTYPE HTML>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />