2013-01-01ãã1ã¶æéã®è¨äºä¸è¦§
abã§ã¿ãããã¨ã©ã¼ã§ãã $ ab -n 1 -c 1 'http://localhost:8000/book' This is ApacheBench, Version 2.3 <$Revision: 655654 $> Copyright 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/ Licensed to The Apache Software Foundationâ¦
è² è·ãã¹ããã¼ã«ã¨ããã°ab(apache bench)ãæåã§ãã abã¯åä¸ã®URLã«å¯¾ãã¦å¤§éã®ãªã¯ã¨ã¹ããæãã¦ãã¬ã¹ãã³ã¹ãè¨æ¸¬ããã¨ãããã®ã§ããªã¯ã¨ã¹ããã©ã¡ã¼ã¿ããã¹ãã©ã³ãã ã«ãããã¨ãã§ãã¾ããã ï¼ããããããããããã¿ããã§ãã) ã©ã³ãã â¦
sshã§ãããªã¨ã©ã¼ãã§ã¾ããã @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ @ WARNING: UNPROTECTED PRIVATE KEY FILE! @ @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ Permissions 0644 for './path/to/key' are too oâ¦
Pycharm 2.7 Betaããªãªã¼ã¹ããã¾ããã PyCharm 2.7 Beta is available now | JetBrains PyCharm Blog ã¡ãã£ã¨ã ãããã£ã¦æ°ãã¤ããã㨠ããã¸ã§ã¯ãä½ææã«html5 boilerplateã¨ããé¸ã¹ãProject Typeãå¢ãã¦ã¾ã Settings > Project Dependenciesâ¦
httpsã®ãã¼ã¸ã«åãã¦abå®è¡ããã以ä¸ã®ãããªã¨ã©ã¼ãã§ã¦çµæãå¾ããããã§ããã SSL read failed - closing connection éãã¨ã©ã¼ã§ãããmax os x lionã®abã¯ä¸å ·åãããã¿ãããªæ å ±ãè¦ã¤ããã®ã§ãåèã«ããã¦ããã£ã¦è§£æ±ºãã¾ãããMac OS X â¦
éçºç°å¢ã ã¨ãªã¬ãªã¬è¨¼ææ¸ã使ã£ã¦ã¦ãè¦åãç¡è¦ããå¿ è¦ããã£ããããã requestsã使ã£ã¦httpsã«ã¢ã¯ã»ã¹ããå ´åãverify=Falseãã¤ããã¨ç¡è¦ã§ããã res = requests.get('https://example.com', verify=False) åè : Advanced Usage â Requests 1â¦
Eclipseã ã¨éãã¦ãããã¡ã¤ã«ã®ã¡ã³ãã¼ã«ç§»åããã®ã«Ctrl + Oï¼ã¯ã¤ãã¯ã¢ã¦ãã©ã¤ã³)ã便å©ã ã£ãè¨æ¶ãããã¾ããPycharmã®å ´åãcommand + 7ã§Structure Viewãéãã®ã§ããã使ã£ã¦ããã§ãããã«ã¼ã½ã«ãã¨ãã£ã¿ããå¤ããããEclipseã®ã¯ã¤ãã¯ã¢â¦
twitterã§ç¥ã£ããã§ãããIntellijãããã¯ãã§ã¯ã¨ãã£ã¿ã®ã¿ãã(macã®å ´å)commandæ¼ããªããã¯ãªãã¯ããã¨Finderãéãã¨ãã Twitter / isann0330: IntelliJ IDEA ã£ã¦ mac command ... ãã£ã¦ã¿ãã¨ãããªæãã§ããéãã¦ãããã¡ã¤ã«ã¨ãã¡ã¤ã«ãâ¦
centos5.7ãvirtualboxã«ã¤ã³ã¹ãã¼ã«ãããã¨ããã以ä¸ã®ç¶æ ã§æ¢ã¾ã£ã¦ãã¾ãã¨ããç¾è±¡ã«ééã 調ã¹ãã以ä¸ã®ã¨ã³ããªã§è§£æ±ºæ¹æ³ãçºè¦ãã¾ããã NET: Registered protocol family 2ã§ã¨ã¾ã: Ma note è¨å®ãããIO APICãæå¹åãã«ãã§ãã¯ãããã¾â¦
ãã®éã§ãPycharm 2.7 EAPããssh consoleã使ããããã«ãªã£ãã¨ã®ãã¨PyCharm 2.7 EAP 124.571 | JetBrains PyCharm Blog pluginsãè¦ãã¨ssh remote runã¨ããã®ãå ¥ã£ã¦ã¾ãã æ©é使ã£ã¦ããã¨æã£ã¦Toolsã¡ãã¥ã¼ãéãã¦ã¿ãã¨ããã°ã¬ã¼ã¢ã¦ããã¦â¦
ãã®éãªãªã¼ã¹ãããPycharm 2.7 EAPãããªãã¡ã¯ã¿ãªã³ã°ã§æååã®ä¸é¨ãå¤æ°ã¨ãã¦åãåºããã¨ãå¯è½ã«ãªã£ãããã§ããPyCharm 2.7 EAP 124.571 | JetBrains PyCharm Blog ãã®ãããªæååããã£ãã¨ã㦠"books"ã«ã«ã¼ã½ã«ãåããã¦ctrl + shift + â¦
PyCharm 2.7 EAP 124.571ããªãªã¼ã¹ãããã¨ã¢ãã¦ã³ã¹ãããã¾ãããPyCharm 2.7 EAP 124.571 | JetBrains PyCharm Blog æ©éè½ã¨ãã¦ã¿ã¾ãããããªã¢ã¼ãã¤ã³ã¿ã¼ããªã¿ã®ãã¹ãã«sshãã°ã¤ã³ã§ããããã«ãªã£ãããRESTfulãªAPIãå©ãããã®ãã¼ã«ã使ãâ¦
jQueryã®ãã©ã°ã¤ã³ãæ¢ãã®ã£ã¦çµæ§ããã©ãã§ããã ãããããªã¨ããã«æ£ãã°ã£ã¦ããããä¸ã«ã¯ã¨ã£ãã«æ´æ°åæ¢ããã¦ãããããªã®ããããããããªç¶æ³ã§ããå ¬å¼ã®ãã©ã°ã¤ã³å ¬éãªãã¸ããªãã§ããããã§ããjQuery Plugin Registry ããã©ãã©ã°ã¤â¦
ä»æ¥ãããç¨éã§æ¸ãæ¨ã¦ã¹ã¯ãªãããæ¸ãã¦ã¦ããã®ä¸ã§2種é¡ã®ãªã¹ãã®å ¨çµã¿åãããåºåããã£ã¦ã±ã¼ã¹ãããã¾ããããããããã¨ãã¯itertoolsã®ããããªãã ã£ãï¼ãã£ã¦æãã«ãªã£ã¦ãproductãæãåºããªãã£ãã®ã§ãæ¸ãæ¨ã¦ã¹ã¯ãªããã§ããããâ¦
pycharmã§ã¯ç°¡åã«ãã¹ãã«ãã¬ãã¸ãè¨æ¸¬ãããã¨ãã§ãã¾ãã 試ãã¦è¦ãããdjango-generate-scaffoldã§é©å½ãªdjangoã¢ããªãä½ã£ã¦ã¿ã¾ããåè : django-generate-scaffoldãããã£ã¦ã¿ãã¡ã¢ - brainstormpycharmã§djangoããã¸ã§ã¯ããæ°è¦ä½æãããâ¦
indexãæå®ãã¦é åããå¤ãåé¤ãããå ´åãpythonã ã¨delã§æ¸ãã¾ãããã¾ãããæ©ä¼ãªããã©ã array = ['a', 'b', 'c', 'd', 'e'] del array[1] print array # => ['a', 'c', 'd', 'e'] array = ['a', 'b', 'c', 'd', 'e'] del array[1:3] print array â¦
remote_serverã«login_userã¢ã«ã¦ã³ãã§æ¥ç¶ãããã¼ã転éãè¡ãã¾ãã éµèªè¨¼ã«ãã¦ããªãå ´åã¯ãã¹ã¯ã¼ãèããã¾ãã $ ssh -N -f -L 3307:localhost:3306 login_user@remote_server user@server's password: -N ã¯è»¢éã®ã¿è¨±å¯ -f ã¯ããã¯ã°ã©ã¦ã³ãâ¦
æ¨æ¥ç´¹ä»ãããã¼ãã·ã¼ãã§mysqlã®ã¯ã¨ãªã確èªããã£ã¦ã®ããã£ãã®ã§è©¦ãã¦ã¿ã¾ããã 試ããç°å¢ã¯macosx 10.7.5ã§ããrubytune â rails devops/sysadmin cheat sheet ãã¼ãã·ã¼ãã«ã¯ããç´¹ä»ããã¦ã¾ããã pt-query-digest --processlist h=localhosâ¦
rubytuneã¨ãããrailsã¢ããªã®ãã¥ã¼ãã³ã°ãè¡ã£ã¦ãä¼ç¤¾ï¼ã®webãµã¤ãã§ãã³ãã³ãã¹ããããã®ãã¼ãã·ã¼ããå ¬éããã¦ã¾ãããrubytune â rails devops/sysadmin cheat sheet railsã³ãã³ããããªãã¦ãæ®éã®ã·ã§ã«ã³ãã³ãã§ãããããªã«ãããããªâ¦
kickstrapã®jsããªãã¨ãªãèªãã§ãããããªã®è¦ã¤ãã¾ããã // IE compatibility fallbacks, turned on when needed. // Thanks to http://stackoverflow.com/questions/2790001/fixing-javascript-array-functions-in-internet-explorer-indexof-foreach-â¦
var myArray = [1,2,3,4,5,5,3]; uniqueArray = myArray.filter(function(e, pos){ return myArray.indexOf(e) == pos; }) åè: Remove Duplicates from JavaScript Array - Stack Overflow
mysqlããããªã¨ã©ã¼ãåãã¾ããã Out of sort memory, consider increasing server sort buffer size' sort_buffer_sizeãå¢ããã¦restartãããåãããã«ãªãã¾ããã/etc/my.cnf [mysqld] port = 3306 socket = /tmp/mysql.sock skip-external-lockingâ¦
brew updateããããªãã以ä¸ã®ãããªã¨ã©ã¼ãã§ãã®ã§ã error: The following untracked working tree files would be overwritten by merge: Library/Formula/xxxx.rb Please move or remove them before you can merge. Abortingãããã«/usr/local/Librâ¦
以ä¸ã®ã¨ã³ããªãè¦ã¾ãã¦æ©éå ¥ãã¦ã¿ã¾ããã è¿é ã®éçºç°å¢ : MoshãzãtmuxãEmacsãPerl ã«ã¤ã㦠- naoyaã®ã¯ã¦ãªãã¤ã¢ãªã¼ http://d.hatena.ne.jp/naoya/20130108/1357630895 ç°å¢ã¯Mac OSX 10.7.5ãzsh 4.3.11ã§ãã å°å ¥æé $ brew install z1.4â¦
æè¿ããç³»ã®ãã¨ã°ããæ¸ãã¦ã¾ããpythonã§datetime.dateãpatchãã datetime.dateãpatchãã話ã®ç¶ãã¨isinstanceã®ãªã¼ãã¼ã©ã¤ã datetime.date.todayã®çµæãfreezegunã使ã£ã¦åºå®ãã 以ä¸ã¯ãã¾ãããã¾ããããminimockã§ã§ããªããã£ã¦è©¦ãã¦ã¿â¦
以åfreezegunã¨ããã©ã¤ãã©ãªãç´¹ä»ãã¾ãã http://d.hatena.ne.jp/yuheiomori0718/20121216/1355663947 æ¨æ¥ã¨ã³ããªæ¸ããdatetime.dateãåºå®ããã£ã¦ããã®ã¯ãfreezegunã使ãã¨ä»¥ä¸ã®ããã«æ¸ãã¾ãã import datetime from unittest import TestCaâ¦
ååã®ç¶ãdatetime.dateãpatchãããrelativedeltaã§åé¡ãããã¾ããã ãªã®ã§ãFakeDateã§isinstanceããªã¼ãã¼ã©ã¤ããã¦ã¿ã¾ããisinstanceããªã¼ãã¼ã©ã¤ãããã«ã¯ãã¡ã¿ã¯ã©ã¹ã§__instancecheck__ãå®è£ ãã¾ãã from unittest import TestCase froâ¦
datetime.date.todayãdatetime.nowã使ã£ãã³ã¼ãã§ãã¹ãã®ããã«æ¥ä»ãåºå®ãããã¨ãããã¨ãããããã®ã§ã datetime.dateãpatchããæ¹æ³ã試ãã¦ã¿ã from unittest import TestCase from dateutil.relativedelta import relativedelta from mock impâ¦
pythonã§ã¯+æ¼ç®åã®æåããªã¼ãã¼ã©ã¤ãã§ãã ããã¯ã©ã¹ã®ã¤ã³ã¹ã¿ã³ã¹xãyãããå ´å x + yã¨ããã¨ããã¤ã³ã¹ã¿ã³ã¹xã®__add__ãå¼ã°ããã¤ã³ã¹ã¿ã³ã¹xã«__add__ã¡ã½ããããªãå ´åãã¤ã³ã¹ã¿ã³ã¹yã®__radd__ãå¼ã°ããã¤ã³ã¹ã¿ã³ã¹xã«__add__ã¡ã½ããâ¦
å¿ãã¦ãã®ã§ã¡ã¢ import datetime today = datetime.date(2012, 1, 2) hasattr(today, '__add__') # => True ã¡ãªã¿ã«date.__add__ã¯callableã ãã©ãå¼ãã ãTypeErrorã«ãªã