php MySQL Leoprd

One thing changed with Leopard is the socket for Mysql. It moved to /private/tmp, so you may need to configure your php.ini file to point it to the new location. To do so, open the file ‘/private/etc/php.ini‘, (if no such file exists, then make a copy of ‘/private/etc/php.ini.default‘ naming it ‘php.ini‘) and edit that. You […]

mod_rewrite

Occasionally a new user will run in to mod_rewrite issues, so I’ll mention them marginally here. If the Cake welcome page looks a little funny (no images or css styles), it probably means mod_rewrite isn’t functioning on your system. Here are some tips to help get you up and running: Make sure that an .htaccess […]

Setting up mod_rewrite in Ubuntu 7.10 Gutsy Gibon

Setting up mod_rewrite in Ubuntu 7.10 Gutsy GibonMod_rewrite is a very important library to enable search engine friendly URLs in apache web server. Almost every framework takes advantage of this mod to make user experience more colorful while browsing a page. If you are not sure what is a search engine friendly URL, have a […]

funcion generica en controlador

En el archivo app_controller.php se escriben las funciones que heredan todos los controladores. class AppController extends Controller { var $components = array (‘RequestHandler’); var $helpers = array( ‘Html’, ‘Javascript’ ); function listar() { $total = $this->{$this->modelClass}->findCount(); $this->set(‘total’, $total ); if ( $this->params[‘form’] && $total > $this->params[‘form’][‘limit’] ){ $dir = $this->params[‘form’][‘dir’]; $limit = $this->params[‘form’][‘limit’]; $sort = […]

Borrar todos los .svn de un directorio

Para ejecutar un comando recursivamente en un directorio,por ejemplo en este caso, borrar todos los directorios “.svn” :una vez posicionados en el directorio padre o contenedor, ejecutar:find -name .svn -type d -exec rm -rf {} ; en MAC es: find . -name .svn -type d -exec rm -rf {} ;

URL Rewriting

An Introduction to Rewriting origianl post Readable URLs are nice. A well designed website will have a logical file system layout, with smart folder and file names, and as many implementation details left out as possible. In the most well designed sites, readers can guess at filenames with a high level of success. However, there […]

DBI perl os x osx leopard DBD, DBI::mysql

post original In order for you to use Perl to communicate with MySQL, you will need to install the Perl DBI and DBD::mysql modules. This process is quite straightfoward and standardized. To “make” the Perl modules, you MUST install the Mac OS X Developer tools which are on their own CD. These tools must match […]

Using JSON in CakePHP 1.2

original post I’m going to explain you how to setup CakePHP 1.2 to output JSON with help of Router::parseExtensions() and the JavascriptHelper::object() method. In this example we’re going to use a simple posts controller like the one in the Cake blog tutorial. First we need to let Cake know to parse .json extentions. Add the […]

json cakephp

definevar $helpers = array(‘Javascript’);in your app_controller.phpNOTA: esto pisa la variable helpers, por lo tanto no olvidar agregar ‘Html’ a la lista del array:var $helpers = array( ‘Html’, ‘Javascript’ ); luego este método transforma a Json:echo $javascript->object($arrayVariable);

Leopard VNC client

Leopard Tip: VNC Client I’ve been using “Chicken of the VNC” for about 6 months in Tiger. Although ”Chicken of the VNC” is a great app I have noticed that the development has been halted for over 2 years now. With the advent of OS 10.5 Leopard Apple has choice to include a VNC client […]

Cake rewrite en apache os x

para que anduviera el modulo de rewrite en apache2 en os x mac y para usar cake, tuve que cambiar una linea del httpd.conf donde dice: AllowOverride Nonecambie por: AllowOverride All en:/private/etc/apache2/httpd.conf # # Possible values for the Options directive are “None”, “All”, # or any combination of: # Indexes Includes FollowSymLinks SymLinksifOwnerMatch ExecCGI MultiViews […]

Instalar VirtualBox

Explicativo para Instalacion sobre Ubuntu.Bajar el archivo correspondiente de la página oficial:http://www.virtualbox.org/wiki/Downloads Antes de correr el archivo, asegurarse que estén las siguientes libs en el sistema:libqt3-mt y libxalan110. Para ello ir al gestor de paquetes Synaptic y simplemente buscar por cada uno e instalarlos si hiciere falta. Para instalar el paquete de virtual box hacer:sudo […]

Agregar usuario a un grupo

Así se crea un usuario y se asigna a un grupo# useradd -G admins,ftp,www,developers jerry admins,ftp,www,developers: son los grupos separados por com, sin espaciojerry: es el nombre de usuario para saber que grupos tiene un usuario:# id jerrypara saber si un grupo existe:# grep developers /etc/group para agregar un grupo:# groupadd developers para agregar usuario […]

Guía rápida de SVN – Referencia

Características: Directory versioning: Subversion sólamente graba el historial de los cambios en los archivos, pero crea un filesystem virtual que graba también los cambios hechos en directorios. True version history: Subversion permite agregar, copiar, borrar y renombrar archivos y directorios, no como los sitemas CVS que no soportan dichas operaciones. Atomic commits: Es una colección […]

Mac OS X screen capture tips

Creating a screen capture of part or all of the screen with OS X is pretty straightforward once you know what keys to press. Here’s a quick rundown: OS X screen capture keystrokes Command-Shift-3: takes a screen capture of the entire screen Command-Shift-4: allows you to select the area of the screen to capture Command-Shift-4 […]