Skip to content

Instantly share code, notes, and snippets.

View cameronwp's full-sized avatar

Cameron Pittman cameronwp

View GitHub Profile
Fun with application window titles ([[https://tecosaur.github.io/emacs-config/config.html#window-title][format source]], [[https://www.reddit.com/r/emacs/comments/jtoomj/org_docs_get_title/][getting the title source]], [[https://emacsredux.com/blog/2020/06/14/checking-the-major-mode-in-emacs-lisp/][testing mode source]],
[[https://www.gnu.org/software/emacs/manual/html_node/elisp/_0025_002dConstructs.html][%-constructs]], [[https://emacs.stackexchange.com/a/45424/38020][getting path relative to project root source]]). When in org-mode, use the file title. Otherwise use the filename and project with
some exceptions. Indicate if the file has been modified. The desired end result is below.
(Assumes you're using projectile)
*Org Roam*
: Org Mode Title - Doom Emacs
: *Org Mode Title - Doom Emacs
*Files in a Project*
// Place your key bindings in this file to overwrite the defaults
[
{ "key": "shift+cmd+]", "command": "workbench.action.nextEditor",
"when": "editorFocus" },
{ "key": "shift+cmd+[", "command": "workbench.action.previousEditor",
"when": "editorFocus" },
{ "key": "alt+t", "command": "workbench.action.tasks.test" },
{ "key": "cmd+k cmd+u", "command": "extension.changeCase.upper", "when": "editorTextFocus" },
{ "key": "cmd+k cmd+l", "command": "extension.changeCase.lower", "when": "editorTextFocus" },
{ "key": "cmd+enter", "command": "workbench.action.debug.start", "when": "!inDebugMode" },
@cameronwp
cameronwp / brackets.md
Created February 3, 2016 17:11
Bracket Highlighting

Step 1: Install Sublime Text 3 - https://www.sublimetext.com/3

  • it's technically $70 but it's also free to try forever - you'll just get a popup every couple saves asking you to buy it

Step 2: Install Bracket Highlighter - https://facelessuser.github.io/BracketHighlighter/installation/

  • Follow the "Package Control" instructions step-by-step

Step 2: Open a file with SQL in Sublime Text

Step 3: If the syntax isn't already highlighted, go to View > Syntax > SQL

// Inspired by http://www.dustindiaz.com/async-method-queues
// also helpful http://www.mattgreer.org/articles/promises-in-wicked-detail/
function Queue() {
this._methods = [];
this._flushing = false;
}
Queue.prototype = {
add: function(fn) {
this._methods.push(fn);
gateways/evalutations.py
@ndb.tasklet
def executeAndEvaluate(self, submission, node, calling_url=None):
"""Wrapper for chaining execution and evaluation with conditional behavior.
Args:
submission: The submission to execute and evaluate
node: The content node for the submission
calling_url: The path used by a calling Action, if applicable. For logging only