はやってるので。。
http://1-byte.jp/2011/03/20/20_tips_you_need_to_learn_to_become_a_better_php_programmer/
#1.テンプレートエンジンを使え phpはMVCのviewしかできないしね!
はやってるので。。
http://1-byte.jp/2011/03/20/20_tips_you_need_to_learn_to_become_a_better_php_programmer/
#1.テンプレートエンジンを使え phpはMVCのviewしかできないしね!
<?php | |
namespace Application\Controller; | |
use Zend\Mvc\Controller\ActionController | |
Zend\Mvc\MvcEvent; | |
class IndexController extends ActionController | |
{ | |
public function indexAction() |
#!/bin/bash | |
PID=$(ps ax | grep Growl.app | grep -v grep | awk '{print $1};') | |
test -z "$PID" && open -j -a Growl && echo "Growl restarted on $(date) :: pid not found ($PID)" >> /tmp/growl_restart.log && exit | |
CPU_USAGE=$(top -pid $PID -l 2 -s 5 -stats cpu | tail -n1 | cut -d"." -f1) | |
if test $CPU_USAGE -gt 80 | |
then | |
killall Growl | |
open -j -a Growl |