Skip to content

Instantly share code, notes, and snippets.

View madmis's full-sized avatar
🙃
Always ready for challenges

Dmytro madmis

🙃
Always ready for challenges
View GitHub Profile
@jgornick
jgornick / seconds-to-hours-minutes-seconds.php
Created May 13, 2013 15:24
PHP: Convert seconds to hours:minutes:seconds.
<?php
$diff = 450752;
$format = sprintf('%02d:%02d:%02d', ($diff / 3600), ($diff / 60 % 60), $diff % 60);
echo $format;
@leon
leon / nginx.conf
Created June 29, 2012 16:34
Nginx PHP-FPM Symfony 2 minimal config
server {
listen 80;
server_name localhost;
root /home/website/web;
rewrite ^/app\.php/?(.*)$ /$1 permanent;
try_files $uri @rewriteapp;
location @rewriteapp {
@jakzal
jakzal / KernelAwareTest.php
Last active June 27, 2024 16:20
KernelAwareTest
<?php
require_once dirname(__DIR__).'/../../../../app/AppKernel.php';
/**
* Test case class helpful with Entity tests requiring the database interaction.
* For regular entity tests it's better to extend standard \PHPUnit_Framework_TestCase instead.
*/
abstract class KernelAwareTest extends \PHPUnit_Framework_TestCase
{