Comments [0]
Looks like mplayer doesn't support .cue (as companied with .ape or .flac files), I have written emms-cue.el to fix it. So now we are able to jump to next or prev tracks inside a single .ape/.flac lostless audio files now! You can get it from the official repo:
Comments [0]
上學的時候,接受的教育,多是批孔,反對封建禮制的。尤其魯迅的雜文為最。所以以前對孔子的印象頗為鄙夷,封建落後專制的代表嘛。然而,當你真正開始完整閱讀《論語》的時候,才會發現,孔子為什麽會被人尊為萬世師表。
剛開始看了幾章的時候,幾次驚到我。你會發現,雖然你也許根本沒讀過孔子,但生活中你說的話,很多很多,就是出自《論語》的!!例如,巧言令色,盡善盡美,見賢思齊,文質彬彬,朝聞道夕死可矣,君子不器,三思而后行…… 難怪梁啟超會稱《論語》是中國思想的源泉。
還有比較有趣的是,有些話,孔子的意見跟人們認為的是相左的。比如,三思而后行,我們都會認為這是好的做法吧。孔子其實認為兩次就夠了:再,斯可矣。同樣應用到諫上面,他也不贊成非要死諫不可,而是勸兩次對方不聽就算了,不然就被對方羞辱,豈不很沒面子。
孔子真是一個很可愛的人。死要面子,卻又敢於承認自己的不足,勇於追求自己的理想,“知其不可而為之”,不計較世人的不屑。
Comments [0]
Comments [0]
Some elisp code snips for pasting in irc channel from inside emacs.
;;; paste in IRC (final version)(defun url-extra-http-encode-string (str content-type)
"URL encode STR using CONTENT-TYPE as the coding system."
(apply 'concat
(mapcar (lambda (c)
(if (or (and (>= c ?a) (<= c ?z))
(and (>= c ?A) (<= c ?Z))
(and (>= c ?0) (<= c ?9)))
(string c)
(format "%%%02x" c)))
(encode-coding-string str content-type))))(defun url-extra-http-encode-string-without-escape (str content-type)
"Similar to `url-extra-http-encode-string' but treat \"\\\" as regular
character."
(let ((back-slash (format "%%%02x" ?\\)))
(replace-regexp-in-string
back-slash
(concat back-slash back-slash)
(url-extra-http-encode-string str content-type))))(defun url-extra-http-post (url data &optional charset)
"Retrieve URL synchronously with `url-retrieve-synchronously'.DATA is an alist, e.g., '((field-name . \"value\")).
CHARSET defaults to 'utf-8."
(or charset (setq charset 'utf-8))
(let ((url-request-method "POST")
(url-request-data
(mapconcat
'identity
(mapcar (lambda (field)
(concat (symbol-name (car field))
"="
(url-extra-http-encode-string-without-escape
(cdr field) charset)))
data)
"&"))
(url-mime-charset-string (symbol-name charset))
(url-request-extra-headers
`(("Content-Type" . ,(concat
"application/x-www-form-urlencoded;charset="
(symbol-name charset))))))
(url-retrieve-synchronously url)))
(setq xwl-paste-username "xwl")(setq xwl-paste-ubuntu-cn-classes
'("applescript" "actionscript-french" "ada" "apache" "asm" "asp" "autoit" "bash"
"blitzbasic" "c" "c_mac" "caddcl" "cadlisp" "cfdg" "cpp" "csharp" "css" "d"
"delphi" "diff" "div" "dos" "eiffel" "fortran" "freebasic" "gml" "html4strict"
"inno" "java" "java5" "javascript" "lisp" "lua" "matlab" "mpasm" "mysql" "nsis"
"objc" "ocaml" "ocaml-brief" "oobas" "oracle8" "pascal" "perl" "php" "php-brief"
"python" "qbasic" "robots" "ruby" "sas" "scheme" "sdlbasic" "smarty" "sql"
"tsql" "vb" "vbnet" "vhdl" "visualfoxpro" "xml")) (defun xwl-paste-ubuntu-cn (beg end &optional class)
"Paste region between BEG and END to http://paste.ubuntu.org.cn.Resulted post url will be appended to your kill ring, so you can
simply yank it when needed."
(interactive "r")
(unless class
(if current-prefix-arg
(setq class (ido-completing-read "Use mode: " xwl-wgetpaste-ubuntu-cn-classes))
(setq class "lisp")))
(let ((url "http://paste.ubuntu.org.cn"))
(with-current-buffer
(url-extra-http-post url
`((poster . ,xwl-paste-username)
(class . ,class)
(paste . "1")
(code2 . ,(buffer-substring-no-properties beg end))))
(goto-char (point-min))
(if (re-search-forward
(concat "<li class=\"highlight\"><a href=\"\/\\([0-9]+\\)\">" xwl-paste-username)
nil t 1)
(let ((s (concat url "/" (match-string 1))))
(kill-new s)
(message s)
(kill-buffer (current-buffer)))
(message "paste failed")
(switch-to-buffer (current-buffer))))))
Comments [0]
Cool !
Comments [0]
Comments [0]