It's recommented to install addon Color Toggle or Blank Your Monitor + Easy Reading, thus when some web pages goes ugly, you can revert to firefox defaults easily.
For Chrome, try Change Colors
fg: #000000
bg: #ffffff
link: #0000ee
#!/usr/bin/python | |
#search evernote notes keywords in title | |
import sqlite3 | |
def main(endbfile, keywords): | |
conn = sqlite3.connect(endbfile) | |
cursor = conn.cursor() | |
sql = """SELECT title, date_created, date_updated, source_url, uid |
(defun search-cnblogs-ing () | |
(interactive) | |
(require 'hide-lines) | |
(let ((file (car (last (directory-files "d:\\Downloads" | |
t | |
"CNBlogs_Ing_Backup_[0-9]+.txt"))))) | |
(find-file file) | |
(with-current-buffer (file-name-nondirectory file) | |
(local-set-key (kbd "C-c C-s") 'hide-non-matching-lines) |
# batch install missing packages reported by `bundle package` | |
# When `bundle package', it might complain: "Could not find charlock_holmes-0.6.9.1.gem for installation", | |
# You have to run `gem install charlock_holmes -v 0.6.9.1' and run `bundle package` again | |
# And it might complain another package missing, then you have to run `gem install foobar -v xxxxx` | |
# Again, and again. Thus I have this little script | |
# Note: it would fail on packages like 'libv8-3.11.8.13-x86_64-linux.gem', which you can handle it manually | |
while true; do |
# although StackOverflow has this answer http://stackoverflow.com/a/1128583 | |
# but that code is unreadable, thus I have this (also based on a SO anower: http://stackoverflow.com/a/1128721 ) | |
# get the name of the branch we are on | |
_git_repo_name() { | |
gittopdir=$(git rev-parse --git-dir 2> /dev/null) | |
if [[ "foo$gittopdir" == "foo.git" ]]; then | |
echo `basename $(pwd)` | |
elif [[ "foo$gittopdir" != "foo" ]]; then | |
echo `dirname $gittopdir | xargs basename` |
(defun window-toggle-split-direction () | |
"Switch window split from horizontally to vertically, or vice versa. | |
i.e. change right window to bottom, or change bottom window to right." | |
(interactive) | |
(require 'windmove) | |
(let ((done)) | |
(dolist (dirs '((right . down) (down . right))) | |
(unless done |
## Note: for scite.ShowParametersDialog, you need SciTE-ru (http://scite-ru.googlecode.com ) | |
## and original SciTE allows only up to 50 commands (while SciTE-ru allows 300) | |
## on original SciTE, you can add this: | |
#command.name.260.*=Grep in current file... | |
#command.mode.260.*=subsystem:console,savebefore:no | |
#command.26.*=grep --line-number --with-filename "$(CurrentSelection)" "$(FileNameExt)" | |
##or: | |
#command.26.*=*grep --line-number --with-filename "$(1)" "$(2)" |
@@ -153,19 +192,28 @@ | |
(defvar qtmstr-outline-header-map | |
(progn (let ((km (make-sparse-keymap))) | |
- (define-key km [mouse-2] #'qtmstr-outline-on-header-click) | |
- (define-key km "\r" #'qtmstr-outline-on-header-return) | |
+ (define-key km [mouse-1] #'qtmstr-outline-on-header-click) | |
+ (define-key km [mouse-3] #'show-subtree) | |
+ (define-key km (kbd "C-c TAB") #'outline-toggle-children) | |
+;; (define-key km "\r" #'qtmstr-outline-on-header-return) |
(defun anything-c-tab-list () | |
"Return a list of buffer names of current tabbar group. " | |
(unless (and (featurep 'tabbar) | |
tabbar-mode) | |
(error "Error: tabbar-mode not turned on.")) | |
(with-current-buffer anything-c-tab-current-buffer | |
(mapcar #'(lambda (tab) (buffer-name (tabbar-tab-value tab))) | |
(tabbar-tabs (tabbar-current-tabset t))))) | |
(setq anything-c-tab-current-buffer nil) |
(setq anything-c-source-org-headings | |
'((name . "Org Headings") | |
(headline . "^[*]+ ") | |
(condition . (eq major-mode 'org-mode)) | |
(migemo) | |
(persistent-action . (lambda (elm) | |
(anything-c-action-line-goto elm) | |
(show-subtree))) |
It's recommented to install addon Color Toggle or Blank Your Monitor + Easy Reading, thus when some web pages goes ugly, you can revert to firefox defaults easily.
For Chrome, try Change Colors
fg: #000000
bg: #ffffff
link: #0000ee