Upgrade google drive to the latest version if it is older
Thursday, June 27, 2019
emacs elisp remove duplicate lines
M-x delete-duplicate-lines
Monday, June 24, 2019
jquery attribute contains string selector
$('a[href*="string"]')
Sunday, June 23, 2019
windows python sudden IOError: [Errno 13] Permission denied
If things worked before and you have proper rights to write the file/directory then check if the filename is a valid name for a file. An invalid file name can also cause this error.
Sunday, June 9, 2019
Emacs display monospace fonts in buffer
Found code. Doesn't really filter monospace fonts:
(defun font-is-mono-p (font-family)
;; with-selected-window
(let ((wind (selected-window))
m-width l-width)
(with-current-buffer "*Monospace Fonts*"
(set-window-buffer (selected-window) (current-buffer))
(text-scale-set 4)
(insert (propertize "l l l l l" 'face `((:family ,font-family))))
(goto-char (line-end-position))
(setq l-width (car (posn-x-y (posn-at-point))))
(newline)
(forward-line)
(insert (propertize "m m m m m" 'face `((:family ,font-family) italic)))
(goto-char (line-end-position))
(setq m-width (car (posn-x-y (posn-at-point))))
(eq l-width m-width))))
(defun compare-monospace-fonts ()
"Display a list of all monospace font faces."
(interactive)
(pop-to-buffer "*Monospace Fonts*")
(erase-buffer)
(dolist (font-family (font-family-list))
(when (font-is-mono-p font-family)
(let ((str font-family))
(newline)
(insert
(propertize (concat "The quick brown fox jumps over the lazy dog 1 l; 0 O o ("
font-family ")\n") 'face `((:family ,font-family)))
(propertize (concat "The quick brown fox jumps over the lazy dog 1 l; 0 O o ("
font-family ")\n") 'face `((:family ,font-family) italic)))))))
source: https://gist.github.com/haxney/3055728
emacs grep on windows (with helm too)
(grep-apply-setting 'grep-command "c:\\\"Program Files\"\\Git\\usr\\bin\\grep.exe -n -i ")
(setq helm-grep-default-command (concat "c:\\\"Program Files\"\\Git\\usr\\bin\\" helm-grep-default-command))
Wednesday, June 5, 2019
mysql command line query show result status
Add -vv
option to the command line
Subscribe to:
Posts (Atom)