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
/*--- waitForKeyElements(): A utility function, for Greasemonkey scripts, | |
that detects and handles AJAXed content. | |
Usage example: | |
waitForKeyElements ( | |
"div.comments" | |
, commentCallbackFunction | |
); |
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
-module(index). | |
-export([get_file_contents/1,show_file_contents/1, index/1, index_map/1, index_helper/3, add_line_number/2]). | |
% Used to read a file into a list of lines. | |
% Example files available in: | |
% gettysburg-address.txt (short) | |
% dickens-christmas.txt (long) | |
% Get the contents of a text file into a list of lines. |
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
-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} |
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
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 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 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 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 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 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 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]] |
NewerOlder