Skip to content

Instantly share code, notes, and snippets.

View radutopala's full-sized avatar
🦅
Building in Go @trisoftro #golang

Radu Topala radutopala

🦅
Building in Go @trisoftro #golang
View GitHub Profile
@radutopala
radutopala / himawari.go
Created February 7, 2016 06:43 — forked from FZambia/himawari.go
Download Earth images from Himawari-8 satellite
// This script downloads Earth images from Himawari-8 satellite.
//
// After all images saved you can run this to generate video with ffmpeg:
//
// ffmpeg -framerate 20 -pattern_type glob -i '*.png' -c:v libx264 -pix_fmt yuv420p video.mp4
// ffmpeg -i video.mp4 -i Morning_Mood_by_Grieg.mp3 -vcodec copy -acodec copy -shortest audiovideo.mp4
// ffmpeg -i audiovideo.mp4 -vf pad="ih*16/9:ih:(ow-iw)/2:(oh-ih)/2" output.mp4
//
// Most of code here from https://github.com/avinashbot/himawari
package main
@radutopala
radutopala / ApiExceptionListener.php
Last active April 12, 2016 09:55
Api Exception Listener
<?php
namespace TSS\CoreBundle\EventListener;
use Psr\Log\LoggerInterface;
use Symfony\Component\HttpFoundation\JsonResponse;
use Symfony\Component\HttpKernel\Event\GetResponseForExceptionEvent;
use Symfony\Component\HttpFoundation\Response;
use Symfony\Component\HttpKernel\Exception\HttpExceptionInterface;
@radutopala
radutopala / composer_gzip_test.php
Last active March 3, 2020 17:26
Composer GZIP decoding test
<?php
$retries = 0;
function fetch() {
global $retries;
echo "Retry " . $retries . " | ";
$opts = array(
@radutopala
radutopala / array_iterator.php
Created June 26, 2017 14:42
RecursiveArrayIterator example
<?php
$configs = [
'test' => [
'alfa' => 'beta'
],
'gamma' => 'first'
];
$iterator = new \RecursiveArrayIterator($configs);