Author Archives: mindeater

Network windows 7 and OS X

Goto Start Menu Search for: security Click on Local Security Policy Goto Local Policies> Security Options Double Click on Network security: LAN Manager Authentication Look in Network for the OS X computer you have enabled sharing on ! Change level … Continue reading

Posted in OS X | Comments Off

add xCode install of git to your path

http://vandadnp.wordpress.com/2012/04/06/git-from-command-line-after-installing-xcode-on-os-x-lion/ export PATH=”/Applications/Xcode.app/Contents/Developer/usr/libexec/git-core/”:$PATH

Posted in OS X, Unix | Comments Off

OS X apache permissions

Setting up a web server on OS X other than the built in one and serving sites from the Document directory always causes permissions headaches this stackoverflow response helped nut it out ( http://stackoverflow.com/questions/2001881/correct-owner-group-permissions-for-apache-2-site-files-folders-under-mac-os-x ) In Summary This is the most … Continue reading

Posted in PHP, Unix, Web Programming, Websites | Comments Off

Filter WordPress menu

// Filter wp_nav_menu() to add additional links and other output function new_nav_menu_items($items) { // gets passed a string of <li>’s $homelink = ‘<li><a href=”‘ . home_url( ‘/’ ) . ‘”>’ . __(‘Home’) . ‘</a></li>’; $items = $homelink . $items; return … Continue reading

Posted in Wordpress | Tagged , | Comments Off

MYSql copy tables

create table tablename_new like tablename; -> this will copy the structure… insert into tablename_new select * from tablename; -> this would copy all the data

Posted in MySQL | Tagged , | Comments Off

Find and replace in MYSQL

Updating Data in MYSql update [table_name] set [field_name] = replace([field_name],’[string_to_find]‘,’[string_to_replace]‘); For moving wordpress installs to repair the guid UPDATE wp_posts SET guid = replace( guid, ‘web/’, ” ) ;

Posted in MySQL, Wordpress | Tagged , , , , | Comments Off

WordPress Super Loop

// if everything is in place and ready, let’s start the loop <?php if ( have_posts() ) : while ( have_posts() ) : the_post(); ?> // to display ‘n’ number of posts, we need to execute the loop ‘n’ number … Continue reading

Posted in Wordpress | Tagged , | Comments Off

Moving Virtuemart

When moving virtuemart from a build directory Edit administrator\components\com_virtuemart\virtuemart.cfg.php define( ‘URL’, str_replace(“/administrator/”,”/”,JURI::base())); define( ‘SECUREURL’, str_replace(“/administrator/”,”/”,JURI::base()));

Posted in Joomla | Tagged , | Comments Off

Chmod Web directories from the command line

find /path/to/base/dir -type d -print0 | xargs -0 chmod 755 find /path/to/base/dir -type f -print0 | xargs -0 chmod 755 these guys rock http://superuser.com/questions/91935/how-to-chmod-755-all-directories-but-no-file-recursively

Posted in Unix | Tagged , | Comments Off

Background Image to the bottom of a page

html { min-height: 100%; height: auto; } body { background:url(/images/bg-image.jpg) right bottom no-repeat; }

Posted in CSS | Tagged | Comments Off