Lang: text
Get the source!
Actions
Recent Pastes
forget about it (Wu septiembre 02, 2010 at 18:04)
a traceback of a django error (Wu agosto 20, 2010 at 17:54)
some magic ACL code (Wu agosto 17, 2010 at 17:45)
some django models diff (Wu agosto 16, 2010 at 18:39)
some django-south tests (Wu agosto 16, 2010 at 18:42)
django add/edit revisited (Wu agosto 13, 2010 at 10:39)
django edd/edit (rsk agosto 13, 2010 at 10:40)
django model revisited (Wu agosto 12, 2010 at 20:15)
django (rs agosto 12, 2010 at 20:02)
rebuilding a GEOM mirror (Wu agosto 12, 2010 at 17:53)
About
This is the paste site from e-shell.org, my personal website. It is an instance of the CodeSharingZ Zope Product (just take a look at http://zopecode.codigo23.net/wiki/CodeSharingZ to learn more about it). Feel free to paste whatever you want, but notice that all the pastes in here are deleted in a regular basis.
Links
L text
(http://en.wikipedia.org/wiki/Plain_text)

.emacs

My .emacs profile file
  1 (setq load-path (cons "/home/wu/" load-path))
  2 (setq auto-mode-alist
  3       (cons '("\\.py$" . python-mode) auto-mode-alist))
  4 (setq interpreter-mode-alist
  5       (cons '("python" . python-mode)
  6             interpreter-mode-alist))
  7 (autoload 'python-mode "python-mode" "Python editing mode." t)
  8 
  9 (autoload 'php-mode "php-mode" "Mode for editing PHP source files")
 10 (add-to-list 'auto-mode-alist '("\\.\\(inc\\|php[s34]?\\)" . php-mode))
 11 
 12 
 13 ;;; add these lines if you like color-based syntax highlighting
 14 (global-font-lock-mode t)
 15 (setq font-lock-maximum-decoration t)
 16 (global-set-key "\C-h" 'delete-backward-char)   ; backspace
 17 (global-set-key "\C-d" 'delete-char)            ; delete
 18 (global-set-key "\M-?" 'help-command)           ; help
 19 
 20 ;; do not make backup files
 21 ;;(setq make-backup-files nil)
 22 ;; Use centralized backups
 23 (setq backup-directory-alist `(("." . ,(expand-file-name "~/.emacs-backups"))))
 24 
 25 ;; wheel mouse                  
 26 (global-set-key [mouse-4] '(lambda () (interactive) (scroll-down 1)))
 27 (global-set-key [mouse-5] '(lambda () (interactive) (scroll-up 1)))
 28 
 29 ;; force the scroll to go one by one
 30 (setq scroll-step 1)            
 31 
 32 ;; hide the menu bar
 33 ;;                              
 34 ;;(menu-bar-mode nil)           
 35 (tool-bar-mode nil)             
 36 (setq menubar-visible-p nil)    
 37 (setq default-toolbar-visible-p nil)
 38                                 
 39 ;; hide the scroll bar          
 40 ;;                              
 41 (scroll-bar-mode nil)           
 42 
 43 
 44 ;; The following ones are set from within emacs, to activate parent highlight mode
 45 (custom-set-variables           
 46   ;; custom-set-variables was added by Custom -- don't edit or cut/paste it!
 47   ;; Your init file should contain only one such instance.
 48  '(case-fold-search t)          
 49  '(current-language-environment "Latin-9")
 50  '(default-input-method "latin-9-prefix")
 51  '(global-font-lock-mode t nil (font-lock))
 52  '(show-paren-mode t nil (paren))
 53  '(transient-mark-mode t))      
 54 (custom-set-faces               
 55   ;; custom-set-faces was added by Custom -- don't edit or cut/paste it!
 56   ;; Your init file should contain only one such instance.
 57  )
 58 
 59 
 60 ;; Require tramp                
 61 (require 'tramp)
 62 (setq tramp-default-method "ssh")
 63 
 64 ;; Set the default font size
 65 ;;(set-frame-font "7x14")       
 66 (set-frame-font "fixed")   
 67 
 68 ;; Set the default encoding
 69 (set-language-environment "UTF-8")
 70 
 71 
 72 (require 'psvn)
 73 (load-file "~/src/dvc-snapshot/++build/dvc-load.el")
 74 (require 'po-mode) 
 75 
 76 
 77 (require 'rst)
 78 (setq auto-mode-alist
 79       (append '(("\\.txt$" . rst-mode)
 80                 ("\\.rst$" . rst-mode)
 81                 ("\\.rest$" . rst-mode)) auto-mode-alist))
 82 (add-hook 'rst-adjust-hook 'rst-toc-update)
 83 
 84 (require 'table)
 85 
 86 ;; Load color schemes
 87 (require 'color-theme)
 88 (color-theme-initialize)
 89 
 90 ;; set the color-theme-tango definition
 91 ;;; Color theme based on Tango Palette. Created by danranx@gmail.com
 92 (defun color-theme-tango ()
 93   "A color theme based on Tango Palette."
 94   (interactive)
 95   (color-theme-install
 96    '(color-theme-tango
 97      ((background-color . "#2e3436")
 98       (background-mode . dark)
 99       (border-color . "#888a85")
100       (cursor-color . "#eeeeec")
101       (foreground-color . "#eeeeec")
102       (mouse-color . "#eeeeec"))
103      ((help-highlight-face . underline)
104       (ibuffer-dired-buffer-face . font-lock-function-name-face)
105       (ibuffer-help-buffer-face . font-lock-comment-face)
106       (ibuffer-hidden-buffer-face . font-lock-warning-face)
107       (ibuffer-occur-match-face . font-lock-warning-face)
108       (ibuffer-read-only-buffer-face . font-lock-type-face)
109       (ibuffer-special-buffer-face . font-lock-keyword-face)
110       (ibuffer-title-face . font-lock-type-face))
111      (border ((t (:background "#888a85"))))
112      (fringe ((t (:background "grey10"))))
113      (mode-line ((t (:foreground "#eeeeec" :background "#555753"))))
114      (region ((t (:background "#555753"))))
115      (font-lock-builtin-face ((t (:foreground "#729fcf"))))
116      (font-lock-comment-face ((t (:foreground "#888a85"))))
117      (font-lock-constant-face ((t (:foreground "#8ae234"))))
118      (font-lock-doc-face ((t (:foreground "#888a85"))))
119      (font-lock-keyword-face ((t (:foreground "#729fcf" :bold t))))
120      (font-lock-string-face ((t (:foreground "#ad7fa8" :italic t))))
121      (font-lock-type-face ((t (:foreground "#8ae234" :bold t))))
122      (font-lock-variable-name-face ((t (:foreground "#eeeeec"))))
123      (font-lock-warning-face ((t (:bold t :foreground "#f57900"))))
124      (font-lock-function-name-face ((t (:foreground "#edd400" :bold t :italic t))))
125      (comint-highlight-input ((t (:italic t :bold t))))
126      (comint-highlight-prompt ((t (:foreground "#8ae234"))))
127      (isearch ((t (:background "#f57900" :foreground "#2e3436"))))
128      (isearch-lazy-highlight-face ((t (:foreground "#2e3436" :background "#e9b96e"))))
129      (show-paren-match-face ((t (:foreground "#2e3436" :background "#73d216"))))
130      (show-paren-mismatch-face ((t (:background "#ad7fa8" :foreground "#2e3436"))))
131      (minibuffer-prompt ((t (:foreground "#729fcf" :bold t))))
132      (info-xref ((t (:foreground "#729fcf"))))
133      (info-xref-visited ((t (:foreground "#ad7fa8"))))
134      )))
135 
136 (provide 'color-theme-tango)
137 
138 ;; use it
139 (if window-system
140     (color-theme-tango))
141 
142 
143 ;; Paren experiment
144 (setq skeleton-pair t)
145 (defvar my-skeleton-pair-alist
146   '((?\) . ?\()
147     (?\] . ?\[)
148     (?} . ?{)
149     (?" . ?")
150     (?' . ?')))
151 
152 (defun my-skeleton-pair-end (arg)
153   "Skip the char if it is an ending, otherwise insert it."
154   (interactive "*p")
155   (let ((char last-command-char))
156     (if (and (assq char my-skeleton-pair-alist)
157              (eq char (following-char)))
158         (forward-char)
159       (self-insert-command (prefix-numeric-value arg)))))
160 
161 (dolist (pair my-skeleton-pair-alist)
162   (global-set-key (char-to-string (first pair)) 'my-skeleton-pair-end)
163   ;; If the char for begin and end is the same, use the original skeleton
164   (global-set-key (char-to-string (rest pair)) 'skeleton-pair-insert-maybe))
165 
166 (defadvice backward-delete-char-untabify (before my-skeleton-backspace activate)
167   "When deleting the beginning of a pair, and the ending is next char, delete it too."
168   (let ((pair (assq (following-char) my-skeleton-pair-alist)))
169     (and pair
170          (eq (preceding-char) (rest pair))
171          (delete-char 1))))
172 
173 (require 'timeclock-x)
174 (timeclock-modeline-display 1) ;; if you want modline display
175 (timeclock-initialize)
176 (require 'timeclock-setup)
Pasted by Wu on mayo 06, 2010 at 13:16 | Lang: text | (182 lines of code)