- fix bugs of minimap (minimap-kill when kill-buffer)
- fix bugs of color theme (add function plist-to-alist)
- write script to auto upload and edit file to my vm
- requests script to “start and stop work” from command line
- backbone.js express.js for single page app (yet another HN reader)
- upload hn.py as a repo
- Coursera “programming language” homework of week2
- finish ruby monk
- find a ruby repo to hack
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
* checkout-these | |
- howdoi | |
- requests | |
- scraperwiki | |
- gittips | |
- html-parseing | |
- lxml | |
- pyquery | |
- d3.js | |
- paper.js |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/python | |
# -*- coding: utf-8 -*- | |
import requests as rq | |
from pyquery import PyQuery as pq | |
hackernews = "http://news.ycombinator.com/rss" | |
rss = pq(rq.get(hackernews).text) | |
items = rss.find("item") |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
data:text/html, <style type="text/css">#e{position:absolute;top:0;right:0;bottom:0;left:0;}</style><div id="e"></div><script src="http://d1n0x3qji82z53.cloudfront.net/src-min-noconflict/ace.js" type="text/javascript" charset="utf-8"></script><script>var e=ace.edit("e");e.setTheme("ace/theme/monokai");e.getSession().setMode("ace/mode/ruby");</script> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import requests as rq | |
from pyquery import PyQuery as pq | |
# helper | |
def unescape(string): | |
import re | |
entity_re = re.compile("&(#?)(\d{1,5}|\w{1,8});") | |
def substitute_entity(match): | |
from htmlentitydefs import name2codepoint as n2cp |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(defun python-eval () | |
" Eval python code in current buffer. | |
It seems that the default python-mode doesn't have this function" | |
(interactive) | |
(let ((script-py (buffer-file-name)) | |
(tmp-script-py "/Users/wenjunyan/.test-code.py") | |
(output-buffer "*python-eval-output*")) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(defun save-as-euc-jp () | |
(interactive) | |
(set-buffer-file-coding-system 'euc-jp) | |
(save-buffer)) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(set-language-environment "Japanese") | |
(set-default-coding-systems 'euc-japan-unix) | |
(set-terminal-coding-system 'euc-japan-unix) | |
(set-keyboard-coding-system 'euc-japan-unix) | |
(set-buffer-file-coding-system 'euc-japan-unix) | |
(defun save-as-euc-jp () | |
(interactive) | |
(set-buffer-file-coding-system 'euc-jp) | |
(save-buffer)) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
;; wenjun-yan | |
(defun get-current-minimap-bufrname () | |
(interactive) | |
(message minimap-bufname)) | |
;; wenjun-yan | |
(defun get-minimap-active-minimaps () | |
(interactive) | |
(princ minimap-active-minimaps)) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(defun adapt-minimap-to-current-buffer () | |
(interactive) | |
(when (null minimap-bufname) | |
(close-all-minimap-buffer) | |
(minimap-new-minimap))) | |
(defun close-all-minimap-buffer () | |
(interactive) | |
(let ((windows (window-list))) |