Linux的用户

OS就应该是自己可以定制的。

Subscribe to RSS feed

.Xresources Backup

, ,

! -------- Mouse ---------
Xcursor*theme: default

!------- Rxvt Unicode --------
URxvt*font: xft:Monospace:size=9
URxvt*multichar_encoding: zh_CN.UTF-8
URxvt*imlocale: zh_CN.UTF-8
URxvt*pastableTabs: true
URxvt*inputMethod: XIM
URxvt*cutchars: BACKSLASH '"'&()*,;<=>?@[]{|}
URxvt*internalBorder: 0
URxvt*jumpScroll: true
URxvt*loginShell: true
URxvt*perl-ext-common: default,matcher,searchable-scrollback
URxvt*pointerBlank: true
URxvt*saveLines: 4000
URxvt*secondaryScroll: true
URxvt*underlineColor: #86a2be
URxvt*termName: rxvt-unicode
URxvt*urlLauncher: chromium-bin

!------- Xterm -------
XTerm*locale: true
XTerm*utf8Title: true
XTerm*fontMenu*fontdefault*Label: Default
XTerm*faceName: Bitstream Vera Sans Mono:size=9
XTerm*faceNameDoublesize: WenQuanYi Micro Hei:size=9
XTerm*faceSize: 9
XTerm*faceSize1: 9
XTerm*faceSize2: 9
XTerm*faceSize3: 9
XTerm*faceSize4: 9
XTerm*faceSize5: 9
XTerm*faceSize6: 9
XTerm*cjkWidth:true
XTerm*scrollBar: true
XTerm*rightScrollBar: true
XTerm*jumpScroll: true
XTerm*SaveLines: 20000

!! -----------------
!! Emacs Tango theme
!! -----------------
!Emacs.Foreground: #eeeeec
!Emacs.Background: #2e3436
Emacs.font-lock-builtin-face.attributeForeground:#729fcf
Emacs.font-lock-comment-face.attributeForeground:#888a85
Emacs.font-lock-doc-string-face.attributeForeground:#888a85
Emacs.font-lock-keyword-face.attributeForeground:#729fcf
Emacs.font-lock-keyword-face.attributeBold:true
Emacs.font-lock-string-face.attributeForeground:#ad7fa8
Emacs.font-lock-string-face.attributeItalic:true
Emacs.font-lock-type-face.attributeForeground:#8ae234
Emacs.font-lock-type-face.attributeBold:true
Emacs.font-lock-string-face.attributeBold:true
Emacs.font-lock-variable-name-face.attributeForeground:#eeeeec
Emacs.font-lock-warning-face.attributeForeground:#f57900
Emacs.font-lock-warning-face.attributeBold:true
Emacs.font-lock-function-name-face.attributeForeground:#edd400
Emacs.font-lock-function-name-face.attributeBold:true
Emacs.font-lock-function-name-face.attributeItalic:true
Emacs.show-paren-match-face.attributeBackground:#73d216
Emacs.show-paren-match-face.attributeForeground:#2e3436
Emacs.show-paren-mismatch-face.attributeBackground:#ad7fa8
Emacs.show-paren-mismatch-face.attributeForeground:#2e3436
Emacs.cursorColor: #fce94f
Emacs.region.attributeBackground: #555753
Emacs.border.attributeBackground: #888a85
Emacs.fringe.attributeBackground: grey10
Emacs.mode-line.attributeForeground:#eeeeec
Emacs.mode-line.attributeBackground:#555753
Emacs.minibuffer-prompt.attributeForeground:#729fcf
Emacs.minibuffer-prompt.attributeBold:true
Emacs.info-xref.attributeForeground:#729fcf
Emacs.info-xref-visited.attributeForeground:#ad7fa8
Emacs.comint-highlight-input.attributeItalic:true
Emacs.comint-highlight-input.attributeBold:true
Emacs.comint-highlight-prompt.attributeForeground:#8ae234
Emacs.isearch.attributeForeground:#2e3436
Emacs.isearch.attributeBackground:#f57900
Emacs.isearch-lazy-highlight-face.attributeForeground:#2e3436
Emacs.isearch-lazy-highlight-face.attributeBackground:#73d216
Emacs.font: Monospace-9

!------- Scroll -------
*scrollBar: true
*scrollstyle: plain
*scrollTtyOutput: false
*scrollWithBuffer: false
*scrollTtyKeypress: true

! Copy From http://tuxtraining.com/2009/06/27/terminal-color-schemes-for-xdefaults-or-xresources-file
*background: rgb:be/be/be
*foreground: rgb:21/21/21
*color0: rgb:00/00/00
*color1: rgb:bf/72/76
*color2: rgb:86/af/80
*color3: rgb:96/8a/38
*color4: rgb:36/73/b5
*color5: rgb:9a/70/b2
*color6: rgb:7a/be/cc
*color7: rgb:db/db/db
*color8: rgb:66/92/af
*color9: rgb:e5/50/5f
*color10: rgb:87/bc/87
*color11: rgb:e0/d9/5c
*color12: rgb:1b/85/d6
*color13: rgb:ad/73/ba
*color14: rgb:33/8e/aa
*color15: rgb:f4/f4/f4

Emacs配置备份

;; Gentoo
(require 'site-gentoo)
;; ECB
;;(require 'ecb)

;; Initialize Pymacs(included in gentoo)
(autoload 'pymacs-apply "pymacs")
(autoload 'pymacs-call "pymacs")
(autoload 'pymacs-eval "pymacs" nil t)
(autoload 'pymacs-exec "pymacs" nil t)
(autoload 'pymacs-load "pymacs" nil t)

;; ????????
(set-default-font "Monospace-7")
;; Activate highlight in search and replace
(setq search-highlight t)
(setq query-replace-highlight t)

;; Browser
(setq browse-url-generic-program "chromium-bin")

;; ????????
(prefer-coding-system 'utf-8)
;; no create backupd
(setq make-backup-files nil)
;; save histroy
(setq savehist-file "~/.emacs.d/.savehist")
(savehist-mode 1)
;; scroll line by line
(setq scroll-step 1)
;; TODO/FIXME/DEBUG highlight
(add-hook 'c-mode-common-hook
(lambda ()
(font-lock-add-keywords nil
'(("\\<\\(FIXME\\|TODO\\|DEBUG\\)[\s:]" 1 font-lock-warning-face t)))))

;; load emacs script
(let ((default-directory "~/.emacs.d/"))
(add-to-list 'load-path default-directory)
(normal-top-level-add-subdirs-to-load-path))

;; YAML mode
(add-to-list 'auto-mode-alist '("\\.ya?ml$" . yaml-mode))
(autoload 'yaml-mode "yaml" nil t)

;; Javascript mode
;;(add-to-list 'auto-mode-alist '("\\.js\\'" . javascript-mode))
;;(autoload 'javascript-mode "javascript" nil t)
(autoload 'js2-mode "js2" nil t)
(add-to-list 'auto-mode-alist '("\\.js$" . js2-mode))

;; CSS mode
(add-to-list 'auto-mode-alist '("\\.css\\'" . css-mode))
(autoload 'css-mode "css" nil t)

;; Python mode
(autoload 'python-mode "python-mode" "Python Mode." t)
(add-to-list 'auto-mode-alist '("\\.py\\'" . python-mode))
(add-to-list 'interpreter-mode-alist '("python" . python-mode))

;; Auto complete
(require 'auto-complete)

;; Yet Another Snippet extension
(require 'yasnippet)
(yas/initialize)
(yas/load-directory "~/.emacs.d/site-lisp/yasnippet/snippets")

;; AUCTex
(add-hook 'LaTeX-mode-hook (lambda()
(add-to-list 'TeX-command-list '("XeLaTeX" "%`xelatex%(mode)%' %t" TeX-run-TeX nil t))
(setq TeX-command-default "XeLaTeX")
(setq TeX-save-query nil)
(setq TeX-show-compilation t)
))

;; SCIM Bridge
;;(require 'scim-bridge)
;; ????????????
;;(add-hook 'after-init-hook 'scim-mode-on)
;; ????????????
;;(add-hook 'after-make-frame-functions
;; (lambda (frame)
;; (with-selected-frame frame
;; (when window-system
;; (scim-mode-on)
;wink)))
;; ??????Emacs????"C-\"
;;(scim-define-common-key (kbd "C-\\") t)
;;(setq scim-cursor-color '("green" "blue" "limegreen"))

; Add cmake listfile names to the mode list.
(setq auto-mode-alist
(append
'(("CMakeLists\\.txt\\'" . cmake-mode))
'(("\\.cmake\\'" . cmake-mode))
auto-mode-alist))

(custom-set-variables
;; custom-set-variables was added by Custom.
;; If you edit it by hand, you could mess it up, so be careful.
;; Your init file should contain only one such instance.
;; If there is more than one, they won't work right.
'(cua-mode t nil (cua-base))
'(ecb-options-version "2.40")
'(js2-highlight-external-variables t)
'(js2-highlight-level 3))

(custom-set-faces
;; custom-set-faces was added by Custom.
;; If you edit it by hand, you could mess it up, so be careful.
;; Your init file should contain only one such instance.
;; If there is more than one, they won't work right.
)














PythonChallenge Level 2

如果不看答案,我是肯定做不出来这个题目。
原因竟然是因为 复制张贴
要玩PythonChallenge还是在自然的Python命令行下,不要使用IPython.

Only play pythonchallenge in nature python shell.
in ipython shell will output some spam in mess data!

fix google.com cache link[inside GWF]

, ,

modify your hosts (linux /etc/hosts) file:

append next content:
# Google Cache Server LIST
64.233.161.104  cache.google.com
64.233.167.104  cache.google.com
64.233.189.104  cache.google.com
66.102.7.104    cache.google.com
66.249.81.99    cache.google.com
216.239.39.99   cache.google.com
216.239.57.99   cache.google.com
216.239.63.99   cache.google.com


touch a userjs file:
EX: OPERA_PROFILE_FOLDER/userjs/google.cache.js
content like next:
// ==UserScript==
// @email supercys at hotmail dot com
// @modify SCys
// @include http://*google.com/search*
// ==/UserScript==

// google cache fix
window.opera.addEventListener('BeforeEvent.click',function(e) { // only opera magic event lisnter?
  var target = e.event.target;
  if(target instanceof HTMLAnchorElement && target.innerHTML=="Cached") {
    target.href = target.href
      .replace('search?q=cache:','search?~=cache.google.com&q=cache:') // fix link args
      .replace(/\/[0-9\.]*\/search\?/, '\/cache.google.com\/search?'); // fix server alias

    alert(target.href);
  }
},false);

[兴趣]关于纹身

纹身是很有趣的事物.
可以增加自己的特殊魅力.它是有一定的催眠效果.
不过一下一个文章可能会让你想清楚,才纹身:

关于纹身之后会不会后悔