I struggled for an elegant way to list directories and files by date with PHP. Here is the fruit of much Google-Fu. This will list directories and files from newest to oldest.
I look a bit painful to do this at first, but here is a very simple solution.
- Install brew
- run ‘brew instal PIL’
- Brew install PIL at /usr/local/Cellar/pil/1.1.7/lib/python2.6/site-packages
- Symlink the PIL site-packages to your Python site-packages in /Library/Python/2.6/site-packages
ln -s /usr/local/Cellar/pil/1.1.7/lib/python2.6/site-packages/PIL /Library/Python/2.6/site-packages/PIL
You will need git, and all the xcode goodies. This is the easiest way to copy and paste your way to a working node.js and npm setup with OS X 10.6. Live on the bleeding edge!
This is the most elegant way I could find to create an thumbnail for an image I want to resize with PHP and Imagemagick. The function will return a filename.
To install imagemagick using Ubuntu, just run
sudo aptitude install php5-imagick
If you are using Ubuntu 10.04 or Debian and you serve .json files through Apache, you might want to serve the files with the correct content type. I am doing this primarily because I want to use the Firefox extension JSONView
The Apache module mod_mine will help to do this easily. However, with Ubuntu you need to edit the file /etc/mime.types and add the line
Then restart Apache
sudo /etc/init.d/apache2 restart
A tip on editing your .gvimrc options file, for gvim or macvim… if you want to set a guifont, but the name contains spaces, you’ll need to escape the spaces to get the font to work.
For example, normally (at least on macvim), if you wanted to use, say, Monaco size 12 as a GUI font, you would add a line to your gvimrc saying
(Naturally, you could also :set this from within vim.)
If you wanted to use Bitstream Vera Sans Mono instead, you would escape the spaces with a backslash, thusly:
set guifont=Bitstream\ Vera\ Sans\ Mono:h12
—not ready for others to read, but making public anyway —
A collection of the faithful gathered in one large room. Among the believers were those seeking healing. They did not reach out the touch the robe of Kurtzweil, not only because he only appeared over the net, but they instead sought the empowerment provided by the most far out boundaries of what is know.
The good news is that frontiers are being forged, primarily the brain sciences. The search for AI seemed to have morphed into a quest to reverse engineer the brain. To learn from Biology. However, the quest seeks to enhance what biology has to offer.
No advances in AI, or even close to it seem to have been presented. Only a uniformed concession that the old way of thinking as is a dead end.
Here are the partial instructions for Ubuntu 10.04 with branch 8f84a30 from July 29, 2010
Get the depends:
#sudo aptitude install kdelibs
#sudo aptitude install cmake
#sudo aptitude install kdelibs4-dev
#sudo aptitude install kdebase
#sudo apt-get install libphonon-dev build-essential
#sudo aptitude install kde-devel
#sudo aptitude install graphviz-dev graphviz
#sudo aptitude install kdepimlibs5-dev
#sudo aptitude install boost-build libboost-all-dev
#svn co svn://websvn.kde.org:443/home/kde/trunk/extragear/graphics/kgraphviewer/ .
Then follow their README and install
Then Get git:
#sudo aptitude install git-core
get the Massif-Visualizer from http://gitorious.org/massif-visualizer:
#git clone git://gitorious.org/massif-visualizer/massif-visualizer.git
Then you can follow the massif-visualizer readme
See images at : http://www.flickr.com/photos/gourneau/sets/72157625248823281/with/5169269487/
sudo aptitude install python-wxtools
sudo easy_install runsnakerun
sudo aptitude install python-profiler
(If you are using Debian check this out : http://www.cherrypy.org/wiki/ProfilingOnDebian
python -m cProfile -o barbazzr.profile barbazzr.py
Check out the output with:
runsnake name.profilepython -m cProfile -o barbazzr.profile barbazzr.py