my blog

snippets of stuff for quick reference

Main menu

Skip to primary content
Skip to secondary content
  • Home

Post navigation

← Older posts

create / enable layout file

Posted on May 9, 2012 by primordial
Reply

To create a default layout file in zend you can use Zend_Tool from the command line

zf enable layout

Which will create a default layout file in ‘application/layouts/scripts’ and modify your application.ini file.

Posted in zend | Leave a reply

zend framework – set development mode

Posted on May 9, 2012 by primordial
Reply

Zend framework defaults to production mode, to set development mode add the following to your .htaccess file

SetEnv APPLICATION_ENV development
Posted in zend | Leave a reply

wampserver, windows 7 and zend

Posted on May 9, 2012 by primordial
Reply

If you ever have to work with Zend framework on wampserver & windows 7 (god help me), set the include path in your php.ini to something like

include_path = ".;c:\php\includes;C:\Program Files (x86)\Zend\ZendServer\share\ZendFramework\library"
Posted in zend | Leave a reply

Rails 3 – force production mode

Posted on April 19, 2012 by primordial

If you need to force production mode in rails 3 try adding to /config/environemtn.rb the following line

ENV['RAILS_ENV'] ||= 'production'
Posted in stuff and nonsense

postgres – show tables

Posted on April 19, 2012 by primordial
Reply

To show tables on the current database, equivalent to mysql “show tables” use

\dt
Posted in MySQL to Postgres | Leave a reply

postgres status on debian

Posted on April 1, 2012 by primordial
Reply

To check the status of postgres on a typical debian box try

/etc/init.d/postgresql status
Posted in MySQL to Postgres | Leave a reply

view rails production log

Posted on April 1, 2012 by primordial
Reply

To follow a rails production log

tail -f /path_name/log/production.log
Posted in debian, rails3 | Leave a reply

Cakephp v2 Fixtures, data types

Posted on March 21, 2012 by primordial
Reply

CakePHP internal data type. Currently supported:

  • string: maps to VARCHAR
  • text: maps to TEXT
  • integer: maps to INT
  • float: maps to FLOAT
  • datetime: maps to DATETIME
  • timestamp: maps to TIMESTAMP
  • time: maps to TIME
  • date: maps to DATE
  • binary: maps to BLOB
Posted in cakephp, phpunit | Leave a reply

var_dump equivalent in ruby

Posted on March 11, 2012 by primordial
Reply

The equivalent of a PHP var_dump(object) or print_r(object) in RoR is

object.inspect
Posted in rails3 | Leave a reply

amend iptables firewall rules

Posted on February 22, 2012 by primordial
Reply

edit the file /etc/iptables.up.rules

then when you’ve done that

iptables-restore /etc/iptables.up.rules

to load the new ruleset

Posted in debian | Leave a reply

Post navigation

← Older posts

Archives

  • May 2012
  • April 2012
  • March 2012
  • February 2012
  • January 2012
  • December 2011
  • November 2011
  • October 2011

Meta

  • Log in
Proudly powered by WordPress