Skip to content

Instantly share code, notes, and snippets.

View fprochazka's full-sized avatar
🏠
Working from home

Filip Procházka fprochazka

🏠
Working from home
View GitHub Profile
@fprochazka
fprochazka / MimeTest.java
Last active September 27, 2019 10:27
Test what mime type detection utilities are available on your installation
package com.cogvio.util.nio;
import sun.nio.fs.AbstractFileTypeDetector;
import sun.nio.fs.GnomeFileTypeDetector;
import java.lang.reflect.Field;
import java.nio.file.Path;
import java.nio.file.spi.FileTypeDetector;
import java.util.*;
@fprochazka
fprochazka / checkstyle.xml
Created February 13, 2017 22:44
Java coding style
<?xml version="1.0"?>
<!DOCTYPE module PUBLIC
"-//Puppy Crawl//DTD Check Configuration 1.3//EN"
"http://www.puppycrawl.com/dtds/configuration_1_3.dtd">
<module name="Checker">
<!--<property name="fileExtensions" value="java, xml, properties"/>-->
<module name="SuppressionFilter">
<property name="file" value="${checkstyle.config.path}/suppressions.xml"/>
</module>

Keybase proof

I hereby claim:

  • I am fprochazka on github.
  • I am fprochazka (https://keybase.io/fprochazka) on keybase.
  • I have a public key whose fingerprint is 2D51 7E80 0F70 8C00 D9EE 1683 7EB2 C006 27B9 7BDA

To claim this, I am signing this object:

{
"functionCalls": [
{
"function": "\\array_diff_assoc",
"position": 0
},
{
"function": "\\array_diff_key",
"position": 0
},
@fprochazka
fprochazka / composer.php.ini
Last active June 14, 2022 15:09
Composer with different ini or with different PHP
[php]
memory_limit = -1
max_execution_time = 0
date.timezone = "Europe/Prague"
realpath_cache_size = "4096K"
[opcache]
opcache.enable = 1
opcache.enable_cli = 1
opcache.memory_consumption = 256
<?xml version="1.0" encoding="UTF-8"?>
<opml version="1.0">
<body>
<outline text="Fun" title="Fun">
<outline text="The Oatmeal - Comics, Quizzes, &amp; Stories" title="The Oatmeal - Comics, Quizzes, &amp; Stories" type="rss" xmlUrl="http://theoatmeal.com/feed/rss" htmlUrl="http://theoatmeal.com/"/>
<outline text="xkcd.com" title="xkcd.com" type="rss" xmlUrl="http://xkcd.com/rss.xml" htmlUrl="http://xkcd.com/"/>
<outline text="The Daily WTF" title="The Daily WTF" type="rss" xmlUrl="http://syndication.thedailywtf.com/TheDailyWtf" htmlUrl="http://thedailywtf.com/"/>
<outline text="PHD Comics" title="PHD Comics" type="rss" xmlUrl="http://www.phdcomics.com/gradfeed.php" htmlUrl="http://www.phdcomics.com"/>
<outline text="The Perry Bible Fellowship" title="The Perry Bible Fellowship" type="rss" xmlUrl="http://pbfcomics.com/feed/feed.xml" htmlUrl="http://www.google.com/reader/view/feed%2Fhttp%3A%2F%2Fpbfcomics.com%2Ffeed%2Ffeed.xml"/>
<outline text="Oglaf! -- Comics. Often dirty." title="Oglaf! -- Comics. Ofte
@fprochazka
fprochazka / RenderBlockHelperMacro.php
Created February 11, 2016 19:10
Vyrenderování jednoho bloku z latte šablony
<?php
use Latte;
use Latte\Compiler;
class RenderBlockHelperMacro extends \Latte\Macros\MacroSet
{
public function __construct(Compiler $compiler)
{
<?php
use Kdyby;
use Kdyby\RabbitMq\Connection;
use Kdyby\RabbitMq\DI\RabbitMqExtension;
use Nette;
use Nette\Reflection\ClassType;
use PhpAmqpLib\Message\AMQPMessage;
use Tester;
@fprochazka
fprochazka / sqlSelect.php
Created November 30, 2015 22:16 — forked from xbukovsk-zz/sqlSelect.php
sql select
<? php
public static function getAllIndicatorValuesOverview($userId = null) {
$surveys = self::getConnection()->query(
'SELECT surveys.surveyId,surveys.year,user.organizationName
FROM surveys
LEFT JOIN user ON surveys.userId=user.userId'
)->fetchAll();
foreach($surveys as &$survey) {
@fprochazka
fprochazka / AssetsPublishingCssFilter.php
Created October 14, 2015 22:13
File filter for WebLoader
<?php
namespace WebLoader;
use Kdyby;
use Nette;
use Nette\Utils\FileSystem;
use Nette\Utils\Strings;
use WebLoader\Compiler;