- html5 game developing
- algorithm
- javascript ninjia
- elisp
- css/html5 webplatform.org
- https://github.com/addyosmani/backbone-fundamentals/
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 adapt-minimap-to-current-buffer () | |
(interactive) | |
(when (null minimap-bufname) | |
(close-all-minimap-buffer) | |
(minimap-new-minimap))) | |
(defun close-all-minimap-buffer () | |
(interactive) | |
(let ((windows (window-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
;; -- start playing around -- ;; | |
(defun minimap-reset () | |
(interactive) | |
(minimap-delete-window-and-buffer) | |
(setq minimap-start nil) | |
(setq minimap-end nil) | |
(setq minimap-active-overlay nil) | |
(setq minimap-bufname nil) | |
(setq minimap-timer-object nil) | |
(setq minimap-active-minimaps 0) |
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 clear-shell () | |
(interactive) | |
(let ((comint-buffer-maximum-size 0)) | |
(comint-truncate-buffer))) | |
(define-key shell-mode-map (kbd "C-l") 'clear-shell) | |
(defun delete-completion-window-buffer (output) | |
(interactive) | |
(dolist (win (window-list)) | |
(when (string= (buffer-name (window-buffer win)) "*Completions*") |
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 isml () | |
(interactive) | |
(when (get-buffer "*sml*") | |
(with-current-buffer "*sml*" | |
(when (process-live-p "sml") | |
(comint-send-eof))) | |
(sleep-for 0.1)) | |
(sml-run "sml" "")) |
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 ya-buffer-file-name-body () | |
"yet-another buffer-file-name-body function. FOR FUN!" | |
(interactive) | |
(car (split-string | |
(car (last (split-string | |
(buffer-file-name) "/"))) "\\."))) |
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
* html5 game developing | |
* algorithm | |
* javascript ninjia | |
* elisp |
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
(defmacro in (list elem) | |
" first macro nonsense" | |
(let ((tempvar (make-symbol "is-in"))) | |
`(flet ((is-in (l e) | |
(if l (if (= (car l) e) t | |
(is-in (cdr l) e)) | |
nil))) | |
(is-in ,list ,elem)))) |
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
19.5.1 Content-Disposition | |
The Content-Disposition response-header field has been proposed as a means for the origin server to suggest a default filename if the user requests that the content is saved to a file. This usage is derived from the definition of Content-Disposition in RFC 1806 [35]. | |
content-disposition = "Content-Disposition" ":" | |
disposition-type *( ";" disposition-parm ) | |
disposition-type = "attachment" | disp-extension-token | |
disposition-parm = filename-parm | disp-extension-parm | |
filename-parm = "filename" "=" quoted-string | |
disp-extension-token = token |
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 delete-trailing-whitespace-current-buffer () | |
(interactive) | |
(let ((pos (point))) | |
(replace-regexp "\\(.\\)[ \t]+$" "\\1") | |
(goto-char pos))) |