Skip to content

Instantly share code, notes, and snippets.

View mcaceresb's full-sized avatar

Mauricio Caceres Bravo mcaceresb

View GitHub Profile
@mcaceresb
mcaceresb / deleteStataComments.py
Last active August 7, 2018 16:56
Delete all comments from a Stata do file
#!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
Delete all comments from Stata file
WARNINGS
--------
Does not parse `#delimit ;`
@mcaceresb
mcaceresb / kill_clean
Last active November 27, 2017 22:54
Kill process and delete associated files
#!/usr/bin/env python2
# -*- coding: utf-8 -*-
"""Kill process and delete associated files
This script deletes all files in the system's tmp folder that have an
extension and PID in their name. By default it prompts the user for
confirmation before deleting the files.
Usage

Keybase proof

I hereby claim:

  • I am mcaceresb on github.
  • I am mcaceresb (https://keybase.io/mcaceresb) on keybase.
  • I have a public key ASBDVLkRIVhYevgYIGtleDn-H6DIO0atzke6ddBaRLeUyAo

To claim this, I am signing this object:

" ----------------------------------------------------------------------------
" Program: latex-fenced-languages.vim
" Author: github.com/mcaceresb
" Purpose: Nested highlighting in LaTeX with minted and listings
" Usage: From vim, run :so latex-fenced-languages.vim<CR>
" ---------------------------------------------------------------------
" Based on Tim Pope's vim-markdown (https://github.com/tpope/vim-markdown)
" Get list of fenced languages Vim knows about
% ---------------------------------------------------------------------
% Program: listings-sas.tex
% Author: github.com/mcaceresb
% Purpose: SAS language definition for LaTeX listings package
% Usage: Add \input{listings-sas.tex} to your preamble
% Syntax from
% - syntax/sas.vim by James Kidd <james.kidd@covance.com>
\RequirePackage{listings}
@mcaceresb
mcaceresb / listings-stata.tex
Created May 9, 2016 11:05
Listings Stata language definition
% ---------------------------------------------------------------------
% Program: listings-stata.tex
% Author: github.com/mcaceresb
% Purpose: Stata language definition for LaTeX listings package
% Usage: Add \input{listings-stata.tex} to your preamble
% Syntax from
% - https://github.com/isagalaev/highlight.js/blob/master/src/languages/stata.js
% - https://github.com/jpitblado/vim-stata/blob/master/syntax/stata.vim
% - http://fmwww.bc.edu/RePEc/bocode/s/synlightlist.ado