2011-12-01ãã1ã¶æéã®è¨äºä¸è¦§
2011å¹´ã¯å¤§ããªå°éãããã¾ããããå人çã«ããä»ã¾ã§ä½ãã ãã¨ããªãã£ã大éªã¸ã®å¼è¶ãããããã2å¹´ãããé¢ãã£ãããã¸ã§ã¯ããé¢ããããããããã¨å人çã«å¤åããã£ãå¹´ã§ãããå¼è¶ãå¾ãæ°ããé ããä»äºã¯pythonã使ãã¨ãããã¨ã§ãæªçµé¨ã â¦
ç°å¢ MacOSX 10.7.2 Emacs 23.3 â» emacsã¤ã³ã¹ãã¼ã«æã®ã¡ã¢ ãã¦ã³ãã¼ã git clone ã§æã£ã¦ãã¾ã git clone git://navi2ch.git.sourceforge.net/gitroot/navi2ch/navi2ch ã¤ã³ã¹ãã¼ã« ./configure --with-lispdir=/Applications/Emacs.app/Contents/Reâ¦
emacsãç«ã¡ä¸ãç´ãããã以ä¸ã®ãããªWarningãåºã¦ã¾ããã Warning (initialization): An error occurred while loading `/Users/yuhei/.emacs.d/init.el': Symbol's value as variable is void: prj-currentprj-currentã¯eprojectå ã§ä½¿ç¨ããã¦ããå¤â¦
å æ¥å°å ¥ãã¦ã¿ãeprojectã§ãããå²ã¨èª¿åããã§ãã å æ¥è¨å®ãããã¹ãã®å®è¡ãéçºãµã¼ãã¼ã®èµ·å以å¤ã«ãtagãã¡ã¤ã«ã®ä½æãToolsã«è¿½å ãã¦è¦ã¾ãããå¥ã«ãã¼ãå²ãå½ã¦ãªãã¦ããã«ã¼ã½ã«ã§é¸ãã§Enterã§å®è¡ã§ãã¾ãã ãã®ä»ã®TIPS ããã¸ã§ã¯ãâ¦
emacsã§ããã¸ã§ã¯ãã®ç®¡çãããeprojectã¨ããã®ãããã¨ç¥ã£ãã®ã§è©¦ãã¦è¦ã¾ããã http://www.emacswiki.org/emacs/eprojectååã®ããã¸ã§ã¯ããgithubã«ããã¾ãããé¢ä¿ã¯ãªãããã§ã http://wiki.github.com/jrockway/eproject/ ã¤ã³ã¹ãã¼ã« elpaâ¦
ã¤ã³ã¹ãã¼ã« auto-installã§ããã¾ããã M-x auto-install-from-url https://raw.github.com/imakado/anything-project/master/anything-project.el è¨å® M-tã«å²ãå½ã¦ã¾ãããããã©ã«ãã ã¨transpose-wordsãªãã§ããã使ããªãã®ã§ã ãã¨ä»ã®ããã¸ã§â¦
åå²ãã ã¦ã£ã³ãã¦ãä¸ä¸ã«åå²ãã(split-window-vertically) C-x 2 ã¦ã¤ã³ãã¦ãå·¦å³ã«åå²ãã(split-window-horizontally) C-x 3 åé¤ãã ä»ã®ã¦ã£ã³ãã¦ãåé¤(delete-other-windows) åå²ããã¦ã£ã³ãã¦ãåé¤ãã¦ã¦ã£ã³ãã¦ãã«ã¼ã½ã«ãããã¦ã£ã³â¦
dwimã¯ãdo what i meanã空æ°ãããã§ãã©ã¼ã«ãã£ã³ã°ãã ã¤ã³ã¹ãã¼ã« elpaãã M-x list-packagesã§fold-dwimãããã®ã§iã§ãã¼ã¯ã¤ãã¦xã§ã¤ã³ã¹ãã¼ã« (require 'fold-dwim) 使ã£ã¦ã¿ã ã³ã¡ã³ãã«ãããã¼ã®è¨å®ä¾ã¯ä»¥ä¸ã®éãã (global-set-key (kâ¦
ä¸è¨ã®ãããªæååããã£ãå ´åããªã¼ã¸ã§ã³ãã»ããã㦠M-x align-regexp ã§ãããããã¡ã«Align regexp: ã¨èãããã®ã§ '('ãå ¥åãã¦Enterããã°ã以ä¸ã®ããã«æ´å½¢ã§ãããä¾ãã°ã以ä¸ã®ãããªã³ã¼ããåæ§ã®æ¹æ³ã§ããããã£å®ç¾©ãæ´åããããã§ãâ¦
eclipseã ã¨ã«ã¼ã½ã«ä½ç½®ã®ã·ã³ãã«ããã¤ã©ã¤ãã§ããã®ãå°å³ã«ä¾¿å©ã ã£ãã®ã§ãemacsã§ã§ããªããã¨æ¢ããã¨ãã ã¾ãã«ãããã¨ããã®ãè¦ã¤ããã¾ãããauto-highlight-symbol-mode https://github.com/mitsuo-saito/auto-highlight-symbol-mode instalâ¦
ããã©ã«ãã ã¨åç»é¢ãã¤ãããã¹ã¯ãã¼ã«ãã¦ä¸ä¾¿ãªã®ã§ã以ä¸ãè¨å®ã (setq scroll-conservatively 1)
wãªãã·ã§ã³ã§ç¡è¦ hg diff -w
GoogleAppEngineã¨virtualenvã¯ç¸æ§ãæªãã¦ã1.6.0ã¾ã§ã¯ãããããå½ã¦ãªãã¨ã¨ã©ã¼ã«ãªã£ã¦ãã¾ã£ã¦ã¾ãããã1.6.1ã§ä¿®æ£ãããããã§ãããã§ãããã§ãããªãªã¼ã¹ãã¼ã https://docs.google.com/document/pub?id=1AZjOs_it3FwPF5ZjUYsbpntGTbbnPqtl0kâ¦
google app engine1.6.0ã§urllib.urlopenã使ç¨ããã¨ããã以ä¸ã®ãããªã¨ã©ã¼ãçºçã File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/urllib.py", line 84, in urlopen return opener.open(url) File "/System/Library/Fâ¦
å ¥éã½ã¼ã·ã£ã«ãã¼ã¿ã«BeautifulSoupã使ã£ã¦ã¹ã¯ã¬ã¤ãã³ã°ããã¦ããä¾ãããã¾ããã BeautifulSoupã¯rubyã§ããMechanizeãNokogiriã«ç¸å½ããã©ã¤ãã©ãªã§ããhttp://www.crummy.com/software/BeautifulSoup/ åãã¦ä½¿ç¨ããã®ã§åºæ¬çãªä½¿ãæ¹ãã¡ã¢â¦
ç°å¢ã¯Mac OS X 10.7.2ã§ã Graphvizã®ã¤ã³ã¹ãã¼ã« 以ä¸ã®URLãããã¦ã³ãã¼ãã§ãã¾ã http://www.graphviz.org/Download_macos.php pygraphvizã®ã¤ã³ã¹ãã¼ã« pip install pygraphviz以ä¸ã®ã¨ã©ã¼ã«ãªãã¾ãã Downloading/unpacking pygraphviz Running â¦
å ¥éã½ã¼ã·ã£ã«ãã¼ã¿ãèªãã§ã¿ã¦ã¾ããp6ã«twitterã®trendsãå©ãã¦çµæãåå¾ãããµã³ãã«ã³ã¼ãã示ããã¦ã¾ãããapiå´ã®ä»æ§å¤æ´ã§åããªããªã£ã¦ããããã§ãã https://github.com/sixohsix/twitter/issues/56 import twitter twitter_api = twitterâ¦
textmate.elã¯TextMateã¨åãã·ã§ã¼ãã«ããã§TextMateã¨ä¼¼ããããªæä½æ§ãå®ç¾ãããã¤ãã¼ã¢ã¼ãhttps://github.com/defunkt/textmate.el ã¤ã³ã¹ãã¼ã« elpaããã¤ã³ã¹ãã¼ã«ãã M-x list-pakcages(require 'textmate) (textmate-mode) 使ã£ã¦ã¿ãææ³ iâ¦
ãã¬ã¼ã ã¯ã¼ã¯ã«ãã£ã¦ã¯ååã®ãã¡ã¤ã«ããã£ã±ãéããããã¾ããemacsã§ä½æ¥ãã¦ããã¨ããããã¡åã« views.pyãviews.pyã®ããã«é£çªãæ¯ããã¾ããã ããã ã¨ä¸èº«ãããããªãã¦ä¸ä¾¿ã§ãããã§ãuniquify.elã¨ããã©ã¤ãã©ãªãããã¾ãã ãããã¡åâ¦
rubyã«ã°ããæ £ãã¦ããã®ã§ãpythonã®è¾æ¸ããå¤ãåå¾ãããã¨ãã¦ããã¼ããªãå ´åã«Errorã«ãªããã¨ã«ãã¡ãã£ã¨ã ãã¨ã¾ã©ãã¾ããã ãã£ãããªã®ã§ããã·ã¥/è¾æ¸ã®æ±ãæ¹ã®ã¡ã¢ãæ®ãã¦ããã¾ãã python my_dict = {"a": 1, "b": 2} # å¤ã®åå¾ prinâ¦
ã¤ã³ã¹ãã¼ã« pip install python-amazon-product-api config.py è¨å®ã¯å¥ãã¡ã¤ã«ã«ãã¦ããã¾ãã AWS_ACCESS_KEY = '********************' SECRET_KEY = '****************************************' ASSOCIATE_TAG = '********-22' AWS_ACCESS_KEYãSECâ¦
module Foo module PreExtension def method p " pre " super end end module Base def method p " base " end end module PostExtension def method super p " post " end end include Base include PostExtension include PreExtension end class Bar inclâ¦
from google.appengine.ext import db from google.appengine.ext.db import djangoforms class Todo(db.Model): title = db.StringProperty() content = db.TextProperty() added_by = db.UserProperty() class TodoForm(djangoforms.ModelForm): class Metâ¦
rubyã 㨠ruby -r base64 -e "print Base64.encode64(File.new('test.jpg').read)" ããã㯠ruby -e "print [File.new('test.jpg').read].pack('m')" pythonã 㨠python -m base64 < test.jpg rubyã ã¨60æåãã¨ãpythonã ã¨76æåãã¨ã«æ¹è¡ã³ã¼ããå ¥ãâ¦
keyã¨valueãåå¾ãã pythonã¯iteritemsã使ãã¾ã myDict = {"a": 1, "b": 2, "c": 3} for key, value in myDict.iteritems(): print("%s %s" % (key, value)) # => a 1 # => c 3 # => b 2 rubyã¯eachã使ãã¾ã myHash = {"a" => 1, "b" => 2, "c" => 3} â¦
Formã®ã¤ã³ã¹ã¿ã³ã¹ãä½æããã¨ãã«ãinitialã¨ãã¦åæå¤ã渡ã import djangoforms from django import forms class MyForm(djangoforms.ModelForm): month = forms.ChoiceField(choices=MONTH_CHOICES, widget=forms.Select()) MyForm(initial={'month':â¦
backbone-railsã触ã£ã¦ã¿ãã®ã§ã¡ã¢ã§ããhttps://github.com/codebrew/backbone-rails ã¤ã³ã¹ãã¼ã« bakcbone-railsã¯railsã®3.1ç³»ã§ä½¿ãã¾ãã railsã®ããã¸ã§ã¯ããä½ããGemfileã«ä»¥ä¸ãè¨è¿°ãã¾ãã gem rails-backbone ãã¨ã¯bundle install bundle â¦
brunchã¨ããhtml5ã¢ããªãä½ãããã®ãã¬ã¼ã ã¯ã¼ã¯ãããã¾ãã http://brunch.io/以ä¸ã®è¨èªãã©ã¤ãã©ãªããã¼ã«ã使ç¨ãã¦ã¾ãã CoffeeScript http://jashkenas.github.com/coffee-script/ Backbone.js http://documentcloud.github.com/backbone/ Undâ¦
emacsã§coffeescriptããµãã¼ãããã©ã¤ãã©ãªã¨ãã¦coffee-modeãããã®ã§ä½¿ã£ã¦è¦ã¾ãã https://github.com/defunkt/coffee-mode ã¤ã³ã¹ãã¼ã« list-packagesããã¤ã³ã¹ãã¼ã«ã§ãã¾ã M-x list-packages packagesã®è¨å®ã¯ãã¡ã (require 'package) ;;ãªâ¦
å æ¥ä½æããRouterã®ãµã³ãã«ã§ããã©ã°ã¡ã³ãããªãå ´åã#homeã表示ããããã«ãã¦ã¿ã¾ããã http://dl.dropbox.com/u/494487/backbone-sample/routing/index.html $(function(){ App.router = new App.Router; if(Backbone.history.getFragment() === â¦