é åãããã¯ã¤ããªã¹ãã§æå®ãããã¼ã®å¤ã®ã¿æ½åºãã
ãã¹ãããããã¼ã¿ãã®ãªãã§æå®ãããã©ã¡ã¼ã¿ã®å¤ã®ã¿ã®é
åã欲ãããã¨ããããããforeach() ã array_filter() ã¨ãã§ããããåããªãã¦ãè¯ãæ¹æ³ããã£ãã
http://blog.pixelastic.com/2011/05/11/whitelisting-keys-array/
ãã
<?php function array_whitelist($array, $whitelist = array()) { return array_intersect_key($array, array_flip($whitelist)); }
Git ã³ãã³ãã§ãã¡ã¤ã«åã®å¤§æåå°æåãå¤æ´ãã
git mv ãµãã³ãã³ã㧠"-f" ãªãã·ã§ã³ãã¤ããã¨ãããããã
git mv -f Readme.md README.md
fputcsv() ã§ä½æããã CSV ãã¡ã¤ã«ã®æ¹è¡ã³ã¼ãã CRLF ã«ãã
Linux ãªã©ã¯ãfputcsv() ã®æ¹è¡ã³ã¼ãã LF ã«ãªã£ã¦ãã¾ãã®ã ãã CRLF ãæã¾ããå ´åãå¤ãã®ã§å°ãã
以ä¸ã®ããã«ã¹ããªã¼ã ãã£ã«ã¿ã使ãä¾ãç´¹ä»ããã¦ããã
vagrant ä¸ã® CentOS7 㧠private_network è¨å®ã«å¤±æãã
Vagrant 1.6.3 ãã CentOS7 ãèµ·åããã¨ãã®è¨å®(Vagrantfile)ã§
config.vm.network :private_network, ip: "192.168.33.10"
ã¨æ°ããNICã®è¨å®ã追å ããã¨ãCentOS6 ã¨æ¯ã¹ã¦ãããã¯ã¼ã¯å¨ããå¤ãã£ãé¢ä¿ã§ãvagrant èµ·åæã®ãããã¯ã¼ã¯è¨å®ã失æãã¦ãã¾ãã
The following SSH command responded with a non-zero exit status. Vagrant assumes that this means the command failed! ARPCHECK=no /sbin/ifup eth1 2> /dev/null Stdout from the command: ERROR : [/etc/sysconfig/network-scripts/ifup-eth] Device eth1 does not seem to be present, delaying initialization. Stderr from the command:
å¿æ¥æªç½®çãªãã©ã°ã¤ã³ãç¨æããã¦ããã®ã§ãã¤ã³ã¹ãã¼ã«ããã¨è§£æ¶ããã
vagrant plugin install vagrant-centos7_fix
æãããªãã°ãªã®ã§ãããã«è§£æ±ºãããããããªãã
åèï¼ https://github.com/mitchellh/vagrant/pull/4195
追è¨(9/5)
Vagrant 1.6.5 ã§è§£æ±ºï¼ãã¾ã¯ææ°çã«ã¢ããããã ãã§ãªãã±ã¼ã
Vagrant ã¢ããã°ã¬ã¼ãå¾ã« vagrant box list ãåºæ¥ãªã
Vagrant ã¯ãé·ãã 1.0 ç³»ãæç¨ãã¦ãããã1.4 ããªãªã¼ã¹ããããã¨ã ããããããã¢ãããã¼ããã¦ã¿ãããã¨æã£ã¦è©¦ãã¦ã¿ãã¨ãããvagrant box (list|remove) ãµãã³ãã³ãããã¾ãåããªããã¨ãåãã£ãã
$ vagrant box list base (virtualbox) The box 'base' is still stored on disk in the Vagrant 1.0.x format. This box must be upgraded in order to work properly with this version of Vagrant.
vagrant up ã vagrant box repackage çãå®è¡ããã°ã¢ããã°ã¬ã¼ãããããããã
$ vagrant box repackage base virtualbox
PHP ã§ãã£ã¬ã¯ããªä»¥ä¸ãå帰çã«ãã¡ã¤ã«åé¤
RecursiveDirectoryIterator ã使ã£ã¦åé¤ã
<?php $path = "/path/to/dir"; $items = new RecursiveIteratorIterator( new RecursiveDirectoryIterator($path, RecursiveDirectoryIterator::CURRENT_AS_SELF), RecursiveIteratorIterator::CHILD_FIRST ); foreach ($items as $item) { if ($item->isFile() || $item->isLink()) { unlink($item->getPathname()); } elseif ($item->isDir() && !$item->isDot()) { rmdir($item->getPathname()); } } rmdir($path);
Apache ã® DocumentRoot ã«å ±æãã©ã«ãã使ã£ãå ´å
Vagrant ã使ã£ã¦ã㦠VirtualBox ã®å ±æãã©ã«ãã DocumentRoot ã«è¨å®ãããã¨ããããããã
EnableSendFile off
ã¨ããã¨éçãã¡ã¤ã«èªã¿è¾¼ã¿ãæ©ããªã£ã¦ãããããã