You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session. You switched accounts on another tab or window. Reload to refresh your session. Dismiss alert
Davidâs post âDisplaying the Git branch in the terminal prompt with and without Perlâ reminded me of a batch file I use for the same purpose. Of course, vanilla cmd.exe does not allow dynamic updating of the prompt, so it is rather more limited, but it can still be useful if you spend most of your session within one repo. Here is the batch file: @echo off git.exe %* set GITBRANCH= for /f "tokens=2
ã¨ãããã mycli 㨠aws-shell ã®ã¹ã¯ãªã¼ã³ãã£ã¹ããè¦ã¦ãã ããã prompt_toolkit ã¯ãã®ãããªãªããã³ã³ã½ã¼ã«ã¢ããªãä½ãããã®ã©ã¤ãã©ãªã§ãã Windows ã§ãåãã¾ãã Jupyter (ipython notebook) ãåãé¢ãããã³ã³ã½ã¼ã«çã® ipython ã次ã®ã¡ã¸ã£ã¼ãã¼ã¸ã§ã³ã§ã¯ readline ãã¼ã¹ãã prompt_toolkit ãã¼ã¹ã«ä½ããªãããã¦ãã¾ãã ipython 以å¤ã«ã ptpython ã¨ããã·ã§ã«ãããã ipython ã®å種 magic ãä¸è¦ãªå ´åã¯ãã¡ãã§ååã§ãããã https://github.com/jonathanslenders/python-prompt-toolkit#projects-using-prompt-toolkit ã«ã¯ãä»ã«ã prompt_toolkit ãæ¡ç¨
ç¥ã£ã¦ã人ã«ã¯ä»æ´ã¨æãã¾ãããä»ã¾ã§ç¥ããªãã£ãã®ã§ã¡ã¢ã¡ã¢ã AppleScriptã®ä»£ããã«JavaScriptã使ããããã«ãªã£ã¦ã¾ããã Yosemiteããã®æ°æ©è½ã ããã§ãã JXAã¨ãå¼ã°ãã¦ãã¾ããå®å®èªç©ºç 究éçºæ©æ§ã¨ã¯ç¡é¢ä¿ã§ãã (追è¨ï¼JXAã¯å ¬å¼ã®ç¥ç§°ã§ã âIntroduction to JavaScript for Automation Release Notes) 詳ãã㯠Appleã®å ¬å¼ããã¥ã¡ã³ã ãããåèãã«ãããªã³ã¯ã¸ã©ããã ããä¸ã¤è¨äºãæ¸ããã®ã§ãã¡ããããã£ããã©ãã Macã®ãã¼ãã¼ãå ¥åããã¦ã¹ã¯ãªãã¯ãJavaScript㧠(JXA) Script Editorã§ä½¿ãæ¹æ³ ã¾ãScript Editorã使ãæ¹æ³ã説æãã¾ãã 好ããªããã¹ãã¨ãã£ã¿ã使ãããå ´åã¯é£ã°ãã¦ãã ããã (ã§ããç¨èªèª¬æãã®è¡¨ç¤ºã®ä»æ¹ã¯è¦ãã¦ããã¦
percolã«å®è£ ããã¦ãã¦ãã, --initial-indexãªãã·ã§ã³ã@hirose31ããã å®è£ ãããã®ã§ããã使ãä¾ãé©å½ã«ä½æãã¦ã¿ã.index㯠percol㨠åã 0ãã¼ã¹ã§ã. ã³ã¼ã 次ã®ãã㪠rubyã¹ã¯ãªãããæ¸ã #!/usr/bin/env ruby require 'open-uri' require 'nokogiri' require 'uri' rank = ARGV.shift if rank.nil? abort "Usage: #{$0} rank" end index = ((rank.to_i - 1) / 20) + 1 url = "http://www.dmm.co.jp/digital/videoa/-/ranking/=/term=monthly/type=actress/page=#{index}/" doc = Noko
å æ¥ãshellåå¼·ä¼ã§ãzawã使ã£ã¦ã·ã§ã«æä½ãå¿«é©ã«ãã¨ããã話ãè´ãã¦ãèªåãããå°ããã®ãããã®ç°å¢ãæ´ããããã¨æãç«ã£ãã nanapiåå¼·ä¼ vol2 - Shellã®æ´»ç¨ã§ããã ãæ¯æ¥ã便å©ã«ãªã - nanapiåå¼·ä¼ | Doorkeeper zawã§å¿«é©ã·ã§ã«çæ´» // Speaker Deck èªåã使ãé¸æãããã®ã¯ zaw ã§ã¯ãªã percol ã 軽ã調ã¹ã¦ã¿ããããã§ã¯ zawã£ã¦ã®ã¯è¨å®ãã¦ãã(ãããã¯èªä½ãã)決ããããsourceã使ã£ã¦æ±ºããããæä½ãè¡ããã®ã§ãzshã«å¯æ¥ã«çµã³ä»ãã¦ãããã¼ã«ã§ãpercolã¯ããããã®ã§ã¯ãªãç´ç²ã«ãå ¥åããã£ã«ã¿ãªã³ã°ãããã ãã®ãã¼ã«ãªã®ã§ããã¤ããªã©ã使ã£ã¦åã³ãã³ãã¨çµã¿åããããã¨ã§è²ã ãªä½¿ãæ¹ãã§ãããã percolã®å°å ¥ https://github.com/mooz/percol Pyt
ã¯ããã« docker API ãããå°ãçªã£è¾¼ãã§è²ã ã¨è§¦ã£ã¦ã¿ãã serf ã使ã£ã¦å ¨èªåã¤ã³ãã©ã夢è¦ã¦ å¿ èªï¼åèï¼ Docker + Mesos + Marathon + Graphite + Fluentd + Sensuãçµã¿åããããããã¤ç®¡çãã¼ã«ã®è©± [Show on Hatena Bookmark] Docker, Mesos, Sensuçãå©ç¨ããBlue-Green Deploymentã®ä»çµã¿ - $shibayu36->blog; Docker ã³ã³ããã«ã¢ããªã±ã¼ã·ã§ã³ãç«ã¦ã¦ Graphite ã§ããæãã«å¯è¦åããã¾ã§ - wtatsuru's blog Mesos ã Marathon ã Graphite ã¯åãã¦èãåèªãªã®ã§ã¾ãã¾ã調ã¹ãªãã¨ãããªããã¨ãåºã¦ãã¦ç¦ã£ã¦ããã docker API ã«ã¤ã㦠docker API 㧠dock
UNIXã®ä»£è¡¨çãªãã¦ã³ãã¼ãã«wgetã¨curlãããã¾ãã ããã¦ãã®å ´åã©ããªOSã§ããã©ã¡ããã®ã½ãããã¤ã³ã¹ãã¼ã«ããã¦ããã®ã§ã¯ãªããã¨æãã¾ãã ãããããã®2ã¤ã®ãã¦ã³ãã¼ãã®æ©è½ã¯ãä¸è¦ä¼¼ã¦ããããã«ãè¦ãã¾ãããå®ã¯ããããã«ç¹å¾´ãè¦ãããã®ã§ãä»æ¥ã¯ããã«ã¤ãã¦è§£èª¬ãã¦ã¿ã¾ãã wgetã®ç¹å¾´ wgetã®ã¹ãã«ã¯ãçæã§ãã³ãã³ãã§ãããã¨ãããã¨ããã£ã¦ãå¤ãã®äººããæ°ã«å ¥ããã¦ãã¾ãã ãããªwgetã®ç¹å¾´ã¨ãã¦ãæãéç«ã£ã¦ããã®ããã¯ãã¼ã©ã¨ãã¦åä½å¯è½ã¨ããç¹ã§ãã ãªãã·ã§ã³ã§-rãä»å ãã¦ãããã¨ã§å帰çã«åä½ãã-lã§ãã®æ·±ããæå®ãããã¨ãã§ãã¾ãã ã¾ãã-Aã-Rãå©ç¨ããã°ããã¦ã³ãã¼ãããæ¡å¼µåã®ãã¯ã¤ããªã¹ãã¨ãã©ãã¯ãªã¹ããæå®ãããã¨ãå¯è½ã§ãã ã¤ã¾ããç¹å®ã®ãµã¤ãå ã«æ£ãã°ã£ã¦åå¨ãããã¡ã¤ã«ããæ¡å¼µåã«ãã£ã¦æå®ãã¦ã³ãã¼ãã§ãã
Geoffâs site: The Silver Searcher: Better than Ack ggreer/the_silver_searcher · GitHub ãã¿ã¼ã³æ¤ç´¢ã«ã¯ackãå©ç¨ãã¦ãã¦ãé常å©ç¨æã«ã¯ç¹ã«ä¸æºã¯ç¡ãã£ããã§ããã ãã¡ã¤ã«æ°ãå¤ããã£ã¬ã¯ããªã ã¨é ãã£ãã®ã§ããã£ã¨ä»ã®æ¹æ³ãç¡ããã¨èª¿ã¹ã¦ããã ackã®3ã5åéãã¨ããThe Silver Searcherã¨ãããã®ã ãã£ãã®ã§å°å ¥ã The Silver Searcherã®ç¹å¾´ å ¬å¼ã«æ¸ãã¦ããThe Silver Searcherã®ç¹å¾´ ackã®3ã5åé«é .gitignoreã.hgignoreã«è¨è¼ããã¦ãããã®ãæ¤ç´¢å¯¾è±¡ããé¤å¤ æ¤ç´¢å¯¾è±¡ããé¤å¤ããããã¡ã¤ã«ã¯.agignoreã«è¨è¼ agã¨ããã³ãã³ãåã§ãackã¨æ¯ã¹ã¦ã³ãã³ããçã(33%æ¸!) ãªãé«éãªã®ã㯠https
(MacOSX 10.8, Emacs 24.2, Google Chrome 24.0) How To AppleScript ~/.emacs.d/reload-chrome.scpt tell application "Google Chrome" tell active tab of first window execute javascript "window.location.reload()" end tell end tell Emacs init.el (defun reload-chrome () (interactive) (shell-command "osascript ~/.emacs.d/reload-chrome.scpt") ) (global-set-key (kbd "s-r") 'reload-chrome) ) åèãµã¤ã http://snipp
tail -f ããçµæãsed,awkãã¦ãã¨ãããã¡ãªã³ã°ããã¦ãã¾ããã¬ãã¬ãæããªããªã£ã¦ããã§ãããã ããã¯åããã»ã¹ããããã¡ãããããªã®ã§ããããã¡ããªãããã«æå®ãã¦ããã¾ãããã åã³ãã³ãã®ãã¼ãããã¡ã®è¨å®ã¯ä»¥ä¸ã®éãã awk {fflush()} grep --line-buffered sed --unbuffered ãªã®ã§ãããªãããã§å¿«é©ã tail -f app.log | grep --line-buffered Grapon | sed --unbuffered -e "s/hoge/hage/" | awk -f '{print $2}{fflush()}'
æ å ±åéã¯ãã¸ãã¹ãã³ã¨ãã¦ã®åºæ¬ã§ããããããæ®æ®µã·ã§ã«ã§ä½æ¥ããè ã¨ãã¦ã¯ãæ¯åãã©ã¦ã¶ãç«ã¡ä¸ããæéããä¸æ¯ã§ããããã£ã¦ãã·ã§ã«ããä¸ç¬ã§æ å ±åéã§ããRubyã®ã¯ã³ã©ã¤ãã¼ãæ¸ããã ä¸ããYahoo, ã¯ã¦ãª, Naverã¾ã¨ã, 2ã¡ãã $ ruby -r open-uri -e 'open("http://www.yahoo.co.jp").read.scan(/topics.+?>([^<]+?)</) {|m| puts m}' $ ruby -r open-uri -e 'open("http://b.hatena.ne.jp/hotentry").read.scan(/entry-link.+>(.+?)</) {|m| puts m}' $ ruby -r open-uri -e 'open("http://matome.naver.jp/").read.sc
ä»æ¥ä¼ç¤¾ã®éçºãµã¼ãã§hitodeåã¨éãã§ã¦ãåãã¦ããããã»ã¹ã調ã¹ã¦ããã®ã§ã¡ã¢ã åãã¦ããããã»ã¹ãç¥ããã åºæ¬çã ps ax ps auxã¨ãããã¨ãã¡ã¢ãªä½¿ç¨éã¨ãããããè¦ããã åãã¦ããããã»ã¹ã®é¢ä¿ãå«ãã¦ç¥ããã pstreeã³ãã³ãã§ã§ãããã¨ããããã©ããªæãã«å®è¡ããã¦ããããµããªã¼ãç¥ãããæã¯ä»¥ä¸ã®ã³ãã³ãã pstree ããããæãããã¾ãã¦ããã®ã§ããããå±éãããæã¯-cãã¤ããã pstree -c ã³ãã³ãã®å¼æ°ã¨ãã表示ãããæã¯-aã¤ãã pstree -ac pidãç¥ãããæã¯-pã¤ãã pstree -acp 表示ãã¦ã¿ãã¨{}ã§å²ã¾ãã¦ãããã¤ããããã©ãããã¯å¤åthreadãªãã ããã¨æããlinuxã§ã¯threadã®idã¯pidã®ããã«ç®¡çããã¦ããã¿ããã ã¡ã¢ãªãCPUãæ¶è²»ãã¦ããããã»ã¹ãç¥ã topã¨ãã§ãããã
ãã£ããã¯ãã¡ãã®ãã¼ã¸ãæè¿ã¹ã¯ãªã¼ã³ã·ã§ããã®ãã¨ã°ãã追跡ãã¦ããããã³ã¡ã³ãã§é¢ç½ã使ãéãæãã¦ããã£ãã®ã ãï¼u3ããããããã¨ãï¼ï¼ ãã¹ã¯ãããã®ã¿ã¤ã ã©ãã¹åç»ãçæããã¹ã¯ãªãã.txt - Dropbox å®é¨ ã¾ããcommand-shift-3ã§é©å½ãªééãããã¦10æããããã¹ã¯ãããã®ã¹ã¯ãªã¼ã³ã·ã§ãããæ®å½±ãã¦ããã å¤åã®ãªããã¹ã¯ããããåç»ã«ãã¦ããåããªãåç»ãï¼ãåçãã¨åçã§é¢ç½ã¿ããªãã®ã§ã ãã¤ãã®æä½ãããªããããã®ã¤ãã§ã«æ®å½±ãã¦ããæ¹ãããã¨ã§è¦ã¦é¢ç½ãã¯ãã 10ææ®å½±ãããããã¡ã¤ã«åãé£çªã«å¤æ´ãã¦ããã 10æããããªãé å¼µã£ã¦æä½æ¥ã§OKã ä¾ï¼001.png 002.png ... 010.png æ®å½±æéé ã«å¤ãæ¹ã001ãæ°ããæ¹ã010ã ã¨ããã§èªåã®Retinaç°å¢ã§ã¯ããã¹ã¯ãããã®ã¹ã¯ãªã¼ã³ã·ã§ããã¯3840Ã
xargs ã® -P ãªãã·ã§ã³ã使ãã¨ããã»ã¹ãè¤æ°èµ·åãã¦å¦çã並åã«è¡ãªããã¨ãåºæ¥ãã ä¾ ä¾ãã°ã 1 ä¸æã® JPEG ç»åãå ¨ã¦ 800x800 ã«åã¾ãããã«å¹çè¯ããªãµã¤ãºãããã ã¾ãç§ã¯ãã®ãããªã³ãã³ããèããã convert --geometry 800x800 *.jpg ããã zsh ã«æãããã zsh: argument list too long: convert å¼æ°ãå ¨ã¦å±éããããããã®ãããªäºãèµ·ããã ç§ã¯ xargs ã使ã£ã¦å¦çãããã¨ãæãä»ããã ls | xargs -I{} convert --geometry 800x800 {} c_{} å¦çã¯è¡ãªããããé常ã«é ãã ããã CPU ãå ¨ã使ã£ã¦ããªããã¨ãåãããç§ã¯å¦çã並åçã«è¡ãªãäºãèããã ãã㧠xargs ã® -P ãªãã·ã§ã³ã®åºçªã§ããã P ã®å¾ã«ä¸¦å
ãªãªã¼ã¹ãé害æ å ±ãªã©ã®ãµã¼ãã¹ã®ãç¥ãã
ææ°ã®äººæ°ã¨ã³ããªã¼ã®é ä¿¡
å¦çãå®è¡ä¸ã§ã
j次ã®ããã¯ãã¼ã¯
kåã®ããã¯ãã¼ã¯
lãã¨ã§èªã
eã³ã¡ã³ãä¸è¦§ãéã
oãã¼ã¸ãéã
{{#tags}}- {{label}}
{{/tags}}