2018-08-01ãã1ã¶æéã®è¨äºä¸è¦§
ipset 㧠IPã¢ãã¬ã¹ï¼ã¾ãã¯ãããã¯ã¼ã¯ã¢ãã¬ã¹ï¼ããã®æ¥ç¶ã許å¯ãã linux ã®FWã使ãã®ã«ã¢ãã¬ã¹æ¡ä»¶ãæå®ããã¨è¨è¿°éãå端ãªãé·ããªãã ããã解æ¶ããããã«ãipset ã¨ããã³ãã³ãããããIPã¢ãã¬ã¹ããããã¯ã¼ã¯ã¢ãã¬ã¹ãã°ã«ã¼ãåãã¦â¦
jid ã便å©ãããªã®ã§ä½¿ã£ã¦ã¿ã jid-github ã¤ã³ã¹ãã¼ã« brew install jid 使ã£ã¦ã¿ã jid 㯠json ãé£ããã¦ããã®çµæããå¿ è¦ãªãã®ãçµãè¾¼ãã§èª¿ã¹ããã¨ãã§ãã 試ãã«ä½¿ã£ã¦ã¿ãã echo '{"info":{"date":"2016-10-23","version":1.0},\ "users":â¦
cockpit ã試ãã¦ã¿ã¦è¯ãã£ãã®ã§ãã Cockpit ã¯ãDebian/Ubuntuãªã©ã§å©ç¨ã§ãã管çãã¼ã«ã§ãWebãã©ã¦ã¶ããæä½ãã§ããã ã¿ã¼ããã«ã使ããã ãã©ã¦ã¶ããã¿ã¼ããã«ã使ããã daemon ããã»ã¹ãåèµ·åã§ããã ãã©ã¦ã¶ããsystemd ã®ããã»ã¹â¦
debian ã®ããã¯ãã¼ããå©ç¨ããã debian ã®ããã¯ãã¼ãã¯ãå ¬å¼ãµã¼ãã¹ã«ãªã£ã¦ãã¾ãã Debian -- ãã¥ã¼ã¹ -- backports ãµã¼ãã¹ãå ¬å¼ã«ãªãã¾ãã sources.list.d ã«å ããã ç´æ¥ /etc/apt/sources.list ã«è¿½è¨ãã¦ãããã®ã§ãããsources.list.â¦
Evernoteã«ã³ã¼ãããã¯ã追å ããã¾ããã 念é¡ã®ã³ã¼ããããã¯ãæã«å ¥ãããã ããã¾ã§ãenmlãæã£ã¦ããããHTMLãä½ãç½®ããã¦ããã¦ããããã³ããã§ã¹ã¿ã¤ã«ãé©ç¨ãããããã¯ãï¼Automatorï¼ãä½ã£ã¦ãã¼ãã¼ãã·ã§ã¼ãã«ããã«å²ãå½ã¦ãããæ¬â¦
0001docomoã«ã¤ãªããã¾ããã docomoã®Wifiã¯åªç§ãªãã ãã©çãããã¾ãã ãã³ã¢ã®å ¬è¡ç¡ç·LANã¯ä¾¿å©ã§ããç¹ããã人éããå¤ãã¦ãéä¿¡ã¨ã©ã¼ã«ãªããããªãã¨ããåªç§ãªç¡ç·LANãæä¾ãã¦ããã¦ãã Wi-Fiã®èªè¨¼ã¯èªè¨¼æ¸ã¿ã«ãªãã®ã«ãDHCPã§IPã¢ãã¬â¦
Evernote ã§æ¤ç´¢ãåæ§ç¯ããã Evernoteã§ãæã£ãããã«æ¤ç´¢ãããªãã¨ããããã¾ãã Webçã ã£ããæ¤ç´¢ãããã®ã«ãiOSã ã¨æ¤ç´¢ãããã®ã«ãWindowsã ã¨ã ããmacOSã ã¨ãã¡ã¨ããããããã¨ã¯èµ·ãã¾ãã Evernoteã¯æ¤ç´¢ã«éä¿¡ã使ã£ã¦ãã¾ãããæ¤ç´¢ãâ¦
date ã使ãã¨æ´æ°å¤ã®ç§ãåãã date +%s æ´æ°å¤ã§ç§ãåãããªããã¿ã¤ãã¼ãä½ãããã§ãããã æ´æ°ã®ååæ¼ç® 㨠çµã¿åãããã echo $(( $now - $start)) ããã§ãç¾å¨ã®æå»ãåããã æ¹è¡(CRLF)ãéªéãªã®ã§ CRLFããã¦ãã¾ãã¨ï¼è¡æ¬¡ã«è¡ã£ã¦ãâ¦
bash ã§ç¾å¨ã®ã¿ã¤ã ã¹ã¿ã³ããåå¾ãã unixæéãªã©ã¨å¼ã°ãã int ç§ã§ãããint ã® timestamp ãdate ã³ãã³ãã§åå¾ãã date +%s ## => 1534329465 ããã§ãintç§ã®ã¿ã¤ã ã¹ã¿ã³ãã表示ãããããã¨ãã§ããã%s ã¯ç¾å¨ã®æå»ã®æ´æ°å¤ãè¿ãã¦ãããâ¦
uwsgi ã«php ãã©ã°ã¤ã³ãããã¾ãã uwsgi ã¨ã¯Pythonã®ã¤ã¡ã¼ã¸ã§ãããphp-fpm ã®ä»£ããã«ä½¿ãã¾ããï¼å¤å使ããã¨ã¯æ®ã©ç¡ãã ãããã©ï¼ uwsgi ã§ç®¡çããã¡ãªãã docker ã®ã¤ã¡ã¼ã¸ãä½ãã¨ãã« php-fpmãæ··ããã¨å ±éåãããªããã©ãuwsgi ã ã¨ãâ¦
nginx ã apacheãèµ·åãã¦ãã¦ã大ä¸å¤«ã certbot ã¯httpd ãèµ·åãã¦ããã¡ããã¨ãªãã¨ããã¦ãããã /usr/bin/certbot -q renew --pre-hook "service nginx stop" --post-hook "service nginx start" pre-hook ã post-hookã§åèµ·åãä»è¾¼ããã®ã§å ¨ãâ¦
bettersnaptool æç¨ãã¦ãã¾ãã Macã®ã¯ã¼ã¯ã¹ãã¼ã¹ã¨æ大åããSpacesããMissionControlã«ãªã£ã¦ä»¥æ¥ãæ大åã§ãã¤ãè¦å´ããããåãæ¿ãã§ã¢ãã¡ã¼ã·ã§ã³ãçºåããã®ãé¢åãããã BetterSnapTool ã«ãè¨å®ã¯ããã®ã§ããã BtterSnapToolã«ãè¨å®â¦
lvm cache ãä½ã£ã¦ã¿ãã ssd è²·ã£ããã©å®¹éæã¦ä½ãã¾ããã大ãã容éã¯NAS/HDDã«çªã£è¾¼ãã§ãããããã¯ã¢ããã¯Google Driveï¼Gsuite ç¡éï¼ã«ããããæ®æ®µé£ãã®ãã¡ã¤ã«ã¯NextCloud ã«ç½®ãã¦ãã¦20GBç¨åº¦ã ããSSDãã ãã¶ä½ã£ãã lvm-cache ã§SSDâ¦
crontab ã£ã¦ä¾¿å©ã ãã©ãããã«ããããã crontab ã®æ¸ãæ¹ãããããã¦ãã¾ãå®è¡ãããªãã¨ãããããªæ¸ãæ¹ããã£ãã®ãï¼ã¨ãªããã¨ãããã ãªã®ã§ãsystemd ã使ã£ã¦å®æå®è¡ãããã¨ãå¤ããã ãã©ãããããã¨ä»åº¦ã¯ç®¡çã大å¤ã«ãªãã ãªãã ãã®â¦
éè¤ãã¡ã¤ã«ãæ¢ãã³ãã³ã find . -type f -exec md5sum {} + | sort | uniq -w32 -dD find ã㦠md5sum ã«ãã㦠sort ããããuniq ãåã 解説 ã³ãã³ãããºã©ãã¨ä¸¦ã¶ã®ã§ã²ã¨ã¤ãã¤è¦ã¦ãã ç¾å¨ã®ãã£ã¬ã¯ããªä»¥ä¸ã®ã¨ã³ããª(Dir/File)ãåæ find .â¦
realpath ã³ãã³ããç¡ãã Ubuntuã®æå°ã¤ã³ã¹ãã¼ã«ã«ãrealpath ã³ãã³ãããªãã£ããã§ããã¾ãalpineã¨ãDockerã¤ã¡ã¼ã¸ã¯ã¡ãã£ã¨ä¾¿å©ãªã³ãã³ãããªãã¦è¦å´ããã ç¸å¯¾ãã¹ã絶対ãã¹ã«å¤æããç®çã§ãã£ã¡ã便å©ãªãã ãã© readlink ã§ãªãã¨ããâ¦
source my_bashrc.sh bashã®è¨å®ãèªã¿è¾¼ãã¨ãã«ãã«ã¬ã³ããã£ã¬ã¯ããªãç¥ãããã¨ããããå®è¡ããã¦ããèªåèªèº«ã®ãã¡ã¤ã«ãç¥ããã $0 ã§åããã ããã¨æã£ããçãã£ãã my_bashrc #!/bin/bash echo $0 source ãã¦ã¿ãã $source my_bashrc.sh -â¦
linux ã§ã³ãã³ããå®è¡ãã shebang shebang ãæå®ããã¨ããã®ã³ãã³ãã§ããã°ã©ã ãå®è¡ããã¾ãããã #!/usr/bin/env ruby puts 1 ãã®ã¨ããshebangã®ï¼è¡ç®ã«æå®ããã³ãã³ãã«ã¯ã©ã®ããã«å¼æ°ã渡ããã¦ããã®ã ãããã ã¡ãã£ã¨è©¦ãã¦ã¿ãããâ¦
sqliteã®æå®ãããã¼ãã«ãdump ãããã sqlite3 ã£ã¦ãã¡ã¤ã«ãã³ãã¼ããã管çã§ãããããããã¾ãè¤éãªãã¼ãã«ãä½ããªãã®ã§ããã ãããã¼ãã«ã ããæã¡åºãã¦ç§»åãããã¨ãã«ã©ãããããã¨èããããã¡ã¤ã«ãã³ãã¼ã§ã¯éã«åããªãã£ãã sâ¦