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
| /* | |
| MozRepl setup for Conkeror and firefox-x11-devel-standalone | |
| Reference: | |
| http://conkeror.org/MozRepl -- Conkeror Wiki | |
| https://github.com/bard/mozrepl/wiki -- MozRepl Wiki | |
| https://github.com/bard/mozrepl/wiki/Use-with-Conkeror | |
| */ | |
| // 1. download [email protected] in ~/conkeror/extensions/ |
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
| ;; Parenscript example | |
| ;;; /tmp/foo.lisp | |
| (defun foo-bar-baz () | |
| "foo bar baz" | |
| (mapcar (lambda (x) (+ 1 x)) (list 1 2 3))) | |
| ;; compile foo.lisp to foo.js | |
| (with-open-file (stream "/tmp/foo.js" :direction :output :if-exists :supersede) | |
| (format stream (ps-compile-file "/tmp/foo.lisp"))) |
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
| # installing a device family on quartus (tested on quartus 11.0 for linux) | |
| # install Cyclone III support | |
| ./quartus_sh --qinstall -qda "/path/to/devices/subscription/cycloneiii.qda" -show_qt_progress |
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
| ;; ---------- Objective-C | |
| ;; load objc-mode for objective-C header files | |
| (add-to-list 'magic-mode-alist | |
| `(,(lambda () | |
| (and (string= (file-name-extension buffer-file-name) "h") | |
| (re-search-forward "@\\<interface\\>" magic-mode-regexp-match-limit t))) | |
| . objc-mode)) |
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
| ;; ---------- Objective-C | |
| ;; load objc-mode for objective-C header files | |
| (add-to-list 'magic-mode-alist | |
| `(,(lambda () | |
| (and (string= (file-name-extension buffer-file-name) "h") | |
| (re-search-forward "@\\<interface\\>" magic-mode-regexp-match-limit t))) | |
| . objc-mode)) | |
| ;;set .m <-> .h correspondence for ff-find-other-file | |
| (add-hook 'objc-mode-hook |
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
| ;; Objective-C | |
| ;; load objc-mode for Objective-C header files | |
| (add-to-list 'magic-mode-alist | |
| `(,(lambda () | |
| (and (string= (file-name-extension buffer-file-name) "h") | |
| (re-search-forward "@\\<interface\\>" | |
| magic-mode-regexp-match-limit t))) | |
| . objc-mode)) | |
| ;;set .m <-> .h correspondence for ff-find-other-file |
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 Ring:disconnect_ring(other_ring) | |
| local mapEntry= self.other_rings[other_ring] | |
| local tangent= mapEntry.tangent | |
| klog.debug("DISCONNECTING %s(%s) -> %s(%s) ", self.id, tostring(self), other_ring.id, tostring(other_ring), tostring(mapEntry.tangent)) | |
| if not mapEntry then | |
| log.warning("Trying to disconnect %d from %d but no previous connection existed", self.id, other_ring.id) | |
| end | |
| self.other_rings[other_ring]= nil -- other_ring is not mapped anymore |
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 'url) | |
| (let ((url-request-method "POST") | |
| (url-request-extra-headers '(("Content-Type" . "application/x-www-form-urlencoded"))) | |
| (url-request-data "field1=Hello&field2=from&field3=Emacs")) | |
| (with-current-buffer (url-retrieve-synchronously "http://example.net/foo/bar") (buffer-string))) ;; C-x C-e here to POST |
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
| ;; X looks | |
| (setq initial-frame-alist | |
| '((menu-bar-lines . 0) | |
| (tool-bar-lines . 0) | |
| (horizontal-scroll-bars . nil) | |
| (vertical-scroll-bars . nil) | |
| (foreground-color . "bisque2") | |
| (background-color . "dark slate gray") | |
| (cursor-color . "orange") | |
| (mouse-color . "dark slate gray") |
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
| 2: [ [ 3, 3, 3 ] | |
| [ 1, 2, 3 ] | |
| [ 4, a, c ] ] | |
| ;; V D | |
| 1: 6 c + 36 + 3 a - 24 - 9 a - 3 c |