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
#! /bin/bash | |
GCC_VERSION="5.2.0" | |
WORKDIR="$HOME/src/" | |
INSTALLDIR="/platform" | |
## NOTE: XCode must be installed (through App Store) and the following run to install command-line tools. | |
## THIS IS IMPORTANT! Among other things, it creates '/usr/include' and installs the system header files. | |
# xcode-select --install |
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
(defun org-latex-export-region-to-pdf (beg end &optional no-declutter) | |
"Export the current region to pdf, prompting for output filename. | |
This can be done by narrowing region, but it's a bit slow, and | |
the output is ugly and cluttered. More importantly, it also | |
writes the pdf file for the region using the name of the | |
original file, which is obviously annoying. | |
with NO-DECLUTTER non-nil, don't declutter the pdf output." | |
(interactive (if (region-active-p) |
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
(defun eshell-default-prompt-function () | |
(interactive) | |
(concat | |
(system-name) ":" | |
(propertize (car (last (split-string (pwd-repl-home (eshell/pwd)) "/"))) 'face | |
`(:foreground "#cdcd00")) | |
(or (curr-dir-git-branch-string (eshell/pwd))) | |
(propertize "# " 'face 'default))) | |
(defun eshell-short-prompt-function () |
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
(defvar eshell-previous-buffer nil) | |
(defvar eshell-session-alist nil) | |
(defun dwc-switch-to-terminal (arg) | |
(interactive "p") | |
(if (eq arg 4) | |
(progn | |
(let ((sesh (alist-get (current-buffer) eshell-session-alist))) | |
(if sesh | |
(progn |
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
(defun sgml-copy-or-kill-element (arg) | |
(interactive "P") | |
(let ((cut-tag (lambda () | |
(let ((beg (point)) | |
(end (save-excursion (sgml-skip-tag-forward 1) | |
(point)))) | |
(kill-ring-save beg end) | |
(when arg | |
(delete-region beg end)))))) | |
(save-excursion (if (sgml-beginning-of-tag) |
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
(defvar python-shell-send-code-step-on-function nil | |
"If non-nil, step sending a function to the python interpreter.") | |
(defun python-shell-step-after-defun () | |
(forward-paragraph) | |
;; when at last paragraph, don't step to beginning of "next" paragraph | |
(unless (equal (line-number-at-pos (point)) | |
(progn (forward-paragraph) (line-number-at-pos (point)))) | |
(backward-paragraph) | |
(forward-line 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
(defvar python-shell-send-code-step-on-function nil | |
"If non-nil, step sending a function to the python interpreter.") | |
(defun python-shell-step-after-defun () | |
(forward-paragraph) | |
;; when at last paragraph, don't step to beginning of "next" paragraph | |
(unless (equal (line-number-at-pos (point)) | |
(progn (forward-paragraph) (line-number-at-pos (point)))) | |
(backward-paragraph) | |
(forward-line 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
(defvar python-shell-send-code-step-on-function nil | |
"If non-nil, step sending a function to the python interpreter.") | |
(defun python-shell-step-after-defun () | |
(forward-paragraph) | |
;; when at last paragraph, don't step to beginning of "next" paragraph | |
(unless (equal (line-number-at-pos (point)) | |
(progn (forward-paragraph) (line-number-at-pos (point)))) | |
(backward-paragraph) | |
(forward-line 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
attrs = ["other_exceptions", | |
"deletes", | |
"encode_exceptions", | |
"english_count", | |
"total_fails", | |
"total_parses", | |
"file_count"] | |
history = dict(zip(attrs, [0] * len(attrs))) |
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
import json | |
import gzip | |
import io | |
def read_json(filename, gz=None): | |
""" | |
Read in comma-newline delimited json files encoded in latin-1. | |
""" | |
_io = gzip.io if gz else io |
NewerOlder