Category Archives - Programming

Common SSH or Linux Shell Commands – JustHost

ls : list files/directories in a directory, comparable to dir in windows/dos. ls -al : shows all files (including ones that start with a period), directories, and details attributes for each file. cd : change directory cd /usr/local/apache : go to /usr/local/apache/ directory cd ~ : go to your home directory cd – : go to the last directory you were…

Possible update counterCache Function

I haven’t tested this yet. But it is a possible update counterCache function.   <code> function counterCheck( ) {   $counterTemplate = “UPDATE :atable AS :amodel SET :counter = ( SELECT COUNT( FROM :table AS :model WHERE :model.:foreignkey = )”;   $updates = array();   $models = Configure::listObjects(‘model’) ;   foreach ($models as $model)…

service httpd restart

If you notice the server starting to thrash, as root you can type “service httpd restart” and Apache will be restarted freeing all the memory it has consumed.  However, but the time it has reached this point, it is hard to log in and run any commands.

FlowingData: How to Make an Interactive Network Visualization

I have looked at d3 network visualization demos / tutorials before. I always tell myself I will do it. But I need to get on this. Link below is to a tutorial on flowing data.