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
| ;; ---------- 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)) |
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
| ;; 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
| /* | |
| 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 mozrepl@hyperstruct.net.xpi 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
| # VirtualBox port forwarding example (localhost:2222 -> vm:22) | |
| VBoxManage setextradata $VMNAME "VBoxInternal/Devices/pcnet/0/LUN#0/Config/guestssh/Protocol" TCP | |
| VBoxManage setextradata $VMNAME "VBoxInternal/Devices/pcnet/0/LUN#0/Config/guestssh/GuestPort" 22 | |
| VBoxManage setextradata $VMNAME "VBoxInternal/Devices/pcnet/0/LUN#0/Config/guestssh/HostPort" 2222 | |
| # or e1000 if that's the virtual nic we're using | |
| VBoxManage setextradata $VMNAME "VBoxInternal/Devices/e1000/0/LUN#0/Config/guestssh/Protocol" TCP | |
| VBoxManage setextradata $VMNAME "VBoxInternal/Devices/e1000/0/LUN#0/Config/guestssh/HostPort" 2222 | |
| VBoxManage setextradata $VMNAME "VBoxInternal/Devices/e1000/0/LUN#0/Config/guestssh/GuestPort" 22 |
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
| ;; for fhrodes, advice jump-to-register so erc always scrolls to | |
| ;; bottom after a window config restore | |
| (defadvice jump-to-register (after jump-to-register-and-scroll (register &optional del) activate) | |
| "Scroll all erc buffers to bottom after jumping to a window configuration" | |
| (when (window-configuration-p (car (get-register register))) | |
| (mapcar (lambda (b) (with-current-buffer b | |
| (when (eq major-mode 'erc-mode) | |
| (goto-char (erc-end-of-input-line)) | |
| (erc-scroll-to-bottom (get-buffer-window b t) t)))) | |
| (buffer-list)))) |
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
| ;; for fhrodes, advice jump-to-register so erc always scrolls to | |
| ;; bottom after a window config restore | |
| (defadvice jump-to-register (after jump-to-register-and-scroll (register &optional del) activate) | |
| "Scroll all erc buffers to bottom after jumping to a window configuration" | |
| (when (window-configuration-p (car (get-register register))) | |
| (mapcar (lambda (b) (with-current-buffer b | |
| (when (eq major-mode 'erc-mode) | |
| (goto-char (erc-end-of-input-line)) | |
| (erc-scroll-to-bottom (get-buffer-window b t) t)))) | |
| (buffer-list)))) |
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
| test2 | |
| test3 | |
| test4 |