6200 comments
2357 subscribers
Follow me on Twitter (@sachac)
Subscribe! Feed reader E-mail

sacha/list-web-stats

Foo bar baz qux ba

(defun sacha/list-web-stats (prefix)
  (interactive (list current-prefix-arg))
  (goto-char (point-min))
  (let ((results) referrer page)
    (while (re-search-forward "GET \\([^ ]+\\) [^\"]+\"[^\"]+\"\\([^\"]+\\)" nil t)
      (setq page (match-string 1))
      (setq referrer (match-string 2))
      (when (string-match "\\(google\\.[^/]+\\)/search.+?q=\\([^&]+\\)"
                          referrer)
        (setq referrer (concat (match-string 1 referrer) "://" (match-string 2 referrer))))
      (add-to-list
       'results
       (if prefix
           (concat page " " referrer)
         (concat referrer " " page))))
    (setq results (sort results 'string<))
    (with-current-buffer (get-buffer-create "*Web stats*")
      (erase-buffer)
      (while results
        (insert (car results) "\n")
        (setq results (cdr results)))
      (pop-to-buffer (current-buffer)))))
Short URL: http://sachachua.com/blog/p/1953

On This Day...

  • 2013: Weekend cooking — It was my first weekend back after the Emacs conference in London. We cooked enough to fill our chest freezer [...]
  • 2012: Weekly review: Week ending April 6, 2012 — Lots of biking this week! The weather’s warming up, so I’ve been biking to work. Yay! From last week’s plans [...]
  • 2011: Spousonomics: Using economics to master love, marriage, and dirty dishes — I love research-backed books that help us understand why we do what we do. Paula Szuchman and Jenny Anderson’s Spousonomics: [...]
  • 2010: Technical leadership — Technical leadership contributes to career growth and personal satisfaction. Here are some ways you can build your technical leadership: Take on [...]
  • 2007: Lasagna — We made lasagna tonight. W and J hadn’t made lasagna at home before, but we managed to put together two [...]
  • 2007: Sick and happy — Once in a blue moon I get quite sick. I think this is so far the best way I’ve spent [...]
  • 2006: Backlog: IBM — I skipped the HFIG panel (bad Sacha! ;) ) to go to IBM. I had so much fun coding a simple [...]
  • 2006: You know you’re a grad student when… — … you can find scholarly explanations for your weird quirks. For example, while the prevailing culture here is to go Dutch [...]
  • 2005: Adphoto notes — 1. What must a sales person be, have, know or learn to be effective in sales? 2. Difference between sales and [...]
  • 2005: I’m on Yahoo 360 — http://360.yahoo.com is yet another social networking service, this time from Yahoo. I’d rather not spam everyone I know (we’re all on [...]
  • 2004: More toys — Deja View http://www.mydejaview.com/pages/2/index.htm (I really want one of these.) OQO http://www.oqo.com/hardware/basics/ (pre-order only) Presentation remote http://www.thinkgeek.com/gadgets/electronic/630b/ Soundbug http://www.thinkgeek.com/gadgets/electronic/5a15/
  • 2004: free.net.ph scheduled downtime reminder — free.net.ph will be down from today until 2004.04.11 . If you need to get in touch with me, leave a message [...]
  • 2004: Article about job interviews — http://www.joelonsoftware.com/articles/fog0000000073.html Great read! Thanks to aadis for the pointer.
  • 2004: Raw scores for enneagram test — http://www.duniho.com/fergus/enneagram/test/results.phtml?scores=s332311146664667778778bbbbbbb&mask=5 You scored as a Seven. On your left is a breakdown of your scores, ordered from highest to lowest. If you are [...]
  • 2004: Teach yourself programming in ten years — http://www.norvig.com/21-days.html The article makes a very good point. Learning isn’t something that can be rushed. It took me a lot of time [...]
  • 2004: The Adventurer — From http://www.9types.com/descr/7/ Enneagram type: 7 Adventurers are energetic, lively, and optimistic. They want to contribute to the world. How to Get Along with [...]
  • 2004: Kidding: “Second Honeymoon” — Prompt: “Just Kidding” (a shot at trying to reply to prompts on the same day) SECOND HONEYMOON “A trip to Paris. Just the [...]
  • 2004: Sacha’s Paradise: “Island Paradise” — The image of islands like townhouses just popped into mind… =) I need to check this against real-estate ads, but it’s [...]
  • 2004: sacha/acm-submit-problem — (defun sacha/submit-acm-problem () (interactive) (let ((buffer (current-buffer))) (gnus-fetch-group "mail.judge-acm") (gnus-summary-post-news) [...]
  • 2004: Channel9: A look inside Microsoft — http://channel9.msdn.com/
  • 2004: InterestingLinks — Flutterby! : Email clients and integrated tools (http://www.flutterby.com/archives/comments/6943.html) Dan Lyke’s comment LIU Jing’s personal wiki (http://hep.pku.cn/liujing/WebWiki/Emacs.html), nice clean design Emacs-wiki, Japanese (http://hpcgi3.nifty.com/shunuhs/index.cgi?Emacs%2Femacs-wiki)
  • 2004: Interesting blog interface — http://punzki.europe.webmatrixhosting.net/ I should steal his Javascript code for hiding-unhiding blog entries… Mark C. Punzalan
  • 2004: Rank 6741 — All those compile errors for Java… <grumble> I’m sticking to that language out of principle and because our students will probably submit [...]
  • 2004: Time management, geek-style — http://vielmetti.typepad.com/vacuum/calendars/index.html Insightful! - Ready for Anything, in a wiki way - Time Management, from my 1999 journals Commercial link: http://www.socialtext.com/, blog http://www.socialtext.com/weblog/
  • 2004: TheBrain as a brainstorming tool — http://vielmetti.typepad.com/vacuum/2004/04/wiki_and_the_br.html Hmm. Disposable information architectures. Makes sense—the process of organizing clarifies things for us…
  • 2003: Freaky Keyboards — On the wear-hard mailing list, Doug Sutherland tells us about some interesting keyboards: Maltron 3D One Handed Keyboard http://www.keytools.com/keyboards/maltron3dhand.htm Maltron 3D One Finger [...]
  • 2003: IntranetServer progress — Mail works without a hitch now that I’ve set up a totally small-time domain name server, but apparently, Microsoft Outlook 2000′s [...]
  • 2003: Orphan Kitten FAQ — Cyclops writes in with this nice link about adopting orphan kittens. http://www.fanciers.com/cat-faqs/orphans.html By the way, my kitten (we’re thinking of naming her [...]