Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

@bamanzi
bamanzi / jed-extra-parts.dot
Created July 12, 2017 06:46
some useful packages (that don't need extra slang-modules) in jed-extra
digraph jed_extra {
node [style=filled ];
ffap [color=deepskyblue];
hyperman [color=deepskyblue];
info [color=deepskyblue];
hyperhelp [color=deepskyblue];
tokenlist [color=deepskyblue];
grep [color=deepskyblue];
@bamanzi
bamanzi / percol-finder-pinyin.py
Last active February 27, 2017 04:37
add 'pinyin' matching method to percol
# This add a new matching method 'pinyin' to percol(https://github.com/mooz/percol)
# In this matching method, first char of each Chinese character's pinyin sequence is used for matching.
# For example, 'zw' matching '中文' (ZhongWen), '中午'(ZhongWu), '作为' (ZuoWei) etc.
# Usage:
# percol --match-method pinyin SomeFileContainingChinese.txt
class FinderMultiQueryPinyin(FinderMultiQuery):
def get_name(self):
return "pinyin"
@bamanzi
bamanzi / gist:1220603188ad99fe8b3b
Created May 1, 2014 08:13
redmine 2.4-2.5 noteable changes
  • Patch #13900: Update URL when changing tab
  • Feature #14614: View hooks for user preferences
  • Feature #13945: Disable autofetching of repository changesets if projects are closed
  • Feature #13746: Highlighting of source link target line
  • Feature #8253: Update CodeRay to 1.1 final
  • Defect #15058: Project authorization EnabledModule N+1 queries
  • Defect #16032: Repository.fetch_changesets > app/models/repository/git.rb:137:in `[]=’: string not matched (IndexError)
  • Defect #15849: Redmine:Fetch_Changesets Single-inheritance issue in subclass “Repository:Git”
  • Defect #15781: Customfields have a noticabl
@bamanzi
bamanzi / zshrc.sh
Created April 1, 2014 11:25
zshrc
#** prompt
autoload -Uz promptinit
promptinit
prompt adam1
#** completion
# Use modern completion system
autoload -Uz compinit
compinit
@bamanzi
bamanzi / gist:7545523
Created November 19, 2013 13:42
cnblogs-textfilter.au3
if WinExists("Text Filter - [CNBlogs_Ing") Then
WinActivate("Text Filter - [CNBlogs_Ing")
Else
$last = "20110101"
$lastfile = "D:\Downloads\CNBlogs_Ing_Backup_201103281004.txt"
$path = "d:\Downloads\";
$search = FileFindFirstFile($path & "CNBlogs_Ing_Backup*.txt")
@bamanzi
bamanzi / youdao.el
Created November 19, 2013 13:11
[emacs] translate/dictionary with online services (youdao/google)
(defun youdao (words)
"Use cmd line `translate' to translate selection, and show result in popup tip.
google translate:
http://code.google.com/p/tranny/
http://www.commandlinefu.com/commands/view/5034/google-translate
youdao: http://hexlee.iteye.com/blog/1442506
"
(interactive
@bamanzi
bamanzi / firefox-tango-colors.md
Created November 15, 2013 02:53
Firefox: tango colors
@bamanzi
bamanzi / anything-org-headings.el
Created November 14, 2013 13:45
[emacs] anything-org-headings
(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)))
@bamanzi
bamanzi / anything-tabs.el
Created November 4, 2013 03:38
anything-tab-list
(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)
@bamanzi
bamanzi / qtmstr-outline-margin.diff
Created October 17, 2013 06:26
Let qtmstr-outline.el support term (use margin instead of fringe)
@@ -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)