Useful tools for obfuscated code

HTML/Oct/Hex Decoder : This tool will attempt to revert any type of encoding (including Hex, html, Oct, etc).

UnPHP: A free online service to decode obfuscated PHP code. A good chance to solve your issue.

PHP Decoder: The same as above and still useful (if UnPHP was not successful).

Eval base64_decode: also useful for PHP code

http://ddecode.com/phpdecoder/?home

For JavaScript

Script Asylum: A good tool for escaping/encoding text, HTML or JavaScript.

Base64: HEX encode/decode

 

Telegram self-signed certificate on CentOS + Nginx

Simply create cert via Openssl as described here:

https://core.telegram.org/bots/self-signed

after that, configure the nginx :

https://www.digitalocean.com/community/tutorials/how-to-create-an-ssl-certificate-on-nginx-for-ubuntu-14-04

jump to step 2…

good luck!

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;
}

PHP.ini Common Settings

php_value max_input_vars 4500

php_value upload_max_filesize 40M
ini_set(‘post_max_size’, ’64M’);

max_allowed_packet=100M

define('WP_MEMORY_LIMIT', '64M');

====

ini_set(‘max_execution_time’, 300);

set_time_limit(0);

ini_get(‘max_execution_time’);

ignore_user_abort(true);

 

 

 

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