Skip to content

Instantly share code, notes, and snippets.

View dansheffler's full-sized avatar

Dan Sheffler dansheffler

View GitHub Profile
# Open BibDesk and clear any search or group selection
tell application "BibDesk"
do shell script "open -a bibdesk"
set libGroups to the library groups of the front document
set group selection of front document to libGroups
set filter field of front document to ""
end tell
# Bring the main BibDesk window to the front
set theTitle to "mybib.bib"
@dansheffler
dansheffler / MyWiki.py
Created May 7, 2015 10:54
MyWikiLinks
import sublime, sublime_plugin, os, re, subprocess
class FollowWikiLinkCommand(sublime_plugin.TextCommand):
def run(self, edit):
settings = sublime.load_settings('MyWiki.sublime-settings')
directory = settings.get('wiki_directory')
directory = os.path.expanduser(directory)
extension = settings.get('wiki_extension')
# Free Will Problem #
Under this heading I mean to separate off those issues of
[[Freedom]] that have to do with the *metaphysical* problem of free
will and determinism. As opposed to political or theological
freedom. This is also distinct from the problem of the compatibility
of free will and divine foreknowledge.
According to [[Peter van Inwagen]]'s proposal we should understand
the "problem of free will" as (I am glossing):
[
{ "keys": ["ctrl+super+f"], "command": "make_footnote"}
]
@dansheffler
dansheffler / zettel_link.tmLanguage
Last active May 7, 2021 21:31
A syntax definition for Sublime Text 3 that extends Academic Markdown to include my own wiki-style links
@dansheffler
dansheffler / myJekyll.py
Last active August 29, 2015 14:27
Quick and dirty Sublime Text 3 plugin to create a new Jekyll post.
import sublime, sublime_plugin, time
class MyJekyllCommand(sublime_plugin.TextCommand):
def run(self, edit):
self.view.window().show_input_panel("Name of New Post", "", self.create_post, None, None)
def create_post(self, theTitle):
date = time.strftime("%Y-%m-%d-")
safeTitle = date + theTitle.lower().replace(" ","-")
path = "/Users/dansheffler/Dropbox/dansheffler/_posts/" + safeTitle + ".md"
@dansheffler
dansheffler / Default (Windows).sublime-keymap
Created August 11, 2015 21:25
InsertDate key command
{ "keys": ["ctrl+k", "ctrl+d"], "command": "insert_date" },
@dansheffler
dansheffler / myInsertDate.py
Last active August 29, 2015 14:27
A quick Sublime Text plugin for inserting the date at the current cursor position
import sublime, sublime_plugin, time
class insertDateCommand(sublime_plugin.TextCommand):
def run(self, edit):
date = time.strftime("%Y-%m-%d")
self.view.insert(edit, self.view.sel()[0].begin(), date)
@dansheffler
dansheffler / pandoc.sublime-build
Last active September 12, 2015 18:24
My build settings for Pandoc in Sublime Text
{
"selector": "text.html.markdown",
"cmd": ["pandoc",
"--smart",
"--chapters",
"--template=C:\\Users\\Dan\\Dropbox\\Pandoc\\default.latex",
"--csl=C:\\Users\\Dan\\Dropbox\\Pandoc\\default.csl",
"--bibliography=C:\\Users\\Dan\\Dropbox\\Jabref\\mybib.bib",
"--latex-engine=xelatex",
"-o",
@dansheffler
dansheffler / openTodo.py
Last active August 29, 2015 14:27
A quick and dirty Sublime Text 3 plugin for opening my todo list with a keystroke
import sublime, sublime_plugin
class openTodoCommand(sublime_plugin.TextCommand):
def run(self, edit):
path = "/Users/dansheffler/Dropbox/Tasks/todo.taskpaper"
self.view.window().open_file(path)