2018-02-01ãã1ã¶æéã®è¨äºä¸è¦§
ln -s ã§å¤±æããçµé¨ããã¾ãããï¼ /var/www/log/index.php ãã /var/www/html/index.php ã¸ãªã³ã¯ããå ´åãããããã¨ãã«ãç¸å¯¾ãã¹ãã±ã±ã£ã¨ä½ãããå¬ããã§ããï¼ ã§ããã±ã±ã£ã¨ä½ããªãã£ãããç¸å¯¾ãã¹ãä½ã£ãã¤ããããªã³ã¯åãã¦ãããããâ¦
/etc/resolv.confããªãã é©ãããResove.conf ããªããªã£ã¦ããã§ãã systemd 管çä¸ã«ç½®ããã /etc/systemd/resolved.conf 代ããã«ã次ã®ãã¡ã¤ã«ããåºæ¥ã æãããã resolv.conf 㯠systemd ã管çãã¦ãã¾ãã ããããã¦ãªã³ã¯ï¼ takuya@ubuntu0â¦
ruby ã®DateTimeã®æå»ããããã datetime + 1800/(24*60*60).to_f ãã æéãããããã ãã ã¨ãåç´ã«Intç§æ°ã足ããã¨ãæççµè·¯ã ã£ãã ãã¡ãã¡ AcrtiveSupport çãªãã®ã«é ¼ãã®ãé¢åãªè©±ã ãã ãã©ããå°ã楽ã«ãªããªãã®ããªã ad ããã°ã©ãã³â¦
ã¨ãããããã¦ã¹ã¤ãã³ãããããã°ããã調ã¹ããã¨ã document.body.addEventListener('click',function(e){ debugger ; }) e.path ã¯ãªãã¯ããè¦ç´ ãããbody ã§ã®åãã¹ãå ¥ã£ã¦ãã ãããªã³ã°ãé çªã«è¾¿ããã®ã§ä¾¿å©ã path ãè¦ãã°éä¸ã®çµè·¯ã«ãªâ¦
Gmailã®ã¢ã«ã¦ã³ããå¢ãããã¦å°ã Gmailã®ã¢ã«ã¦ã³ããå¢ãããã 常æã«å¤§éã«ã¡ã¼ã«ãã§ãã¯ããã®ãããç¡çãã£ã¦ãããã¡ã¼ã«ã¯éç¥ä»¥å¤ã§æ®ã©ä½¿ããªãã¨æããã ã ããã ãã©ã¯ã¼ãããã ã¡ã¼ã«ã¯è»¢éãã¦ãã©ã¯ã¼ããã¦ãã¾ãã°è¯ãã®ã§ã¯ãªããâ¦
åé¡ç¹ -list ãã -listDevice ã®ãããªcompletion ãåºæ¥ãªãã¦ãinvalid option ãªã£ã¡ããã $ networksetup -list<TAB> compgen ç¡å¹ãªå¼æ°ã§ã ãã¼ã¯ã¼ãã®è£å®ãã§ããªãã ãã¤ãã³ãä»ããå¼æ°ãè£å®ããã¨ã㯠compgen ã«ãã¤ãã³ããã¤ãã³( -- )ã§æ¸¡</tab>â¦
mysql ã®èªåããã¯ã¢ãããWarnings ãªããã¨ã©ã¼åãã®ã§ãããã¹ãããMySQL â MariaDB ã§ããããã¼ã¸ã§ã³ã¢ãããçµãã£ã¦ãã®ã«ãã¼ãã«ãå¤ãã£ã¦ãã¨ããã mysqldump: Couldn't execute 'show events': Cannot proceed because system tables used â¦
apt ã§å ¥ããã®ãããªã«ã§å ¥ãã¦ãã®ãããããªããªãã docker ã®ã¤ã¡ã¼ã¸ã ã¨ããmysql ãå«ãã deb ã¨ããããããã¡ããã¨ç¢ºèªããæ¹ãããããã mysql takuya@localhost:(none)> select VERSION(); +--------------------------+ | VERSION() | |-----â¦
ãã¡ã¤ã«ã空ã«ããã ãã©ã«ãããã¡ã¤ã«ã®æ§é ããã®ã¾ã¾ã«ããã¡ã¤ã«ã®ä¸èº«ã空ã£ã½ã«ãããã ãã¡ã¤ã«ãæ¶ãã¦touch ããã°è¯ããã ãããã©ããã¼ããã·ã§ã³è¨å®ããªããããé¢åãããããããã¡ã¤ã«ã®inodeãå¤ãã£ã¦ãã¾ãã®ã§ tail ãã¦ãã tail â¦
realpath ã§è§£æ±º bashã¹ã¯ãªããã§2ã¤ã®ãã¡ã¤ã«ãã¹éã®ç¸å¯¾ãã¹ãåããã¨ããã¨ãè¨ç®ã大å¤ã§ãã LinuxãMacãrealpath ã¯å ¥ã£ã¦ãªãã®ã§ã apt/brew ã§ãããå¿ è¦ãããã¾ãã realpath ã®ã¤ã³ã¹ãã¼ã« macOS ã®å ´åã¯homebrew 㧠GNU Linux coreutilsâ¦
application/json ã§ãã¡ã¤ã«ãéä¿¡ãã curl ã§ãã¡ã¤ã«ã¢ãããã¼ãããããã¨ããããContent-Typeã text/json ã§ãæ¬æã«JSONã§ç»åãå ¥ããã£ã¦è¨ãããã®ã echo {\"image\": \"$( base64 -w0 path_to_file )\" } | \ curl -X POST -H "Content-Type:â¦
pyenv ã® python ããã¼ã¸ã§ã³ã¢ããããã pyenv ã§ã¤ã³ã¹ãã¼ã«ããpython ããã¼ã¸ã§ã³ã¢ãããã¦ãpipãmigrate ãããã» pyenv ã¯ãã¼ã¸ã§ã³æ¯ã«pipç°å¢ãä½ããããããpyenv ã§global ãã¢ããã°ã¬ã¼ãããã¨ã使ã£ã¦ãpipã®ããã±ã¼ã¸ã移åãããã«â¦
python 㧠int ç§ãã¨ã UNIX Epoch ãªæéã欲ãããªã¼ã£ã¦æã£ãã¨ãã«ã©ãããã intç§ã®ã¿ã¤ã ã¹ã¿ã³ãããã£ããå¬ããããã§ãããã #!/usr/bin/env python import datetime import time import pprint pp = pprint.pprint a = datetime.datetime.strâ¦
JSONãï¼è¡ã§è¨è¼ããã¦ã¦ãããã©ãããã£ãã JSONãæ´å½¢ãããããã©ã¼ããããæ´ãã¦é²è¦§ãããã¨ãã¦ãã¤ãã¤ããã©ã°ã¤ã³ãæ¢ãã¦ãã¦ãªããã½ã¬ã使ã£ã¦ãããã ãã©ãè½ã¡çãã¦èããããã³ã¼ããã©ã¼ããã¿ã¼ã«æããã°ãããã ã¨æ°ä»ããã ããâ¦
git ã§ä½æ¥ãã¦ã¦å°ãã®ãã追å ããã¡ã¤ã«ã®åæ±ã git checkout ã§ãã¡ã¤ã«ã®å¤æ´ãåãæ¶ãããããã¡ã¤ã«ã®ç·¨éããªãã£ãã³ãã«ãããã¨ã¯åºæ¥ã ã ãããããã試ãã¦ãã£ã±ã使ããªãã£ããã¡ã¤ã«ãæ¶ããã¨ã¯checkout ã§ã¯ããªãã touch aaaaaaaaaaâ¦
umask ãå ¨é¨ã®ã¦ã¼ã¶ã¼ã«å¼·å¶ãã umask 㨠ã°ã«ã¼ãã®sticky ãããã使ã£ã¦ãã¦ã¼ã¶ã¼éã§ãã¡ã¤ã«ãå ±æãã¦ãã¡ã¤ã«ã®ãã¼ããã·ã§ã³ãã°ã«ã¼ãã§ç·¨éã§ããããã«ãã¦ããã¨ä¾¿å©ã /etc/profile ãã®ãã¡ã¤ã«ã¯å¿ ãèªã¿è¾¼ã¾ããã®ã§ãããã®æä¸ä½ã§è¨â¦
git ã®pager è¨å®ãããbranchã¾ã§pager 表示ããã ããã¯æãã§ãªããã ãã ç¹å®ã®ãµãã³ãã³ãã ããã¼ã¸ã£ã¼ããã git ã®ãµãã³ãã³ãã§ã git diff ã¯ãã¼ã¸ã£ã¼ããããã©ã git branch ã¯ãã¼ã¸ã£ã¼ããããªãã ãã¼ã¸ã£ã¼è¨å®ãã¦ãã¾ã㨠ãã¹ã¦â¦
nginx 㨠php ã®é£æºããã¦php ã®ã·ã³ã¿ãã¯ã¹ã¨ã©ã¼ã表示ãã php-fpm å´ã®è¨å®ããã¦ãã¾ãã¨ããµã¤ããã¨ããã¡ã¤ã«ãã¨ã«è¨å®ã§ããªãã®ã§ãå°ã£ã¦ãã location ~ \.php$ { fastcgi_pass unix:/run/php/php7.0-fpm.sock; include snippets/fastcgi-phpâ¦
ã¤ã³ã¹ãã¼ã«æ¸ã¿ä¸è¦§ã表示ããã ã¤ã³ã¹ãã¼ã«ã®çµæã表示ããã«ã¯ depth takuya@~$ npm list -g --depth=0 /usr/local/lib âââ [email protected] âââ [email protected] âââ [email protected] âââ [email protected] âââ [email protected] âââ [email protected] âââ [email protected] âââ¦
git ã®ã³ãããå±¥æ´ãç·ã«ãã¦è¡¨ç¤ºãã¦ãããã git log --pretty=format:'%h %s' --graph åºåçµæã¯ã³ã¬ ãã®ãããªå½¢ã§ããã©ã³ãã®å±¥æ´ãããããããã * 9504829 say hello world * daa290b ããããã¡ã ãã¼ * 7a385a4 ããã¼ã¯ã¼ã«ã * 2bf15e1 ãµã³â¦
ä½æ¥å 容ãã±ã±ã£ã¨ãã©ã³ãã«ã¾ã¨ããã æåããç®çå¥ã®ãã©ã³ãåã£ã¦ä½æ¥ã§ããã»ã©äººã¯è³¢ããªãã ã¢ã¬ã³ã¬è§¦ã£ã¦ããã¡ã«ãã©ã¤ãã©ãªã«æ¬ é¥ãè¦ã¤ããããä½æ¥ç®çã¨ã¯éããã¡ã¤ã«ãã¤ãã§ã«ç·¨éãããã¨ãã ãããããç´°ã ã¨ããã³ããããã³ããâ¦
ãã©ã³ããã¡ãã£ã¨ã ã使ãããªãã ãªã¢ã¼ãã«åå¨ããªããã©ã³ããæå ã§ä½ã£ã¦ããã·ã¥ããã¾ã§ã®æµãã ã¬ãã¸ããªãæã£ã¦ããã takuya@Desktop$ git clone [email protected].:takuya/sample.git takuya@Desktop$ cd sample/ ç¾å¨ã®ãã©ã³ãã確èªããâ¦
ã·ã§ã«ã®ã³ãã³ããå±éãããã composite 使ããã¨ããããåè£å¤ããã¦é¢åããããè£å®ãè£å®ã«ãªããªããã takuya@~$ com<tab> comm command compare compgen complete compopt composer composite compress comsat æåã®ï¼æåãããã§ãå±éããã¦ã»ãã</tab>â¦
docker ã®ãã¼ãã®IPã¢ãã¬ã¹ãéå®ãããã expose ãããã¼ãããbind ããã¨ãã«ãããè¦ãä¾ãã³ã¬ docker run -p 80:80 ... ã³ã¬ã ã¨ã0.0.0.0:80 ã«ãããã³ã°ããããã°ãã¼ãã«ã¢ãã¬ã¹ã«ãããã³ã°ãã¦ãã¾ãã®ã§ããããã¡ãã£ã¨å è¡ãä¸å®ã ãã¼â¦