Skip to content

Instantly share code, notes, and snippets.

@godbyk
godbyk / boxstarter.ps1
Last active August 29, 2015 14:12
Boxstarter script
Set-WindowsExplorerOptions -EnableShowHiddenFilesFoldersDrives -EnableShowProtectedOSFiles -EnableShowFileExtensions
Enable-RemoteDesktop
cinst git
cinst javaruntime
cinst dotnet4.5
cinst notepadplusplus
cinst 7zip
cinst sysinternals
cinst putty
@godbyk
godbyk / fullwidth-minipage
Created March 16, 2012 21:47
Minipage similar to full-width environment -- with nice spacing
\documentclass{tufte-handout}
%% Just draws a baseline grid on the page
\usepackage{pagegrid}
\pagegridsetup{
top-left,
step=\baselineskip,
arrowlength=1pt,
}
% End baseline grid code
@godbyk
godbyk / gist:1291896
Created October 17, 2011 03:43
Adjust the spacing between the footnote number and the footnote text
\makeatletter
\renewcommand\@makefntext[1]{%
\parindent 1em%
\noindent
\hb@xt@1.8em{\hss\@makefnmark}#1}
% Adjust 1.8em to be a larger value
\makeatother
@godbyk
godbyk / gist:1176128
Created August 28, 2011 01:42
Euro symbol for LaTeX
\documentclass{article}
\usepackage[utf8]{inputenc}
\usepackage{eurosym}
% Let's us use € to get the \euro command from the eurosym package.
\DeclareUnicodeCharacter{20AC}{\euro}
\begin{document}
@godbyk
godbyk / gist:1155673
Created August 19, 2011 00:10
paralist
\documentclass{article}
\usepackage{nth}
\usepackage{paralist}
% Use \parenpointedenum *before* the \begin{inparaenum} environment
% to make the labels (X.Y.Z).
\makeatletter
\def\parenpointedenum{%
\pl@pointxxxenum
@godbyk
godbyk / gist:1153016
Created August 18, 2011 00:36
How to optionally print text in LaTeX and TeX
\usepackage{ifthen}
\newboolean{includetext}
\newcommand{\mytext}{%
\ifthenelse{\boolean{includetext}}{%
YOUR TEXT GOES HERE
}{}%
}
@godbyk
godbyk / usecase.sty
Created March 21, 2011 06:58
Environment for typesetting UML use cases
%
% A simple description-like environment that can be used for writing UML use
% cases.
%
\NeedsTeXFormat{LaTeX2e}[1994/06/01]
\ProvidesPackage{usecase}[2011/03/21 v0.1 A usecase environment.]
%
% Required so we can use inline arithmetic in the usecase environment
\documentclass{article}
\usepackage{clrscode3e}
% The "codebox" environment produces an unbreakable section of code
\newenvironment{tinycodebox}{%
\tiny% or \small or \footnotesize or whatever size works best
\codebox
}{%
\endcodebox