Skip to content

Instantly share code, notes, and snippets.

View OllyHodgson's full-sized avatar

Olly Hodgson OllyHodgson

View GitHub Profile
@OllyHodgson
OllyHodgson / SP2007-BasicStart.xsl
Created May 19, 2011 13:38
Starting point for XSL in Sharepoint 2007 Data View Web Parts
<!--
NOTE: Add the SuppressWebPartChrome="True" attribute to <WebPartPages:DataFormWebPart> to get rid of the tables SharePoint normally surrounds the web part with.
-->
<xsl:stylesheet
version="1.0"
exclude-result-prefixes="xsl msxsl ddwrt x d asp ddwrt2 SharePoint __designer"
xmlns:x="http://www.w3.org/2001/XMLSchema"
xmlns:d="http://schemas.microsoft.com/sharepoint/dsp"
xmlns:ddwrt="http://schemas.microsoft.com/WebParts/v2/DataView/runtime"
xmlns:asp="http://schemas.microsoft.com/ASPNET/20"
@OllyHodgson
OllyHodgson / buttons.html
Created March 23, 2011 15:43
A nice CSS button style for <a> elements. Tested in IE6-9, Firefox 3.6-4, Chrome 11, Safari 5, Opera 11.
<!DOCTYPE html>
<!--[if lt IE 7 ]><html class="ie6"><![endif]-->
<!--[if IE 7 ]><html class="ie7"><![endif]-->
<!--[if IE 8 ]><html class="ie8"><![endif]-->
<!--[if IE 9 ]><html class="ie9"><![endif]-->
<!--[if (gt IE 9)|!(IE)]><!--><html><!--<![endif]-->
<head>
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<meta charset="utf-8">
<title>CSS Buttons</title>
@OllyHodgson
OllyHodgson / CSS 3D toolbar.html
Created March 23, 2011 16:04
A CSS 3D toolbar style, based on my CSS buttons (https://gist.github.com/883309). Tested in IE6-9, Firefox 3.6-4, Chrome 11, Safari 5, Opera 11.
<!DOCTYPE html>
<!--[if lt IE 7 ]><html class="ie6"><![endif]-->
<!--[if IE 7 ]><html class="ie7"><![endif]-->
<!--[if IE 8 ]><html class="ie8"><![endif]-->
<!--[if IE 9 ]><html class="ie9"><![endif]-->
<!--[if (gt IE 9)|!(IE)]><!--><html><!--<![endif]-->
<head>
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<meta charset="utf-8">
<title>CSS Toolbar</title>
@OllyHodgson
OllyHodgson / countCSSRules.js
Created April 9, 2015 14:44 — forked from krisbulman/countCSSRules.js
Run this in the dev tools console to ensure none of your stylesheets have too many rules / selectors for legacy IE (IE9 and below).
function countCSSRules() {
var results = '',
log = '',
slen = document.styleSheets.length;
if (!document.styleSheets) {
return;
}
for (var i = 0; i < slen; i++) {
countSheet(document.styleSheets[i]);
}
@OllyHodgson
OllyHodgson / devtools.responsiveUI.presets
Last active August 29, 2015 14:17
Presets for the Firefox devtools Responsive Design View. Includes presets for default Bootstrap 3 grid sizes and some iPhones. To use, navigate to about:config and then add or edit the devtools.responsiveUI.presets key.
[{"key":"300x400","name":"Very small screen","width":300,"height":400},{"key":"320x480","name":"iPhone 4","width":320,"height":480},{"key":"320x568","name":"iPhone 5","width":320,"height":568},{"key":"360x640","name":"Nexus 4","width":360,"height":640},{"key":"375x667","name":"iPhone 6","width":375,"height":667},{"key":"414x736","name":"iPhone 6 Plus","width":414,"height":736},{"key":"767x1024","name":"@screen-xs-max","width":767,"height":1024},{"key":"768x1024","name":"@screen-sm-min","width":768,"height":1024},{"key":"991x1280","name":"@screen-sm-max","width":991,"height":1280},{"key":"992x1280","name":"@screen-md-min","width":992,"height":1280},{"key":"1199x801","name":"@screen-md-max","width":1199,"height":801},{"key":"1200x801","name":"@screen-lg-min","width":1200,"height":801},{"key":"1280x600","name":"Netbook","width":1280,"height":600}]