Skip to content

Instantly share code, notes, and snippets.

View moay's full-sized avatar

Manuel Voss moay

View GitHub Profile
@moay
moay / ItemNormalizer.php
Created June 22, 2020 12:22
Normlizer allowing nested ids
<?php
namespace App\Normalizer;
use ApiPlatform\Core\Api\IriConverterInterface;
use ApiPlatform\Core\Api\ResourceClassResolverInterface;
use ApiPlatform\Core\DataProvider\ItemDataProviderInterface;
use ApiPlatform\Core\Exception\InvalidArgumentException;
use ApiPlatform\Core\Metadata\Property\Factory\PropertyMetadataFactoryInterface;
use ApiPlatform\Core\Metadata\Property\Factory\PropertyNameCollectionFactoryInterface;
@moay
moay / imapsync.md
Last active June 29, 2023 05:51 — forked from dsoares/imapsync.md
Install and use imapsync in Mac OS X

Install and use imapsync in Mac OS X

brew install imapsync

Run (without ssl)

imapsync --host1 imap.from.server --user1 foo --password1 secret1 --host2 imap.dest.server --user2 bar --password2 secret2

Run (with ssl)

@moay
moay / player.js
Last active March 23, 2017 10:52
Drop-in replacement for sublime video player based on video.js and magnificpopup
// CONFIG
var flash_fallback = "https://mysite.com/path/to/video-js.swf";
var language = "en";
function initializePlayer(){var css='@charset "utf-8";.vjs-default-skin{color:#ccc}@font-face{font-family:VideoJS;src:url(font/vjs.eot);src:url(font/vjs.eot?#iefix) format(\'embedded-opentype\'),url(font/vjs.woff) format(\'woff\'),url(font/vjs.ttf) format(\'truetype\'),url(font/vjs.svg#icomoon) format(\'svg\');font-weight:400;font-style:normal}.vjs-default-skin .vjs-slider{outline:0;position:relative;cursor:pointer;padding:0;background-color:#333;background-color:rgba(51,51,51,.9)}.vjs-default-skin .vjs-slider:focus{-webkit-box-shadow:0 0 2em #fff;-moz-box-shadow:0 0 2em #fff;box-shadow:0 0 2em #fff}.vjs-default-skin .vjs-slider-handle{position:absolute;left:0;top:0}.vjs-default-skin .vjs-slider-handle:before{content:"e009";font-family:VideoJS;font-size:1em;line-height:1;text-align:center;text-shadow:0 0 1em #fff;position:absolute;top:0;left:0;-webkit-transform:rotate(-45deg);-moz-transform:rotate(-45deg);-ms-trans
<?php
/**
* Formats a JSON string for pretty printing
*
* @param string $json The JSON to make pretty
* @param bool $html Insert nonbreaking spaces and <br />s for tabs and linebreaks
* @return string The prettified output
* @author Jay Roberts
*/