Showing posts from November 6, 2011

Madonna - American Life

“Madonna - American life”. (censored version)Note that there are a few versions. The most censored version simply show different flags in the background throughout the song. The above is a censored version, ending in George Bush catching the grenade. There's another uncensored version, with ending showing many gruesome pictures of injured and bloody soldiers and civilians.For lyrics, updates, and Eurythmics's “the King and Queen of America”, see: Madonna - American Life

Google Doing Research: What is a Browser?

“What is a Browser”Fuck the tech geekers, the hackers, the linux/unix, emacs, fanatics, those who hog on slashdot, reddit, hacker news, who adamantly tell us how user interface should be, how code should be formatted, how we should use the web. Fucking idiotic scumbags.What is a Tech Geeker?Computing Culture: What's Hacker?Hacker News,, and What is Politics?Emacs Modernization

Editing Lisp Code with ErgoEmacs Keybinding without ParEdit

Perm url with updates: page shows you how to edit lisp code using ErgoEmacs keybinding and without paredit mode.For programing lisp in emacs, there's a mode called “paredit-mode”, see: ParEdit.Jorge Dias posted in twitter, asking how to get it to work with ErgoEmacs Keybinding, because a lot keys clash.I never tried ParEdit mode, because i'm not sure by principle it is efficient. Here's what i do.Setting Up Bracket HighlightingWhen cursor is on a bracket, the entire bracketed region is highlighted. For how to setup, see: How to Edit Lisp Code with Emacs.Brackets Are ALWAYS Inserted/Removed in PairsAny brackets are ALWAYS inserted and removed in pairs. For how to setup, see: How to Edit Lisp Code with Emacs.Navigating BracketsTo navigate nested brackets as tree structure, use built-in keys provided by GNU Emacs. e.g. 【Ctrl+Alt+←】【Ctrl+Alt+→】【Ctrl+Alt+↑】【Ctrl+Alt+↓】. For detail, see: How to Edit Lisp Code with Emacs.To m…

Emacs Lisp: Writing a Command to Extract URL

Perm url with updates: page shows you how to write a emacs lisp command to extract all URLs in a HTML file. If you don't know elisp, first take a look at Emacs Lisp Basics.Problem DescriptionWrite a command “extract-url”. When called, all URLs in a text selection will be listed in a separate pane, one per line.For example, suppose you have this text: <div>1, <ahref="iraq_pixra2.html">2</a>, <ahref="">Idiom</a>, <ahref="iraq_pixra3.html">3</a></div> After calling the command, you'll get in a separate buffer showing this text: iraq_pixra2.html iraq_pixra3.html SolutionThere are many ways to code this. Here's one: (defunextract-url (p1 p2) "Print all URLs in region P1 P2. When called interactively, use text selection as input, or current paragraph. Output in a buff…

the Skin I Live In

Perm url with updates:“The Skin I Live In” (La piel que habito) trailerWatch it, feel the sickness, and meanwhile, love the eerie music. Pretty sick, though, not in the way you think.Here's my synopsis: mother, scientist, daughter, skin. Rape, death, robbery, sex change operation.Here's a review from Wikipedia The Skin I Live In: Kirk Honeycutt, writing for The Hollywood Reporter, said “Along with such usual Almodóvar obsessions as betrayal, anxiety, loneliness, sexual identity and death, the Spanish director has added a science-fiction element that verges on horror. But like many lab experiments, this melodramatic hybrid makes for an unstable fusion. Only someone as talented as Almodóvar could have mixed such elements without blowing up an entire movie.” Honeycutt continued: “The film's design, costumes and music, especially Alberto Iglesias' music, present a lushly beautiful setting, which is nonetheless a prison and h…

Blonde vs Blond, Brunette vs Brunet

google earth of Shanghai

Screenshot of Google Earth on Shanghai, ChinaSee: Google Earth Mouse Navigation and Keys.

more emacs keyboard macro examples

Perm url with updates: Example: Repeatedly Eval a Emacs Lisp ExpressionHere's another example of kmacro use.I have a function “insert-random-uuid” (See: Emacs Lisp Exercise: insert-random-uuid.) I want to call it hundreds of times to see its output. Let's just say i want to call the elisp expression (random 100) one hundred times.One way is to write a elisp command on the spot, like this: (defunxx-random-test () "test" (interactive) (dotimes (ii 100) (insert (format "%d " (random 100)))) ) But that takes 5 minutes to write, plus you need to have elisp knowledge. You can use a kmacro to do this fast, with the following steps.Start kmacro 【Ctrl+x(】.Type 【Ctrl+u】, then call “eval-expression”, with this expression (random 100). The 【Ctrl+u】 will make “eval-expression” insert its result in current buffer.Type a space.End kmacro 【Ctrl+x)】.Type 【Ctrl+u 100】 then call “kmacro-end-and-call-macro” 【Ctrl+x…

Emacs Lisp Exercise: insert-random-uuid

Solution to last week's elisp exercise: Emacs Lisp Exercise: insert-random-uuid.Big thanks to yurivkhan and Jon Snader for discussion about UUID. See their comments at bottom of: