• json
    Ubuntu,  Uncategorized

    Displaying json output in linux terminal

    Many times when I’m testing an api, I like to go into chrome, copy the output to CURL, and use the terminal to see what that API will return. To copy curl, just follow the following gif steps In order not to have to type the input data repeatedly in chrome, we can play curl in the terminal, and run it concatenating in jq (install it here) So when running curl in the terminal, include the jq at the end of the command, like this To transform

  • Uncategorized

    How to install ffmpeg on a Amazon Linux AMI

    I recently had the need to create video thumbnails in a project, and to generate them I used the good old ffmpeg . No tutorial worked properly for installation on an Amazon EC2 instance, and that was the only way I could achieve that. This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters Show hidden characters mkdir -v -p /usr/local/bin/ffmpeg cd /usr/local/bin/ffmpeg wget https://johnvansickle.com/ffmpeg/releases/ffmpeg-release-i686-static.tar.xz tar -v -xf ffmpeg-release-i686-static.tar.xz --strip-components=1 rm -v -f ffmpeg-release-i686-static.tar.xz ln -snf /usr/local/bin/ffmpeg/ffmpeg /usr/bin/ffmpeg ln -snf /usr/local/bin/ffmpeg/ffpropbe /usr/bin/ffpropbe view raw…

  • Uncategorized

    Changing Laravel monolog timezone

    I recently worked on a project where laravel logs were being uploaded to amazon cloudwatch . The problem was that the server time was set to UTC (which is correct), but laravel was recording the logs using the timestamp that was in the settings (which for me is incorrect, I have seen several places complaining about this approach) . Well, to avoid having to rewrite the Log class, I changed it directly within the app/Providers/AppServiceProvider.php, changing the monolog timezone, as shown in the gist below. Don’t forget to `php artisan config:cache` to reload settings


Notice: ob_end_flush(): failed to send buffer of zlib output compression (0) in /home/samu/public_html/blog/wp-includes/functions.php on line 5275