CentOS 7 + SELinux + Apache + PHP write/access permission

CentOS 7 have SELinux, it is security enhancement to Linux which allows users more control over access control. SELinux make problem to access or write files or directories – Can’t serve files on directory – Can’t write to file SELinux is blocking the read/write operations # chcon -Rv –type=httpd_sys_rw_content_t /var/www/html/ (if you want to allow … Read more

Facebook Delight Text Keywords

Facebook Delight Text display celebration balloons on Facebook Page / Post. Facebook have selected Greeting Text Keywords from different languages. Facebook Delight Text give celebration feel to Facebook Users. Keywords:[“Congrats”,”تهانينا”,”مبروك”,”ألف مبروك”,”مبارك”,”Glückwunsch”,”Gratuliere”,”Enhorabuena”,”Felicitaciones”,”Félicitations”,”बधाई”,”Selamat”,”Congratulazioni”,”おめでとう”,”축하해”,”축하해요”,”Мои поздравления”,”Поздравляем”,”Поздравляю”,”ยินดีด้วย”,”Tebrikler”,”恭喜”,”Geluk”,”অভিনন্দন”,”Gratulace!”,”Til lykke”,”Tillykke”,”Συγχαρητήρια”,”Paljon onnea”,”Onnea”,”અભિનંદન”,”מזל טוב”,”Gratula”,”Čestitam”,”Čestitke”,”Čestitamo”,”അഭിനന്ദനങ്ങൾ”,”ಶುಭಾಶಯ”,”Tahniah”,”Grattis”,”अभिनंदन”,”ਵਧਾਈਆਂ”,”Parabéns”,”Gratki”,”Gratulacje”,”Felicitări!”,”Gratulujem”,”Blahoželám”,”Gefeliciteerd”,”வாழ்த்துகள்”,”வாழ்த்துக்கள்”,”అభినందనలు”,”مبارکباد”,”Chúc mừng”,”Честитам”,”Hongera”] What is a Self-XSS scam? A Self-XSS scam usually works by promising to help you access somebody else’s account. … Read more

Amazon DynamoDB Formatted JSON using JQ

Linux sed is useful tool to format and transform plain text. But sed is not so useful for structured data like JSON. JQ is a sed-like tool easily deal with JSON. ./jq is a lightweight and flexible command-line JSON processor. Install jq on OS X: brew install jq Install jq on Ubuntu: apt-get install jq … Read more

Access Skype SQLite Database

I was working for Online Radio Server setup with Icecast and Skype. This Radio Station was using Skype Group Calls with real listeners of station then I have to feed Live Skype Audio to Icecast Radio Server as Input. Radio Setup Tools Online Radio Schedule with Skype & Icecast – SAM Broadcaster – Icecast Server … Read more

JavaScript Detecting Internet Connection

Offline.js automatically alerts users for their internet connection using AJAX requests. Download offline.min.js offline.html <script src=”offline.min.js”></script> <script> Offline.options = {checks: {xhr: {url: ‘offline.html’}}}; var run = function(){ // check internet connection Offline.check(); // return internet connection state console.log(Offline.state); document.getElementById(“status”).innerHTML = Offline.state; } setInterval(run, 5000); </script> <div id=”status”>up</div>

Bottle: Python Web Framework

I really like Bottle: Python Web Framework. Bottle is very simple, fast and powerful Python micro-framework. It is perfect for small web applications and rapid prototyping where you need simple/small API server. Bottle is a fast, simple and lightweight WSGI micro web-framework for Python. Installation Install Bottle with pip install bottle or download the source … Read more

FFMPEG make Video Lyrics using JPG MP3 SRT File

FFMPEG make Video Lyrics using JPG MP3 SRT File Input Files – Image (test.jpg) – MP3 File (test.mp3) – SRT Lyrics (test.srt) FFMPEG Command # ffmpeg -loop 1 -y -i test.jpg -i test.mp3 -vf subtitles=”f=test.srt:force_style=’FontName=Arial,FontSize=14″ -shortest test1.mp4 Output File: test1.mp4 SRT Lyrics Preview 1 00:00:00,330 –> 00:00:04,936 Hello Feifei. I didn’t know you shopped at … Read more

How to add MP3 audio delayed in MP4 video?

FFMPEG Command: Add MP3 Audio file delayed in MP4 video file # ffmpeg.exe -i “fox-story.mp4” -itsoffset 5.00 -i “fox-story.mp3” -map 0:v -map 1:a -vcodec copy -acodec copy “The Fox and Crow Story.mp4” Input: fox-story.mp4 and fox-story.mp3 Output: The Fox and Crow Story.mp4 -itsoffset 5.00 -i “movie.mp3” Offsets timestamps of audio streams by 5.00 seconds -map … Read more

Song Lyrics: lrc2srt and srt2json

LRC2SRT.php <?php function lrc2srt( $lrc ) { $lrc = explode( “\n”, $lrc ); $srt = “”; $lines = array(); foreach ( $lrc as $lrcl ) { if ( preg_match( “|\[(\d\d)\:(\d\d)\.(\d\d)\](.+)|”, $lrcl, $m ) ) { $lines[] = array( ‘time’ => “00:{$m[1]}:{$m[2]},{$m[3]}0”, // convert to SubRip-style time ‘lyrics’ => trim( $m[4] ) ); } } for … Read more