Monthly Archives: abril, 2011

Visor PDF con JS (JQuery + Google Viewer API)

abril 28th, 2011 Posted by jquery 0 thoughts on “Visor PDF con JS (JQuery + Google Viewer API)”

0. Agregar Jquery y fancybox (JS + CSS) al head

1. En el JS


$(".test").fancybox({
'width' : '75%',
'height' : '90%',
'autoScale' : false,
'transitionIn' : 'none',
'transitionOut' : 'none',
'type' : 'iframe'
});

2. En el html


<a class="prueba" href="http://docs.google.com/gview?url=http://mysite.com/mipdf.pdf&embedded=true">Prueba</a>

AppleScript

abril 27th, 2011 Posted by applescript 0 thoughts on “AppleScript”

http://mactoids.com/learn-applescript-and-automate-your-mac/

Como apagaron el cartel de la 9 de Julio

abril 27th, 2011 Posted by varios 0 thoughts on “Como apagaron el cartel de la 9 de Julio”

Cómo setear desde un Controller variables de un Zend_Layout

abril 26th, 2011 Posted by php, zend framework 0 thoughts on “Cómo setear desde un Controller variables de un Zend_Layout”

En el controller:
 

class MyController extends Zend_Controller_Action {
    public function init() {
        $this->_helper->layout->getView()->myVar = 'Value';
    }
}

En el layout.phtml

<? echo $this->myVar; ?>

Como debuggear con MAMP y Netbeans

abril 26th, 2011 Posted by apache, mac, netbeans, php 0 thoughts on “Como debuggear con MAMP y Netbeans”

1. Desde la consola:

vi /Applications/MAMP/conf/php5.3/php.ini

2. Buscar [xdebug] y agregar:

[xdebug]
xdebug.default_enable=1

xdebug.remote_enable=1
xdebug.remote_handler=dbgp
xdebug.remote_host=localhost
xdebug.remote_port=9000
xdebug.remote_autostart=1

zend_extension=”/Applications/MAMP/bin/php5.3/lib/php/extensions/no-debug-non-zts-20090626/xdebug.so”

3. Reinicar MAMP
4. En Netbeans click derecho sobre el proyecto -> “Debug”

Como escuchar radio Metro 95.1 en Mac

abril 26th, 2011 Posted by mac 0 thoughts on “Como escuchar radio Metro 95.1 en Mac”

1. Bajar VLC
2. File -> Open Network

3. Ingresar la URL http://streaming.metro951.com/metro

Como ignorar carpetas SVN – Eclipse

abril 24th, 2011 Posted by eclipse, svn 0 thoughts on “Como ignorar carpetas SVN – Eclipse”

1. Window – Preferences
2. Team -> Ignored Resources
3. Add Pattern “lib” (por ejemplo)
4. Apply

Cómo setear el include path de php para un determinado Virtual Host de Apache

abril 24th, 2011 Posted by apache, php 0 thoughts on “Cómo setear el include path de php para un determinado Virtual Host de Apache”

Se puede hacer editando el archivo http.conf

Por ejemplo:

<VirtualHost *>
ServerName mysite.local
DocumentRoot "/path/to/site"
<Directory "/path/to/site">
php_value include_path ".:/include/path/"
</Directory>
</VirtualHost>

MAMP carga muy lento cuando se llama a Zend_Session::start();

abril 24th, 2011 Posted by php, zend framework 0 thoughts on “MAMP carga muy lento cuando se llama a Zend_Session::start();”

El session handler tiene algún problema al intentar guardar las sessiones en disco.

Entonces se puede utilizar Zend para utilizar otro adapter y por ejemplo guardar las sesiones en una BD.

// Comment
$db = Zend_Db::factory('Pdo_Mysql', array(
    'host'        =>'localhost',
    'username'    => 'dbuser',
    'password'    => '****',
    'dbname'    => 'mydb'
));

//you can either set the Zend_Db_Table default adapter
//or you can pass the db connection straight to the save handler $config
Zend_Db_Table_Abstract::setDefaultAdapter($db);
$config = array(
    'name'           => 'session',
    'primary'        => 'id',
    'modifiedColumn' => 'modified',
    'dataColumn'     => 'data',
    'lifetimeColumn' => 'lifetime'
);

//create your Zend_Session_SaveHandler_DbTable and
//set the save handler for Zend_Session
Zend_Session::setSaveHandler(new Zend_Session_SaveHandler_DbTable($config));

// start session
Zend_Session::start();

Trucos Mac

abril 20th, 2011 Posted by mac 0 thoughts on “Trucos Mac”

1) Divertido comando de consola que dice lo que le pidamos:

# say i love mac

2) Para poner el protector de pantalla como fondo de la mac:

# /System/Library/Frameworks/ScreenSaver.framework/Resources/ScreenSaverEngine.app/
Contentes/MacOs/ScreenSaverEngine -background

Copyright © 2018 programadorfreelanceargentina.com

Programador Freelance Argentina