This file contains 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
## 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)" |
This file contains 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 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 |
This file contains 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
# 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` |
This file contains 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
# 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 |
This file contains 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 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) |
This file contains 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
#!/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 |
This file contains 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
[DreamPie] | |
show-getting-started = False | |
font = Courier New 10 | |
current-theme = Dark | |
pprint = True | |
use-reshist = True | |
reshist-size = 30 | |
autofold = True | |
autofold-numlines = 30 | |
viewer = '' |
This file contains 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
# coding: utf-8 | |
# check whether all notes in evernote3 are migrated to 3 to 4 | |
# 1. open an evernote 4.x database (sqlite) | |
# 2. open an evernote 3.x export (.enex) | |
# 3. check for each note in enex, if not in evernote 4 database, then print out the title | |
import sqlite3 | |
from lxml import etree |
This file contains 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
(require 'projectile) | |
(require 'anything) | |
;; helper for anything | |
(defun anything-c-projectile-files () | |
"Generates a list of files in the current project" | |
(projectile-get-project-files | |
(projectile-get-project-root))) | |
(defvar anything-c-source-projectile-files |