Starred Links – May 2013
1 Python and OpenERP
- OpenERP Help
A StackOverflow-like website for OpenERP.
- StackOverflow: What is a metaclass in Python
A very nice introduction to metaclass in Python.
- OpenERP: datetime functional field
Explains how to use datetime field in OpenERP, please see the answer
from nbessi .
2 System Administration
- git pull V.S. git pull –rebase
An email from Linus Torvalds (the creator of git) that explains when and
how to use:git pull --rebase
. - git: How to retrieve the hash for the current commit in Git
A StackOverflow link that teaches you how to get the hash value of the
latest commit:1: git rev-parse HEAD
- How to clear the Linux memory cache
As titled.
3 Emacs and Elisp
- Emacs-helm wiki
Helm’s wiki page, where you could find almost everything related to Helm.
Notes Helm is Emacs anything‘s successor.
- Reddit: Emacs tips thread
A Reddit thread where you can contribute your favorite Emacs tips and learn
from others. - Emacs, Shell, Abbrev, and ELISP Power to Bear!
Some useful tips for using shell in Emacs, from Xah Lee.
- Emacs: simply your ERC login
ERC is an IRC (Internet Relay Chat) client for Emacs. It is one of my most
frequently-used Emacs plugins because I need to go to FreeNode (the largest
free and open source software focused IRC network) for asking questions
from time to time.By setting the default server, port and nickname, you could login in one
step: typing the password. - Emacs: split into multiple windows vertically
In standard Emacs, pressing C-x 3 will call function split-window-right
to split the current window into two identical windows.Sometimes I want to get more than two windows, so I wrote this little
function. - Emacs: edit current file as root
Ever so often I open a file that I don’t I have permission to edit (so
automatically Emacs will go into read-only-mode). It’s only then I find
that I need to edit it, so I will have to type in the following command to
open this file, again, as root:C-x C-f /sudo:root@localhost:/path-to-the-file/
To reduce the number of keystrokes, I have written the following small
Elisp function, it detects if there is a file that is associated with the
current buffer; if so, open the file as root. - Highlight the current line
A StackOverflow thread:
This is my current configuration:
1: (global-hl-line-mode 1) 2: (set-face-background 'highlight "#222") 3: (set-face-foreground 'highlight nil)
- Emacs Lisp: Throw & Catch, Exit a Loop
As titled, from Xah Lee.
- Emacs Lisp: Hash Table
As titled, from Xah Lee.
- Emacs Lisp: Find/Determine OS and Emacs Version
As titled, from Xah Lee.
- Emacs Lisp Idioms: Prompting for User Input
As titled, from Xah Lee.
- Emacs: insert source code block in org-mode
When taking notes, writing blogs and managing knowledge base with org-mode,
I need to insert source code blocks quite frequently, so I wrote an Elisp
function to help me to do it. - Smarter Navigation to the Beginning of a Line
With this function, C-a brings the cursor to the first non-whitespace
character of the current line, then you could press C-a again to go to
the real beginning of the line.A small but useful tweak.
4 Java and Android
- Getting Started with Android Studio
Google I/O 2013 introduced the new Android IDE, Android Studio. I’ve
played with it for a while and I like it except the annoying font rendering
problem on Linux (this is actually a problem of Swing).
5 Misc
- Quora: Is Australia Racist
Quora link. You might need to register before you could read the content.
- TED: learn to read Chinese with ease
Shaolan ‘s TED talk. She introduces an easier (arguably) way to learn basic
Chinese characters. Also, like most TED talks, some of the comments are
worth reading. - Miyoko Shida Rigolo: Sanddornbalance
Youtube link. Miyoko Shida Rigolo (from Japan) performs Sanddornbalance.