This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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/") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!-- 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); }); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Creates three PDFs from a Beamer LyX document. | |
# Doesn't assume anything about existing options | |
# so makes all docs with new file suffixes. | |
# | |
# Added to Right-click menu with FileMenu Tools by lopesoft | |
# Pass in the filename with extension | |
filename=${1%%.*} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Creates three PDFs from a Beamer LyX document. | |
# Doesn't assume anything about existing options | |
# so makes all docs with new file suffixes. | |
# | |
# Added to Right-click menu with FileMenu Tools by lopesoft | |
# Pass in the filename with extension | |
filename=${1%%.*} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
*Make sure -mata: mata mlib index- has been executed previously | |
cap di regexm("`c(matalibs)'", "(.*);lpersonal(.*)") | |
mata: mata set matalibs "lpersonal;`=regexs(1)'`=regexs(2)'" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#! /bin/bash | |
# Wrapper for Stata batch-mode which: | |
# -issues an informative error msg and appropriate (possibly non-zero) return code | |
# -allows an implicit -do- when called with just a do file | |
# Requirements: set $STATABATCH (e.g. 'stata-mp -b') | |
# updated from Phil Schumm's version at https://gist.github.com/pschumm/b967dfc7f723507ac4be | |
args=$# # number of args |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Example usage | |
#./store-mod-install-files.sh http://fmwww.bc.edu/repec/bocode/s/synth.pkg ado-store | |
# Assumes the standard first-letter directory structure. | |
pkgfilename=$(basename "$1") | |
pkgdirpath=$(dirname "$1") | |
pkgbase="${pkgfilename%.*}" | |
pkgbase_letter=${pkgbase:0:1} | |
orig_dir=$PWD |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
#make a package-specific makefile | |
# Requirement: set the environment variable STATA_PLATFORM | |
# The platform names are: | |
# WIN (32-bit x86) and WIN64A (64-bit x86-64) for Windows; | |
# MACINTEL (32-bit Intel, GUI), OSX.X86 (32-bit Intel, console), MACINTEL64 (64-bit Intel, GUI), OSX.X8664 (64-bit Intel, console), MAC (32-bit PowerPC), and OSX.PPC (32-bit PowerPC), for Mac; | |
# LINUX (32-bit x86), LINUX64 (64-bit x86-64), SOL64, and SOLX8664 (64-bit x86-64) for Unix. | |
# To do: generate this automatically |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
*Callable from the command line for install packages from local store (that need machine-specific installation) | |
global dir_base ".." | |
* Use the -net set- line before installing other packages | |
net set ado "${dir_base}/code/ado/" | |
local letter1 = substr("`1'",1,1) | |
net install `1' , all force from("`c(pwd)'/${dir_base}/code/ado-store/`letter1'/") |
OlderNewer