Skip to content

Instantly share code, notes, and snippets.

@miwebguy
miwebguy / print.css
Last active November 9, 2022 05:17 — forked from anonymous/print.css
Print Style Sheet
@page { size: A4 portrait }
body {
font: 13pt Georgia, "Times New Roman", Times, serif;
line-height: 1.3;
background: #fff !important;
color: #000;
}
@miwebguy
miwebguy / gist:8ebbf1255961fe5bfa6f7d7e8559a4ac
Created June 27, 2016 15:16 — forked from betweenbrain/gist:5405671
Use cURL and SimpleXML to retrieve and parse Wordpress RSS feed
<?php
$curl = curl_init();
curl_setopt_array($curl, Array(
CURLOPT_URL => 'http://blogs.guggenheim.org/map/feed/',
CURLOPT_USERAGENT => 'spider',
CURLOPT_TIMEOUT => 120,
CURLOPT_CONNECTTIMEOUT => 30,
CURLOPT_RETURNTRANSFER => TRUE,
@miwebguy
miwebguy / aria-controls.js
Created March 17, 2016 12:34 — forked from adactio/aria-controls.js
Show and hide content with "aria-controls" buttons.
// Licensed under a CC0 1.0 Universal (CC0 1.0) Public Domain Dedication
// http://creativecommons.org/publicdomain/zero/1.0/
(function (win, doc) {
'use strict';
if (!doc.querySelectorAll || !win.addEventListener) {
// doesn't cut the mustard.
return;
}
var toggles = doc.querySelectorAll('[aria-controls]');
var togglecount = toggles.length;