Skip to content

Instantly share code, notes, and snippets.

View bjmorgan's full-sized avatar
:atom:
Crunching numbers

Benjamin Morgan bjmorgan

:atom:
Crunching numbers
View GitHub Profile
@bjmorgan
bjmorgan / Find in OmniFocus.scpt
Last active December 24, 2015 10:49
AppleScript for triggering a search in OmniFocus from LaunchBar. Accepts text items from Launchbar (hit space, or send a text item to the script), or prompts the user for a search query.
on handle_string(the_string)
if (length of the_string is 0) then
display dialog "Search OmniFocus for:" default answer ""
end if
open location "x-launchbar:hide"
my search_in_omnifocus(the_string)
end handle_string
on search_in_omnifocus(the_search_string)
tell application "OmniFocus"
@bjmorgan
bjmorgan / VASP_5.4.4_VDATCAR_patch
Created November 18, 2017 13:22
patch for VASP 5.4.4 to write velocities in A/fs to VDATCAR
*** vasp.5.4.4/src/main.F Sat Nov 18 09:31:39 2017
--- vasp.5.4.4.vel/src/main.F Sat Nov 18 13:18:45 2017
***************
*** 479,484 ****
--- 479,485 ----
OPEN(UNIT=16,FILE=DIR_APP(1:DIR_LEN)//'DOSCAR',STATUS='UNKNOWN')
OPEN(UNIT=17,FILE=DIR_APP(1:DIR_LEN)//'OSZICAR',STATUS='UNKNOWN')
OPEN(UNIT=60,FILE=DIR_APP(1:DIR_LEN)//'PCDAT',STATUS='UNKNOWN')
+ OPEN(UNIT=62,FILE=DIR_APP(1:DIR_LEN)//'VDATCAR',STATUS='UNKNOWN')
OPEN(UNIT=61,FILE=DIR_APP(1:DIR_LEN)//'XDATCAR',STATUS='UNKNOWN')
@bjmorgan
bjmorgan / environment.py
Created August 22, 2018 08:59
Python script for reporting runtime environment
#! /usr/bin/env python3
import platform
import pip
import sys
def pip_freeze():
try:
from pip._internal.operations import freeze
except ImportError: # pip < 10.0
@bjmorgan
bjmorgan / compile
Last active January 2, 2019 21:09 — forked from CameronDevine/compile
A bash script for compiling JOSS and JOSE papers locally
#!/usr/bin/env bash
# Help text
description="A bash script for compiling JOSS and JOSE papers locally";
doc="compile [-j <journal>] [-d <doi>] [-v <volume>] [-i <issue>] [-p <page>]
[-s <submitted>] [-u <published>] [-r <review>] [-g <repository>] [-a <archive>] FILE
Compile a markdown FILE to a JOSS or JOSE paper.