Skip to content

Instantly share code, notes, and snippets.

View dansheffler's full-sized avatar

Dan Sheffler dansheffler

View GitHub Profile
@dansheffler
dansheffler / pandoc.sublime-build
Created July 12, 2016 16:20
Pandoc Build System
{
"selector": "text.html.markdown",
"path": "C:\\Users\\Dan\\AppData\\Local\\Pandoc\\;C:\\Program Files (x86)\\MiKTeX 2.9\\miktex\\bin\\",
"cmd": ["pandoc",
"--smart",
"--chapters",
"--template=C:\\Users\\Dan\\Dropbox\\Pandoc\\default.latex",
"--csl=C:\\Users\\Dan\\Dropbox\\Pandoc\\default.csl",
"--bibliography=C:\\Users\\Dan\\Dropbox\\Jabref\\mybib.bib",
"--latex-engine=xelatex",
@dansheffler
dansheffler / jQueryWordcountStyle.html
Last active June 18, 2019 03:23
Style Blockquotes based on Wordcount
<script src="/js/jquery-1.8.3.min.js"></script>
// A little clever jQuery styling of blockquotes
<script>
$('blockquote p').each(function(){
var $numWords = $(this).text().split(" ").length;
console.log($numWords)
@dansheffler
dansheffler / myjekyll.bat
Last active December 5, 2015 17:52
Jekyll Wrapper for Windows
CD C:\Users\Dan\Dropbox\dansheffler
CALL jekyll build
SET PATH=C:\cygwin64\bin;%PATH%
CD C:\cygwin64\bin
CALL bash.exe -c /usr/local/bin/myrsync.sh
@dansheffler
dansheffler / definitionlist.css
Last active September 12, 2015 19:13
Definition List CSS
dl {
padding: 0;
margin: 1.5em 0;
}
dt {
float: left;
clear: left;
font-weight: bold;
margin-right: 1em;
@dansheffler
dansheffler / definition.tex
Last active September 13, 2015 15:20
Definition Lists in MD to PDF
\usepackage[shortlabels]{enumitem}
\setlist[description]{%
labelindent=0.5in,%
leftmargin=0.5in,%
rightmargin=0.5in,%
itemsep=12pt%
}
% Put a colon after description labels
\renewcommand{\descriptionlabel}[1]{%
@dansheffler
dansheffler / default.tex
Last active June 26, 2019 17:44
default.latex
%!TEX TS-program = xelatex
%!TEX encoding = UTF-8 Unicode
\RequirePackage{etoolbox}
% $if(documentclass)$
% $if(classoption)$
% \documentclass[$for(classoption)$$classoption$$sep$,$endfor$)]{$documentclass$}
% $else$
% \documentclass[12pt,oneside]{$documentclass$}
% $endif$
@dansheffler
dansheffler / chicago.csl
Created September 12, 2015 14:54
Chicago CSL
<?xml version="1.0" encoding="utf-8"?>
<style xmlns="http://purl.org/net/xbiblio/csl" class="note" version="1.0" demote-non-dropping-particle="never" page-range-format="chicago">
<!-- This style was edited with the Visual CSL Editor (http://editor.citationstyles.org/visualEditor/) -->
<info>
<title>Chicago Manual of Style 16th edition (full note)</title>
<id>http://www.zotero.org/styles/chicago-manual-of-style-16th-edition-full-note</id>
<link href="http://www.zotero.org/styles/chicago-manual-of-style-16th-edition-full-note" rel="self"/>
<link href="http://www.chicagomanualofstyle.org/tools_citationguide.html" rel="documentation"/>
<author>
<name>Julian Onions</name>
@dansheffler
dansheffler / classinfo.yaml
Last active September 7, 2015 18:17
Pandoc Class Info in LaTeX
---
author: Dan Sheffler
title: Example Title
class: PHI 735
semester: Fall 2015
---
@dansheffler
dansheffler / openTodo.py
Last active August 29, 2015 14:27
A quick and dirty Sublime Text 3 plugin for opening my todo list with a keystroke
import sublime, sublime_plugin
class openTodoCommand(sublime_plugin.TextCommand):
def run(self, edit):
path = "/Users/dansheffler/Dropbox/Tasks/todo.taskpaper"
self.view.window().open_file(path)
@dansheffler
dansheffler / pandoc.sublime-build
Last active September 12, 2015 18:24
My build settings for Pandoc in Sublime Text
{
"selector": "text.html.markdown",
"cmd": ["pandoc",
"--smart",
"--chapters",
"--template=C:\\Users\\Dan\\Dropbox\\Pandoc\\default.latex",
"--csl=C:\\Users\\Dan\\Dropbox\\Pandoc\\default.csl",
"--bibliography=C:\\Users\\Dan\\Dropbox\\Jabref\\mybib.bib",
"--latex-engine=xelatex",
"-o",