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
#!/bin/sh | |
if [ -t 0 ] | |
then | |
echo "Input is a terminal" | |
else | |
echo "Input is NOT a terminal" | |
fi |
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
;; This is a function copied from stackoverflow to facify #if 0/#else/#endif keywords. | |
;; The comments are added by myself to make it understandable. | |
(defun my-c-mode-font-lock-if0 (limit) | |
(save-restriction | |
(widen) | |
(save-excursion | |
(goto-char (point-min)) | |
(let ((depth 0) str start start-depth) | |
;; Search #if/#else/#endif using regular expression. | |
(while (re-search-forward "^\\s-*#\\s-*\\(if\\|else\\|endif\\)" limit 'move) |
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
sleep 15; import xxx.jpg; |
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
;; Open the default file if it is present. | |
(if (file-exists-p "~/org/TODO.org") | |
(setq initial-buffer-choice "~/org/TODO.org")) |
NewerOlder