Skip to content

Instantly share code, notes, and snippets.

View bquistorff's full-sized avatar

Brian Quistorff bquistorff

View GitHub Profile
@bquistorff
bquistorff / stata-highlight-gist.html
Created August 25, 2014 17:13
How to custom syntax highlight Stata gists
<!-- include in header -->
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"></script>
<!-- These below should be integrated into highlight.js -->
<link rel="stylesheet" href="http://quistorff.com/stata/stata-default.css">
<script src="http://quistorff.com/stata/highlight.pack.js"></script>
<script>
$(document).ready(function() {
$('div.line').replaceWith(function() { return this.innerHTML.concat('\n'); });
$('pre').each(function(i, block) { hljs.highlightBlock(block); });
@bquistorff
bquistorff / local-ado-install.do
Last active August 29, 2015 14:05
How to install dependencies locally
net set ado "${dir_base}/code/ado/"
* Simple module.
* Just install it once into your project. Copies of the project folder will work fine.
ssc install parallel
* Modules with machine-specific code.
* Needs to install each time you put the project folder on a new computer type.
* Needs an absolute path so let -pwd- is "${dir_base}/code"
net install synth , all force from("`c(pwd)'/${dir_base}/code/ado-store/s/")
@bquistorff
bquistorff / proj-only-ado.do
Last active August 29, 2015 14:05
Stata dependencies stored with project
//Limit to just the project ados
cap adopath - SITE
cap adopath - PLUS
cap adopath - PERSONAL
cap adopath - OLDPLACE
adopath ++ "${dir_base}/code/ado/"
*add mlibs in the new adopath to the index
mata: mata mlib index