This file contains hidden or 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
| function dine() { | |
| local tmpfile | |
| # tmpfile=$(mktemp -p "${TMPDIR:-/tmp}" "dine-XXXX.${1:-tmp}") | |
| tmpfile=$(mktemp "dine-XXXX.${1:-tmp}") | |
| dospath=$(cygpath -ma "$tmpfile") | |
| echo "$tmpfile -> $dospath" | |
| touch "$tmpfile" | |
| tee "$tmpfile" | |
| if [[ -s "$tmpfile" ]] ; then | |
| Emacsclient -n "$dospath" |
This file contains hidden or 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
| #+begin_example | |
| HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Enum\HID\VID_046D&PID_C016\8&366fb2e2&0&0000\Device Parameters | |
| #+end_example | |
| [[http://superuser.com/questions/310681/inverting-direction-of-mouse-scroll-wheel]] |
This file contains hidden or 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-table-kill-column (margin-width) | |
| "Kill a column from the table. | |
| Cut in on each side by MARGIN-WIDTH; use 0 to keep the column delimiters." | |
| (interactive "p") | |
| (if (not (org-at-table-p)) | |
| (error "Not at a table")) | |
| (org-table-find-dataline) | |
| (org-table-check-inside-data-field) | |
| (kill-new "") | |
| (let* ((col (org-table-current-column)) |
This file contains hidden or 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
| ' '.join([w for i,w in enumerate(sentence.split(),1) if i in (17,23)]) |
This file contains hidden or 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
| % python | |
| Python 2.7.5 (default, Jun 4 2013, 21:44:14) | |
| [GCC 4.2.1 Compatible Apple LLVM 4.2 (clang-425.0.27)] on darwin | |
| Type "help", "copyright", "credits" or "license" for more information. | |
| >>> 2+2 | |
| 5 |
This file contains hidden or 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
| ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; | |
| ;; helm info | |
| (defvar mrc-helm-context-info-alist | |
| '(((emacs-lisp-mode lisp-interaction-mode inferior-emacs-lisp-mode) | |
| . (helm-source-info-elisp helm-source-info-cl helm-source-info-emacs)) | |
| ((org-mode) . (helm-source-info-org)) | |
| ((lisp-mode) . ((name . "Hyperspec") (info-index . "ansicl") | |
| ((name . "Iterate") (info-index . "iterate"))))) | |
| "Alist of modes to Helm sources. |
This file contains hidden or 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
| (require 'deferred) | |
| (require 'request) | |
| (require 'request-deferred) | |
| (defun extract-title () | |
| (goto-char (point-min)) | |
| (let* ((start-string "<title>") | |
| (end-string "</title>") | |
| (start (search-forward start-string)) | |
| (end (- (search-forward end-string) (length end-string)))) |
This file contains hidden or 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
| function ine() { | |
| local tmpfile | |
| tmpfile=$(mktemp "ine-XXXX.${1:-tmp}") | |
| echo "$tmpfile" | |
| touch "$tmpfile" | |
| tee "$tmpfile" | |
| emacsclient -n "$tmpfile" | |
| ( sleep 5 ; rm "$tmpfile" ) & | |
| } |
This file contains hidden or 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
| -module(assignment). | |
| -export([area/1, perimeter/1, enclose/1, | |
| testArea/0, testPerimeter/0, testEnclose/0, | |
| bits/1, bitsDirect/1, bitsTailRecursive/1, | |
| testBits/0, | |
| testAll/0, allTestsPass/0]). | |
| %% circle: {circle, Radius} | |
| %% square: {square, Length} | |
| %% rectangle: {rectangle, Length, Width} |