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
const { CompositeDisposable, Point, Range } = require('atom'); | |
atom.commands.add('atom-text-editor', 'me:insert-number-list', () => { | |
var editor = atom.workspace.getActiveTextEditor(); | |
var selections = editor.getSelections(); | |
for (var i = 0; i < selections.length; i++) { | |
selection = selections[i] | |
selection.insertText(String(i + 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
#! /usr/bin/env python3 | |
""" | |
--------------------------------------------------------------------- | |
Program: recreation_gov_scrape.py | |
Author: Kyle Barron <barronk@mit.edu> | |
Created: 6/15/2018, 9:38:50 PM | |
Updated: 6/15/2018, 9:38:50 PM | |
Purpose: Scrape Mt. Whitney permits and email me if one is available | |
""" |
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
#! /usr/bin/env python | |
""" | |
Pandoc filter to convert svg files to pdf as suggested at: | |
https://github.com/jgm/pandoc/issues/265#issuecomment-27317316 | |
rsvg-convert or inkscape must be installed | |
""" | |
__author__ = "Jerome Robert" |
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
#! /usr/bin/env python3 | |
""" | |
--------------------------------------------------------------------- | |
Program: stata_desc.py | |
Author: Kyle Barron <barronk@mit.edu> | |
Created: 5/11/2018, 2:01:13 PM | |
Purpose: Generate markdown data codebooks for documentation | |
The command line input should be the path to the `.dta` file. |
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
#! /usr/bin/env bash | |
# This depends on `smem`, a memory reporting tool, being available on the remote server | |
# The following two commands will put the smem executable in your current directory | |
# wget https://selenic.com/repo/smem/archive/tip.tar.gz | |
# tar -xzvf tip.tar.gz --wildcards "smem-*/smem" --strip-components 1 | |
# | |
# You then need to change `smem_path` to the path on the remote server of smem | |
smem_path="/disk/homedirs/barronk-dua51929/local/bin/smem" |
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
#! /usr/bin/env bash | |
ssh barronk@age4.nber.org \ | |
-o LogLevel=QUIET \ | |
-t $'showload | sed -n \'/-----/,$p\' | sed -r \'/afserver|gruber|miller|sas|age8|age11|age12/d\' | sed -e \'/It might/,$d\'' |
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
#! /usr/bin/env bash | |
# Wrapper for "stata -b" which issues an informative error msg and appropriate | |
# (i.e., non-zero) return code | |
# The basic idea for this script (including grepping the log file to determine | |
# whether there was an error) was taken from a similar script posted by Brendan | |
# Halpin on his blog at http://teaching.sociology.ul.ie/bhalpin/wordpress/?p=122 | |
# This script was forked from https://gist.github.com/pschumm/b967dfc7f723507ac4be |
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
#! /usr/bin/env python3 | |
""" | |
--------------------------------------------------------------------- | |
Program: bigmem.py | |
Author: Kyle Barron <barronk@mit.edu> | |
Created: 3/21/2018, 11:56:17 AM | |
Updated: 3/21/2018, 11:56:20 AM | |
Purpose: Email user with notification if he/she is using all memory on a node | |
""" |
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
#! /usr/bin/env bash | |
mkdir teach-yourself-cs | |
cd teach-yourself-cs | |
# Create directory structure | |
mkdir 1_programming | |
mkdir 2_computer-architecture | |
mkdir 3_algorithms-and-data | |
mkdir 4_math-for-cs |
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
#! /usr/bin/env python3 | |
""" | |
--------------------------------------------------------------------- | |
Program: hcpcs_scrape.py | |
Author: Kyle Barron <barronk@mit.edu> | |
Created: 2/5/2018 | |
Updated: 2/5/2018 | |
Purpose: Scrape HCPCS codes from the internet | |
""" |