Mindblown: a blog about philosophy.

  • iframe auto height

    [php] <script type=’text/javascript’> function setIframeHeight( iframeId ) /** IMPORTANT: All framed documents *must* have a DOCTYPE applied **/ { var ifDoc, ifRef = document.getElementById( iframeId ); try { ifDoc = ifRef.contentWindow.document.documentElement; } catch( e ) { try { ifDoc = ifRef.contentDocument.documentElement; } catch(ee) { } } if( ifDoc ) { ifRef.height = 1; ifRef.height =…

  • php security – XSS XSS SQL Injection Spoofed Form Input CSRF File Upload Including Files eval() Register Globals Magic Quotes

    Introduction Different Types of Attack XSS SQL Injection Spoofed Form Input CSRF File Uploads Including Files eval() Register Globals Magic Quotes Error Reporting PHP 5 Plain Text Passwords Taking it further: Salting Conclusion Enjoy this guide/find it useful? Please consider donating! Introduction Since PHP is a very high-level scripting language, some of the potential security…

  • How to Disable or Limit Post Revision in WordPress

    // For Disable Post Revision WordPress define(‘WP_POST_REVISIONS’, ‘false’); // For Limit Post Revision WordPress define(‘WP_POST_REVISIONS’, 5);

  • wordpress custom post type fugue icons

    <?php add_action( ‘admin_head’, ‘cpt_icons’ ); function cpt_icons() { ?> <style type=”text/css” media=”screen”> #menu-posts-POSTTYPE .wp-menu-image { background: url(<?php bloginfo(‘template_url’) ?>/images/YOURIMAGE.png) no-repeat 6px -17px !important; } #menu-posts-POSTTYPE:hover .wp-menu-image, #menu-posts-POSTTYPE.wp-has-current-submenu .wp-menu-image { background-position:6px 7px!important; } </style> <?php } ?  

  • Decrease windows 7 sp1 service pack 1 disk space size

    hust make things easier open command prompt from run then type cmd note run  as administrator   this   dism /online /cleanup-image /spsuperseded   enjoy up to 2 giga of free space may be more it is safe it is from microsoft note mine 🙂

  • Useful PHP Functions and Features You Need to Know

    Even after using PHP for years, we stumble upon functions and features that we did not know about. Some of these can be quite useful, yet underused. With that in mind, I’ve compiled a list of nine incredibly useful PHP functions and features that you should be familiar with.   1. Functions with Arbitrary Number of…

  • useful wp-config variables for WordPress

    The majority of WordPress configuration settings are found, and are easily changed, from the WordPress admin panel. But did you know about the settings and options you can enable in the wp-config.php file? Lets run through some that we’ve found useful over time. To use them, place the code into your wp-config file which is…

  • Managing Zend Framework Layouts ( change – enable – disable – set – Switching )

    One immediate benefit developers stand to gain from adopting a framework such as the Zend Framework is a final resolution on managing website layouts and pages. Gone is the need to devise strategies for important tasks such as maintaining page headers and footers, separating the bulk of a page’s logic from its interface, and managing the…

  • EasyApache Profile clone copy

    alot of my friends ask how can the clone their apache profile to more than one  server for easyapache this is simple steps from putty ssh or any ssh client cd /var/cpanel/easy/apache/profile/custom wget -c -q http://www.mohamedsharaf.net/appacheprofile.yaml /scripts/easyapache –profile=/var/cpanel/easy/apache/profile/custom/appacheprofile.yaml –build /etc/init.d/httpd restart /etc/init.d/mysql restart

Got any book recommendations?