I hereby claim:
- I am johnghill on github.
- I am johnhill (https://keybase.io/johnhill) on keybase.
- I have a public key ASAWpW-lStXD1eEgMwJkJdw7PWTg3-56utGJk0dkgJJcxQo
To claim this, I am signing this object:
Stata: | |
"Selection Based": | |
command: "stata" | |
args: (context) -> [context.getCode()] | |
"File Based": | |
command: "stata" | |
args: (context) -> [context.filepath] |
'comment': 'Hybrid of rhoconlinux/language-do and jrgcmu/BBStata' | |
'fileTypes': [ | |
'do' | |
'ado' | |
'mata' | |
] | |
'firstLineMatch': '^#!/.*\\bdo\\b' | |
'foldingStartMarker': '^\\s*(\\w+\\s+)?(def|class|enum)\\s+([.a-zA-Z0-9_ <]+)\\s*(\\((.*)\\))?\\s*:|\\{\\s*$|\\(\\s*$|\\[\\s*$' | |
'foldingStopMarker': '^\\s*$|^\\s*\\}|^\\s*\\]|^\\s*\\)|^\\s*"""\\s*$' | |
'name': 'Stata' |
# Inspired by http://unix.stackexchange.com/questions/26284/how-can-i-use-sed-to-replace-a-multi-line-string | |
# Find character sequence [semi-colon newline] not inside a multi-line loop; replace with newline | |
perl -0777 -i.original -pe 's/\;+(?![^\{]*\})/\n/igs' *.do | |
# Find newlines within multi-line cond(,,) statement; append to single line | |
perl -0777 -i.original -pe 's/,\n[\t ]{1,}/,/igs' *.do | |
# Find multi-line labels denoted by character sequence [newline space nn "label"]; append to single line | |
# (this regex works in editors but is temperamental on command line; back reference syntax \2 $2 varies by regex flavour) | |
perl -0777 -i.original -pe 's/(\n[\s]?)([1-9][0-9]?\s\".*\")/ \2/igs' *.do |
#!/bin/sh | |
# Author: Brendan Halpin | |
# Forked from: http://teaching.sociology.ul.ie/bhalpin/wordpress/?p=122 | |
# Nov 7 2001 21:05:17 | |
# A wrapper for running Stata in batch mode. | |
# Main purpose is to catch errors and pass them to the calling | |
# process, typically "make". To do this it catches a couple of |
#!/bin/sh | |
### STEPS | |
# JabRef: Back-up original bibtex keys to new var called Orig_bibtexkey | |
# JabRef: Amend key pattern (as you do...) | |
# JabRef: Create custom export.layout file below | |
# echo '\format[GetOpenOfficeType]{\bibtextype},"\bibtexkey","\Orig_bibtexkey",' > jabref-export-keysonly.layout | |
# JabRef: Exprt to .csv, then to .txt file | |
# One line per pair of citations, each pair separated by [space] | |
# Execute this bash script on target .tex file: sh ./key-switch.sh |
## Loosely based on: https://gist.github.com/kogakure/149016 | |
## Alternative everything-but-kitchen-sink version: https://github.com/github/gitignore/blob/master/TeX.gitignore | |
latex/*.aux | |
latex/*.glo | |
latex/*.idx | |
latex/*.log | |
latex/*.toc | |
latex/*.ist | |
latex/*.acn | |
latex/*.acr |
user.name=John Hill | |
user.email=* | |
diff.external=git-meld | |
diff.tool=meld | |
merge.tool=git-meld | |
color.ui=auto | |
core.editor=subl -n -w |
#!/bin/bash | |
# | |
# Asserts that local HEAD and remote ORIGIN are at same commit i.e. avoids a mess | |
# Based on CodeGnome @ http://stackoverflow.com/a/11181747 | |
# | |
remote=$( | |
git ls-remote -h origin master | | |
awk '{print $1}' | |
) | |
local=$(git rev-parse HEAD) |
* Append to any time consuming operation e.g. -mi impute- | |
* Receive 1 free generic SMS per day, or buy a personal API key at https://textbelt.com | |
! curl -X POST https://textbelt.com/text --data-urlencode phone='+44xxxxxxxxxx' --data-urlencode message='Yo! Get back here' -d key=textbelt |
I hereby claim:
To claim this, I am signing this object: