Buffering WordPress rendered page

if( current_user_can('manage_options') )
{
add_action('template_redirect', 'YOURPLUGIN_buffer_start', 0);
}

function YOURPLUGIN_buffer_start() {
add_action('shutdown', 'YOURPLUGIN_buffer_stop', PHP_INT_MAX);
ob_start('YOURPLUGIN_modify_content');
}
function YOURPLUGIN_buffer_stop() {
ob_end_flush();
}
function YOURPLUGIN_modify_content($content) {

$dom = new DomDocument();
$dom->loadHTML($content);
$styles=array();
foreach ($dom->getElementsByTagName('link') as $node)
{
if($node->hasAttribute('rel') && $node->getAttribute('rel')=='stylesheet' )
{
$styles[]=$node->getAttribute("href");
}

}

//modify $content
return serialize($styles).$content;
}

simplest way to install FFmpeg on CentOS

After heading to the official ffmpeg download page, click the link under Linux Static Builds.

Click the appropriate (32- or 64-bit) and desired (snapshot or numbered) release to download.

If the libav version of ffmpeg was installed, remove it. The two can not reside on the same machine.

Extract the files (and two directories) as follows:

  • For single-user systems: to $HOME/bin
  • For multi-user setups: to /usr/local/bin

Static build install is done and ffmpeg is ready to use.

% wget http://johnvansickle.com/ffmpeg/builds/ffmpeg-git-64bit-static.tar.xz
% tar xJvf ffmpeg-git-64bit-static.tar.xz
% cd ffmpeg-git-20150427-32bit-static
% ./ffmpeg

maybe useful!

http://askubuntu.com/questions/373322/how-to-replace-avconv-with-the-real-ffmpeg-and-have-it-work-right

http://www.ffmpeg.org/download.html

http://johnvansickle.com/ffmpeg/

http://superuser.com/questions/801159/cannot-decompress-tar-xz-file-getting-xz-cannot-exec-no-such-file-or-direct

yum install xz

http://thelinuxfaq.com/258-how-to-install-avconv-on-centos-rhel-7-6

http://stackoverflow.com/questions/11697214/how-to-set-the-tmpdir-environment-variable-to-another-directory

https://www.virag.si/2012/01/web-video-encoding-tutorial-with-ffmpeg-0-9/

https://trac.ffmpeg.org/wiki/Scaling%20(resizing)%20with%20ffmpeg

http://superuser.com/questions/624563/how-to-resize-a-video-to-make-it-smaller-with-ffmpeg

Best WordPress Frameworks

Plenty of WordPress frameworks are available on the internet. Most of them built for WordPress theme development. There are frameworks for plugins. Options panel is also available. As WordPress frameworks built for faster workflow, most of the developers depending on frameworks. WordPress frameworks help to standardise development and increases flexibility.

More Details:

http://www.cssauthor.com/wordpress-frameworks/

Yii2 installation digest

this is based on freetuts.org and the Yii forum site…

Let’s start by installing Composer for Windows. Download the installer and run it. Installer will ask you to locate php.exe. If you are using xampp, browse to :

C:\xampp\php\

 

and select the purple php file, that is php.exe. If you are using wamp, browse to :

 

C:\wamp\bin\php\php5.5.12\

Continue reading Yii2 installation digest