Opera 15.00 㧠Chrome ã®æ¡å¼µæ©è½ããªãã¨ãªããããã(èªå·±è²¬ä»»)
ã¨ã¦ãæ«å®çãªã¦ãã¨ããªæè¡è çã«ã¯ãã£ããããããªæ¹æ³ã ã¨èªè¦ãã¦ããã®ã§å¯¾å¦çæ³ãªã®ã§ãããã¯èªå·±è²¬ä»»ã
Opera 15.00 ãªãªã¼ã¹
12.15 ãã Opera Next ã ã£ã 15 ãä»æ¥ãªãªã¼ã¹ããã¾ãããåããè¨ããã¦ããã¨ãã Chromium ãã¼ã¹ã®ãã®ã§ããPresto ã¨ã Carakan ã®ããã§ã¯ãªãã§ããè¨å®é ç®ããããç°¡ç¥åããã¦ããã¾ã®ã¨ãããã¼ã«ãã¼ã¾ããããããªãã§ãã*1ãUAã¯
Mozilla/5.0 (Macintosh; Intel Mac OS X 10_7_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/28.0.1500.52 Safari/537.36 OPR/15.0.1147.132
ã¨ããªãã¨ã OPR ã£ã¦ã®ãã§ã¦ããMozzilaãªã®ã Webkit ãªã®ã Gecko ãªã®ã Chrome ãªã®ã Safari ãªã®ãããããããªãæãã«ãªã£ã¦ã¾ããã©ãOPR ã§ããopera:config ã¨ã㯠config ã«ãªãã¤ã¬ã¯ãããã¾ãã
UI ã¾ããããªããããå¤ãã£ã¦ããã®ã¯ããã¦ããã¦ãã¨ããããæ¡å¼µæ©è½ã¯ãã®ã¾ã¾ã§ã¯åãã¾ãããChrome 㨠Safari 㨠Opera ããããã®æ¡å¼µæ©è½ã¯ã ãããä¼¼ã¦ããæãã®ã¯ãã§ããã©ãmanifest ã¨ããã¡ããã£ã½ãã¨ãããã¾ãã12ç³»ã¾ã§ã¯ HTML/CSS/JS ãè©°ãè¾¼ãã zip ãã¡ã¤ã«ã«ããã±ã¼ã¸ã㦠oex ã¨ããæ¡å¼µåã«ãã¦ããã¯ãã ãã©ãä»å Chromium ãã¼ã¹ã®ãã®ãªã®ã§ crx/nex ã«ããã£ã½ãã§ãã
ã¡ãªã¿ã« 12ã¾ã§ã® oex 㯠Converting OEX extensions to CRX/NEX - Opera 15+ extensions documentation ã§å¤æã§ããã£ã½ãã§ãã
ã¨ãããããããã(ä¿è¨¼ã¯ãªã)
Google Chrome ã§ãããæ¡å¼µæ©è½ã¯ãªãã¨ãªãåãããããã¾ããã
- Chrome ã®æ¡å¼µæ©è½ã®è¨å®ããããããããã¼ã¢ã¼ããããã§ãã¯ããIDã確èªãã¾ãã
- ãã® ID ã ~/Library/Application Support/Google/Chrome/Default/Extensions/ ã¨ã C:\Users\username\AppData\Local\Google\Chrome\User Data\Default\Extensions ã¨ããã¸ãã«å®ä½ãããã¾ãã
- ãã¼ã¸ã§ã³ãæå®ãã¦ãã©ã«ããã¨ã³ãã¼ã¨ãã㦠Opera ã®æ¡å¼µæ©è½è¨å®ã®ãéçºè ããããããã±ã¼ã¸åããã¦ããªãæ¡å¼µæ©è½ãèªã¿è¾¼ããã§ãã©ã«ããé¸æãã¾ã
- ã¨ããããã¯ãããããªãªã«ããã§ã¾ããè¦åã¨ããã£ã¨ã§ã¾ãã
ã¨ããããããã¤ãããã¦ã¿ã¾ãããã¨ããããåãããåããªãã£ãããã¾ãã
æè¡çãªè©±
Welcome! - Opera 15+ extensions documentation ã«ãã㨠.nex ã¨ããæ¡å¼µåã«ã㦠Chromium ãã¼ã¹ãªæ¡å¼µã ãã© Opera ç¨ã® manifest ã¨ããç¨æãã¦ã¢ãããã¼ããã¨ãããã¨ã«ãªããã§ãããããOpera ç¹æã¨ãã¦ã¯ã¹ãã¼ããã¤ã¢ã«ã¾ããã¯ããããããã§ããã¹ã¿ãã·ã¥ã¨ãã£ã¹ã«ãã¼ã¾ããã¯ã©ããªãã®ããªãã¹ã¿ãã·ã¥ã®APIå©ã㦠Opera Link ã§ãããã¡ãã£ã¨ãããããããªããã¾ããã ããã¯ãã Pocket ã¨ãã§ãã£ã¦ã人ã®ã»ããå¤ããã ãã©ãã©ããªãã ãã*2ã
ããããã® Opera
ã©ããªããã§ããããã
å人çã«ã¯ Opera ã¯ãããã¯ãã ããããªãã¦é³æ¥½ããã«ãã³ãã¥ããã£ãå人çãªæãå ¥ããããã¨ããã®ã§ãã°ããå¿æ´ãããã®ã§ä½¿ãã¨ããããããã¦ãããã¦15ã§ããã£ã¦ãã¾ããã¨ã§å»ã£ã¦ãã¾ã人ã¸ã®ã²ã£ããããããã°ãã¾ãããããããããããªããæ°æã¡ãå»ã£ãã Firefix(Vimperator) ã«ãããããããªãã¨ã¯åããæã£ã¦ããããæ©è½ãªã Chrome ã§ãããæ¡å¼µãããªã Firefox ã«ããã°ããã¨ã¯åã ãããã£ã¨æã£ã¦ãããã§ãæ°åã¨ã㦠Operaæå¼·ä¼èª¬(ç¬)ãå®æãªã®ã¯ããã
ããã²ã¨ã¤ã¯ããã¾ã¾ã§ UserJS é¢ä¿ã§ãä¸è©±ã«ãªã£ãåãå½¢ã«ãã¦è¿ãã¨ããã®ãããããªãã¨ãã¯æã£ã¦ã¾ããæºãã¦ã¾ããã
追è¨
Opera ã¢ããªã³ã¨ãã¦ããããåããããªãã®ããããã§ããâ¦â¦ãå¾ããç¥ã£ã
拡張機能「 Download Chrome Extension」 - Opera アドオン
*1:ã¢ãã¬ã¹ãã¼ã¯ä¸ã«ãã¦URLã¯å®å ¨è¡¨ç¤ºã«ããã
*2:ãã¦ã¹ã¸ã§ã¹ãã£ã¼ã«ãã¦ãã¹ãã¼ããã¤ã¢ã«ã«ãã¦ããã©ã¦ã¶å´ã§æ©è½ãã¤ãã¦ãã¾ããã¨ã®æå³ã¯å°ãã¯ããã
ã¯ãã¹ãã©ã¦ã¶ã§ç¢ºèªããã¨ããmodern.IE ã¨ããIEãã¹ãç°å¢ãããã
åãã¦ç¥ã£ããè±èªã¯ç¥ããªããã©æ¥æ¬èªçã¯ã¡ããã©ä»å¹´4æã ãããããã¨æè¿ã®è©±ã¿ããã
Home | Testing made easier in Internet Explorer | modern.IE
modern.IE の更新: VM の無料ダウンロード、Windows 8 QuickStart Kit、コード スキャン ツールの強化など - IEBlog 日本語 - Site Home - MSDN Blogs
ã¯ã©ã¦ãã©ã©ä¸ã§ã·ãã¥ã¬ã¼ãã§ããã¨ããã©ãããä»®æ³ãã·ã³ç¨ã®VMãé ã£ãããã¦ããããããWindows, Mac ã¯ãã¡ãã Linux ã«ã対å¿ãã¦ããããVirtualbox, VMWare Fusion, Parallels ã®3種é¡ã¨ãããããã®VMãé ã£ã¦ãããIEã®ãã¼ã¸ã§ã³ã¨OSã®ãã¼ã¸ã§ã³ãããªã詳細ã«ããã¦ããããã ãæ¥æ¬èªã®ãã©ã³ããã¯ãã£ã¦ãªãã£ã½ãã®ã§ããã¯ãããããããèªåã§ãã©ã³ããããããèªåã§ãã©ã³ããããããããªï¼è©¦ãã¦ãªãã
IE10 ããã
å®æ©ã¨ã¾ã§ã¯ãããªãã¦ããããã°ãã¼ã«ã§IE10, 9, 8, 7 ã¾ã§ã¯è¡¨ç¤ºã¢ã¼ãã¨äºæ表示ã¨ããããã¸ããã«ãã¼ãã¦ãããã®ã§ãããã使ããã
ã¯ã
MSãããæ°ãåºãã¨ããããããæ°ãã§ãªãã¨IE6-8ã¿ããã«ãªããã©ããApple 㯠iOS 㧠Mobile Safari ã§ãã©ã¦ã¶ã®é²åãæ¢ããåæ©ãããã第äºã®IE6ãçã¾ããå¯è½æ§ããããã¨ããã®ãé ·ãããã¸ã£ã¹ã³ãã¤ãªã³åºãã¦ååºè¡å£æ» ããã¦ä¾¿å©ãååã«äº«åããã¦ãé½åãæªããªãã°æ¤éãããã¿ãããªè©±ã«ãéããã
å¤é¨API使ç¨ã§ãå®å¿ãã¦ã³ã¼ããããããã®ãmock ãã¤ãã£ããã¹ã
Twitter ã Facebook ã«éãããå¤é¨APIãå©ããªããã°ãªããªãå ´é¢ã¯åºã¦ããããã ã§ãããã¹ãã³ã¼ããããªãã¨ä¸å®ã«ãªãã®ã«ãå¤é¨APIã®æåã«ãããã¦ãã¾ãé£æºããªãã¨ãããªãã±ã¼ã¹ã§ãã¹ãã³ã¼ãããããªãã®ã¯ããªãããããããããã¨ããmock ã使ããã
Mock - Mocking and Testing Library — Mock 1.0.1 documentation
requests と mock を使ってみる - Twisted Mind
python の mock ライブラリを使ってみる: Addicted To Indentation
ã¤ãã
ãã¹ãã³ã¼ãã¨ããã¹ãã±ã¼ã¹ã®è©±ã«ãªãã¨ã¢ãã«ã³ãé£ãã§ããããªã®ã§*1ããããã£ããããç解ã§æ¸ãã¦ããã
from mock import Mock # ã¢ãã¯ãã¤ãã m = Mock() # m ãå¼ã³åºãã¨å¿ ã "hogemoge" ãããã£ã¦ããããã«ãã m.return_value = "hogemoge" # ãã¹ããã assert m == "hogemoge"
å®éãã¹ãã³ã¼ãã®è¨è¿°ã¯ unittest ã Django ã® unittestããã¹ãã©ã³ãã¼ã¨ãã¦ã¯ nose ãªã pytest ãªã Django test ã³ãã³ãã§èµ°ããããããã
ããã¡ãã£ã¨ä½¿ã
èªåãå®è£ ãã¦ããé¢æ°ã§ã¯ãªããå¤é¨ã©ã¤ãã©ãªã«ä¾åãã¦ããå ´åãããã®æåãå·®ãæ¿ãã
from mock import patch import some_method # context_manager ã§å¼ã³åºã import mymodule with patch("mymodule.coooooool_script") as m: m.return_value = "it's cool" self.assertEqual(some_method(), m) # ãã³ã¬ã¼ã¿ã§å¼ã³åºã class Tests(TestCase): @patch(return_value="it's cool") def coooooooool_script_vaild(self, m): self.assertEqual(some_method(), m) # ä¾å¤ãèµ·ãããã def coooooooool_script_vaild_valid(self) with patch("mymodule.coooooool_script") as m: m.side_effect = CoooolError() with assertRaises(CoooolError): some_method() # ã¤ã³ã¹ã¿ã³ã¹ã¡ã½ãããæ¸ãæããã # ãªã®ã§ã¯ã©ã¹ãã¢ãã¯ã«ããå¿ è¦ããã import MyCoooooolClass patch('MyCoooooolClass') def coooooooool_script_vaild_valid_valid(self, mock_class): with patch("mycoooooolclass.coooooool_script") as m: instance = mock_class.return_value instance.soooomeeeeeeeethod.return_value = "hai" self.assertEqual(instance.soooomeeeeeeeethod, "hai")
ããããè¨è¿°æ¹æ³ãã¤ããããããããã¯ãã¹ãã³ã¼ãèªä½ã«çåãããããããããã©ãåèè³æã¿ãªãããããªæãã§ããã¦ããããã£ã¨ãããããããããã¨ããããã
ã¾ã
ããããã¢ãã¯ä¾¿å©ã§ãªãã§ãã§ãããã©ã¢ãã¯è·äººã«ãªã£ããããã¯ããã§èããã»ãããããã¨ããã®ããããããã¹ãããããè¨è¨ã ããã ãªã¼ã
*1:ææèªä½ã¯åããããã©ãåç½®ããã¦ãããªãã¨ã¡ãã£ã¨ããã
mercurial ã§ä¸é¨ã®å¤æ´ãã³ããããã
ããæ©è½ããã°ãä¿®æ£ããã¨ããã¤ãã§ã«ã¾ã¨ãã¦ä¿®æ£ãã¦ãã¾ãã¨ãããããã®ã¨ããã¾ã¨ãã¦ä¿®æ£ãã¦ãã¾ã£ãã®ã¯ä»æ¹ãªãããã©ã³ãããã¨ãã¦ã¯å¥ã«ãã¦ããããã¨ãã«ä½¿ããgit ã§è¨ã㨠add ããã¿ã¤ãã³ã°ã add -p çãªãã¨ã
çµè«
hg record æ¡å¼µã¤ããã
åè::1ファイルの変更の一部のみをコミットする #Mercurial - Qiita [キータ]
åè::いつの間にかhg recordのハンクが最少単位になっていた - 日々是鍛錬
å°å ¥
.hgrc ã«è¿½è¨
[extension] record =
ã¤ãã
ããã¾ãèããªãã¦ã対話çã«èãã¦ãããã®ã§æ¥½
hg record
ã¨ããããä»åã¯ã¾ã¨ãã¦ãã¾ã£ããã®ã y/n ã§é¸æãã¦ã³ããããåããããªãã ãé¸æè¢ã¯ãããããããã©ãã¨ãããã y/n ã§é¸æãqã§å¼·å¶çµäºã ãã¤ãã£ãã
ã¾ã
ããªã使ãåæãè¯ããããããã
Django ã®ããã¼ãã¼ã¿ã大éæå ¥ããã¹ã¯ãªããã対話ç°å¢ã«å¯¾å¿ãããã·ã§ã«ã¹ã¯ãªããã§èªååãã
ãã£ã±ãã ããã£ã
Django アプリのダミーデータを大量投入するスクリプトをかく - AtAsAtAmAtArAã®ãã³ããéç¨ã§ãããã£ããã©ãã³ããæ¡ä»¶ããã£ãããã¡ãã¡ããããããã®ã ããã£ãã®ã§ããã£ã±ããã¼ã¿ãåæåããã¨ããã¾ã§èªååãããã¨ã«ããã
expect ãã¤ãã£ã
Django ORM ããçæãããããã¹ã¯ãªããã¯å¤ããããªããã§ãä½è¨ãª python ã©ã¤ãã©ãªã¯æ°æã¡çã«ãã¾ããããããªããpython manage.py sql... ã¨ããããããããã©ãã©ããã¤ãããªãããã ãpython manage.py shell 㯠python -c ã¿ããã«ç´æ¥å®è¡ãã§ããªãã対話ã·ã§ã«ã«ãªãã®ã¯å¿ ç¶ã£ã½ãããããã©ããããã
対話ã·ã§ã«ã«ãªã£ã¦ãã¾ããã®ãããããã©ãã«ãã§ããªããæ¢ããããã£ãã expect ã¨ããã®ãè¦ã¤ãã£ãããã¿ã¼ã³ãããããã¦ã³ãã³ããå®è¡ããã¦ãã¾ããããããssh ã rsync ã¨ã useradd ã¨ãã§ä½¿ãã®ãæ³å®ãã¦ããã¿ããã ãã©ãããã¯ããããã ã
sudo apt-get install expect
åè::clmemo@aka: Expect コマンドで passwd 変更
åè::Linux なら expect でコマンドを自動化しよう | 温故知新 linux実践講座
ãã¿ã¼ã³ããã㯠--plain ã§ãã£ã
python ã«ã pexpect ãªãããã±ã¼ã¸ããããã©ãããã¾ãä»åã¯ãããããªãã£ãã®ã§ã©ãã«ãã·ã§ã«ã¹ã¯ãªããã§ãããããpython manage.py shell ã ã¨ã©ããã¦ã ipython ã bpython ãé¸æããã¦ãã¾ãããã®ã¨ã "In [1]: "ã®ãããã§ããããããªããã³ã±ãããã¾ã£ãã
çµå± python manage.py shell 㯠--plain 㧠ipython ã¨ã使ããªããã¬ã¼ã³ãªæ¨æºã®å¯¾è©±ã·ã§ã«ãæå®ã§ãããããããããã£ãã
ææ
ã ãã¶ã´ãªæ¼ãæãã
#!/bin/bash current_dir = ... target_dir = ... cp $current_dir/make_dummy_data.py $terget_dir rm ... python manage.py syncdb ... python manage.py migrate ... expect -c " set timeout 1 expect '>>>' send "import make_dummy_data\n" expect '>>>' send "make_dummy_data.main()\n" expect '>>>' send "exit()\n" interactive "
send ãããæ¹è¡ã³ã¼ããå¿ããã«ãã¨ã¹ã±ã¼ãã¯ã¦ãã¨ãã set timeout ã§ã¿ã¤ã ã¢ã¦ãæå®ã§ãããã -1 ã¨ãã«ããããã©ããªããã ãã£ã½ãã£ãããã¦ãã¨ãã«å°ããå¤ãå ¥ãã¦ãããã
ã¾ã
ããã£ããã ããå®ã¯ echo ã§ããã£ãããã
echo "print(1)" | python manage.py shell
ãªã«ããã£ã¦ããã®ã ãâ¦â¦