Skip to content

Instantly share code, notes, and snippets.

View spdustin's full-sized avatar
💭
I may be slow to respond.

Dustin Miller spdustin

💭
I may be slow to respond.
View GitHub Profile
@spdustin
spdustin / README.md
Last active July 15, 2016 06:42
HN Styles

HN Styles

Just some simple CSS styles for Hacker News that I use to keep the default look and feel, but improve usability a bit.

@spdustin
spdustin / demo.scss
Created March 22, 2016 20:05
demo.scss
$bgColor: #DEDBEE;
%clear {
*zoom: 1;
&:before, &:after {
content: ' ';
display: table;
}
&:after {
clear: both;
@spdustin
spdustin / cars.xsl
Last active March 1, 2016 17:35
cars.xsl
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:output method="html" indent="yes" />
<xsl:template match="/">
<table>
<thead>
<tr>
<th>Year</th>
<th>Make</th>
<th>Model</th>
</tr>
@spdustin
spdustin / cars.xml
Created March 1, 2016 17:25
cars.xml
<cars>
<car year="1972" make="Ford" model="Pinto" explodes="yes"/>
<car year="2016" make="Toyota" model="Prius"/>
<car year="1996" make="Nissan" model="Sentra"/>
</cars>
@spdustin
spdustin / spo_contacts.css
Last active November 19, 2015 22:26
SharePoint Online Contacts List CSS
.ms-formtable td.ms-formbody, /* cell containing all form fields */
.ms-formtable td.ms-formlabel /* cell containing all form labels */
{
display: block;
width: auto;
padding: .5em 1em;
}
.ms-formtable td * /* resize everything inside the cells */
{
@spdustin
spdustin / highcharts_5.xsl
Created July 10, 2015 22:02
Highcharts (with params and improved csv)
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:param name="xAxis">Date</xsl:param>
<xsl:param name="Series1">Total</xsl:param>
<xsl:param name="Series2">Subtotal</xsl:param>
<xsl:output method="html" indent="yes"/>
<xsl:template match="/">
<script src="http://code.highcharts.com/highcharts.js"></script>
<div id="container" style="min-width: 310px; max-width: 800px; height: 400px; margin: 0 auto"></div>
<div id="container2" style="min-width: 310px; max-width: 800px; height: 400px; margin: 0 auto"></div>
<script type="text/javascript">
@spdustin
spdustin / highcharts_4.xsl
Created July 10, 2015 21:37
Highcharts, part 4 (multiple series)
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:output method="html" indent="yes"/>
<xsl:template match="/">
<script src="http://code.highcharts.com/highcharts.js"></script>
<div id="container" style="min-width: 310px; max-width: 800px; height: 400px; margin: 0 auto"></div>
<div id="container2" style="min-width: 310px; max-width: 800px; height: 400px; margin: 0 auto"></div>
<script type="text/javascript">
<![CDATA[
$('#container').highcharts({
chart: {
@spdustin
spdustin / highcharts_part3.xsl
Created July 10, 2015 16:36
Highcharts (bar chart and pie chart)
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:output method="html" indent="yes"/>
<xsl:template match="/">
<script src="http://code.highcharts.com/highcharts.js"></script>
<div id="container" style="min-width: 310px; max-width: 800px; height: 400px; margin: 0 auto"></div>
<div id="container2" style="min-width: 310px; max-width: 800px; height: 400px; margin: 0 auto"></div>
<script type="text/javascript">
<![CDATA[
$('#container').highcharts({
chart: {
@spdustin
spdustin / highcharts_a.xsl
Created July 9, 2015 19:46
Highcharts (pre-updatepanel)
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:output method="html" indent="yes"/>
<xsl:strip-space elements="script"/>
<xsl:template match="/">
<script src="//cdnjs.cloudflare.com/ajax/libs/jquery/2.1.4/jquery.min.js" type="text/javascript"/>
<script src="http://code.highcharts.com/highcharts.js"></script>
<div id="container" style="min-width: 310px; max-width: 800px; height: 400px; margin: 0 auto"></div>
<script type="text/javascript">
@spdustin
spdustin / faq_redux.xsl
Created July 9, 2015 19:18
Updated Expanding/Collapsing FAQ (with wpclick killer)
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:param name="WPQ"/>
<!-- This XSL Stylesheet created by SharePoint Experts, Inc. -->
<!-- http://sharepointexperience.com -->
<xsl:output method="html" indent="yes"/>
<!-- This template is the "wrapper" or "container" for the custom view. -->
<xsl:template match="/">
<!-- This is the actual wrapper element that will be emitted -->
<dl class="faq">
<!-- This will tell the data view to look for the actual content