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
<?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 / 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 / README.md
Last active November 23, 2018 17:57 — forked from StefanWallin/README.md
Configuring HTTPS + SPDY
@fprochazka
fprochazka / .1 readme.md
Last active October 27, 2018 16:15
.git/hooks/post-checkout

post checkout hook na mazání cache

  • post-checkout.sh uložit jako .git/hooks/post-checkout
  • .invalidate-opcache.php jako www/.invalidate-opcache.php (POZOR! - tenhle soubor buďto na produkci nenahrávat, nebo zablokovat přístup!)
error_log syslog:server=unix:/var/log/nginx.sock;
http {
log_format verbose '$remote_addr - $remote_user $host "$request" $status $body_bytes_sent "$http_referer" "$http_user_agent"';
map $status $loggable {
~^[2] 0;
default 1;
}
@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 / BasePresenter.php
Created October 6, 2012 16:22
Image pipe for #nettefw templates
<?php
/**
* @author Filip Procházka <filip@prochazka.su>
*/
abstract class BasePresenter extends Nette\Application\UI\Presenter
{
/**
* @var \Img\ImagePipe
@fprochazka
fprochazka / ArraySessionStorage.php
Last active August 31, 2017 20:23
faking nette session in tests
<?php
/**
* Třída existuje, aby se vůbec neukládala session, tam kde není potřeba.
* Například v API, nebo v Cronu se různě sahá na session, i když se reálně mezi requesty nepřenáší.
*
* @internal
*/
class ArraySessionStorage extends Nette\Object implements Nette\Http\ISessionStorage
{
@fprochazka
fprochazka / explained.md
Created February 20, 2012 15:59
Useful git hooks for Gitolite

Git push deploy

Requires installed gitolite in /home/git and following directory structure

/var
    /www
        /apps
        /hosts

/libs

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: