Skip to content

Instantly share code, notes, and snippets.

🏠
Working from home

Filip Procházka fprochazka

🏠
Working from home
Block or report user

Report or block fprochazka

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View .gitconfig
[user]
name = Filip Procházka
email = filip@prochazka.su
signingkey = *PG KEY*
[core]
whitespace = fix,-indent-with-non-tab,space-before-tab,trailing-space,cr-at-eol
autocrlf = input
filemode = false
excludesfile = ~/.gitignore_global
@fprochazka
fprochazka / MimeTest.java
Last active Sep 27, 2019
Test what mime type detection utilities are available on your installation
View MimeTest.java
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 / php-fpm
Created Feb 17, 2012
php-fpm config files & init.d script
View php-fpm
#!/bin/bash
### BEGIN INIT INFO
# Provides: php-fpm
# Required-Start: $local_fs $remote_fs $network $syslog
# Required-Stop: $local_fs $remote_fs $network $syslog
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: starts php-fpm daemon
# Description: starts php-fpm daemon
View checkstyle.xml
<?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>
View nette-https-behind-proxy.php
<?php
// hack for https proxies
if (isset($_SERVER['HTTP_X_FORWARDED_PROTO'])) {
if ($_SERVER['HTTP_X_FORWARDED_PROTO'] === 'https' && isset($_SERVER['SERVER_PORT']) && in_array($_SERVER['SERVER_PORT'], [80, 82])) { // https over proxy
$_SERVER['HTTPS'] = 'On';
$_SERVER['SERVER_PORT'] = 443;
} elseif ($_SERVER['HTTP_X_FORWARDED_PROTO'] === 'http' && isset($_SERVER['SERVER_PORT']) && $_SERVER['SERVER_PORT'] == 80) { // http over proxy
$_SERVER['HTTPS'] = 'Off';
@fprochazka
fprochazka / fastcgi.conf
Last active Jan 25, 2019
nginx config files
View fastcgi.conf
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
fastcgi_param QUERY_STRING $query_string;
fastcgi_param REQUEST_METHOD $request_method;
fastcgi_param CONTENT_TYPE $content_type;
fastcgi_param CONTENT_LENGTH $content_length;
fastcgi_param SCRIPT_NAME $fastcgi_script_name;
fastcgi_param REQUEST_URI $request_uri;
fastcgi_param DOCUMENT_URI $document_uri;
fastcgi_param DOCUMENT_ROOT $document_root;
@fprochazka
fprochazka / composer.php.ini
Last active Dec 24, 2018
Composer with different ini or with different PHP
View composer.php.ini
[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
View Dockerfile
FROM php:7.1-apache
ENV DEBIAN_FRONTEND=noninteractive
ENV DEBCONF_NONINTERACTIVE_SEEN=true
RUN apt-get update -q \
&& apt-get install unzip git libicu-dev curl libcurl4-gnutls-dev libmcrypt-dev -y --no-install-recommends
RUN docker-php-ext-install intl sockets curl pdo_mysql \
# xdebug is installed, but not enabled
@fprochazka
fprochazka / README.md
Last active Nov 23, 2018 — forked from StefanWallin/README.md
Configuring HTTPS + SPDY
View README.md
@fprochazka
fprochazka / named.conf
Created Feb 17, 2012
Bind9 config files
View named.conf
// This is the primary configuration file for the BIND DNS server named.
//
// Please read /usr/share/doc/bind9/README.Debian.gz for information on the
// structure of BIND configuration files in Debian, *BEFORE* you customize
// this configuration file.
//
// If you are just adding zones, please do that in /etc/bind/named.conf.local
include "/etc/bind/named.conf.options";
include "/etc/bind/named.conf.local";
You can’t perform that action at this time.