Saturday, July 7, 2018

simple youtube download pc window

What this about?
The simplest youtube downloader

Why?

  • Most online youtube downloader website being taken down
  • While free youtube downloader bloated with ads and things you don't need

Solution
Command line youtube downloader, Im going to teach how

STEP 1
Go to http://rg3.github.io/youtube-dl/download.html and download "Windows exe"



STEP 2
Open command line (also called CMD)


STEP 3

  1. Name of the file you download is "youtube-dl.exe"
  2. Go the where you download it
  3. Copy the file_path, in my case is C:\Downloads
  4. Then go to the CMD, paste cd C:\Downloads and press enter

STEP 4
At CMD type youtube-dl https://www.youtube.com/watch?v=FLQnavmeC9k
Press enter and you will see the progress. Done!


Advance
Youtube download to audio mp3

Sunday, July 1, 2018

cakephp3 laragon phpunit No code coverage driver is available

If you using CakePHP3 inside Laragon

Then when you study CakePHP3 testing you can generate the "testing results" into HTML

Problem is

phpunit --coverage-html webroot/coverage tests/TestCase/Model/Table/ArticlesTableTest

Return you this error "No code coverage driver is available"

Reason: Because no XDEBUG

Solution: Install it


How to install it, just follow this tutorial: https://forum.laragon.org/topic/264/tutorial-how-to-add-xdebug-to-laragon


I just repeat as the link

Check XDEBUG install or not, go to http://localhost/?q=info then search "xdebug"

If not install, press "ctrl + a" to select the whole page

Then go here https://xdebug.org/wizard.php and paste the whole page, then press button "Analyse my phpinfo() output"

The xdebug wizard will tell you what to do, in my case, to install XDEBUG into Laragon is

  1. Download php_xdebug-2.6.0-7.1-vc14-x86_64.dll
  2. Move the downloaded file to C:\laragon\bin\php\php-7.1.12-Win32-VC14-x64\ext
  3. Edit C:\laragon\bin\php\php-7.1.12-Win32-VC14-x64\php.ini and add the line
  4. zend_extension = C:\laragon\bin\php\php-7.1.12-Win32-VC14-x64\ext\php_xdebug-2.6.0-7.1-vc14-x86_64.dll
  5. Restart the webserver

After restart web server, run again the command

phpunit --coverage-html webroot/coverage tests/TestCase/Model/Table/ArticlesTableTest

and you will get, at the end of the console

Generating code coverage report in HTML format ... done

Then to access the HTML results, go

http://localhost/mycakeapp/coverage/index.html

-end-

laragon CMDER command line shell is not recognized as an internal or external command, operable program or batch file

Problem

When I use Laragon CMDER command line

I receive error when type "bin/cake"

'bin' is not recognized as an internal or external command,
operable program or batch file.

Or

vendor/bin/phpunit

Return

'vendor' is not recognized as an internal or external command,
operable program or batch file.


In my case, changing "/" into "\" works

So use

bin\cake instead of bin/cake

or

vendor\bin\phpunit instead of vendor/bin/phpunit

will works