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
;; (load "foo.el") | |
stat64("/usr/share/emacs/23.2/site-lisp/foo.el.elc", 0xbf87b5d0) = -1 ENOENT (No such file or directory) | |
stat64("/usr/share/emacs/23.2/site-lisp/foo.el.elc.gz", 0xbf87b5d0) = -1 ENOENT (No such file or directory) | |
stat64("/usr/share/emacs/23.2/site-lisp/foo.el.el", 0xbf87b5d0) = -1 ENOENT (No such file or directory) | |
stat64("/usr/share/emacs/23.2/site-lisp/foo.el.el.gz", 0xbf87b5d0) = -1 ENOENT (No such file or directory) | |
stat64("/usr/share/emacs/23.2/site-lisp/foo.el", 0xbf87b5d0) = -1 ENOENT (No such file or directory) | |
stat64("/usr/share/emacs/23.2/site-lisp/foo.el.gz", 0xbf87b5d0) = -1 ENOENT (No such file or directory) |
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
# convert multipage pdf to single page tiff | |
gs -q -dNOPAUSE -dBATCH -sDEVICE=tiffg4 -sOutputFile=%04d.tif source.pdf -c qui | |
# or use -sDEVICE=pgmraw to convert to pgm | |
# unpaper, rotate the logical page 90 degrees, each logical page contained two scanned physical pages, so we use --layout double (for input) and --output-pages 2 since we want to split these two pages. | |
unpaper -v --deskew-scan-deviation 3.0 --border-align top --deskew-scan-range 15 --no-grayfilter --no-blurfilter --no-noisefilter --overwrite --pre-rotate 90 --border-scan-step 4 --layout double --output-pages 2 %04d.pgm.pbm unpaper%04d.pbm | |
# trim the pages and convert the to single-page pdfs | |
find . -name 'unpaper*' | xargs -i -n1 -P6 convert -trim +repage {} {}.pdf |
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
;; discussed this with jlf and turbofail in #emacs | |
;; say we want a function face-at-pos, and we attempt to do | |
;; it by fletting `point' and using `face-at-point' | |
(defun face-at-pos (pos) | |
"return the face at position p using face-at-point" | |
(flet ((point () pos)) | |
(face-at-point))) ;; face-at-point uses `point' internally |
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
# DE0 board pin & Location Assignments | |
# ========================== | |
set_location_assignment PIN_B1 -to LEDG[9] | |
set_location_assignment PIN_B2 -to LEDG[8] | |
set_location_assignment PIN_C2 -to LEDG[7] | |
set_location_assignment PIN_C1 -to LEDG[6] | |
set_location_assignment PIN_E1 -to LEDG[5] | |
set_location_assignment PIN_F2 -to LEDG[4] | |
set_location_assignment PIN_H1 -to LEDG[3] | |
set_location_assignment PIN_J3 -to LEDG[2] |
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
(progn | |
(shell "mysh") | |
(insert "cd /tmp") | |
(comint-send-input) | |
(insert "ls -alG") | |
(comint-send-input)) | |
Debugger entered--Lisp error: (error "Marker does not point anywhere") | |
ansi-color-apply-on-region(#<marker in no buffer> #<marker at 9 in mysh>) |
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
test | |
test | |
test |
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 |
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
# 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 |