Skip to content

Instantly share code, notes, and snippets.

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

Rafał Muszyński takeit

🏠
Working from home
View GitHub Profile
@takeit
takeit / INSTALL.md
Last active May 13, 2026 23:08
Write to NTFS on macOS Sierra (osxfuse + ntfs-3g)
  1. Install osxfuse:
brew cask install osxfuse
  1. Reboot your Mac.

  2. Install ntfs-3g:

@takeit
takeit / behat.yml
Last active January 16, 2018 09:40
# behat.yml
default:
suites:
default:
contexts:
- FeatureContext:
kernel: '@kernel'
- Behat\MinkExtension\Context\MinkContext
extensions:
Behat\Symfony2Extension:
# behat.yml
default:
suites:
default:
contexts:
- FeatureContext:
kernel: '@kernel'
- Behat\MinkExtension\Context\MinkContext
- behatch:context:json
- behatch:context:rest
# features/books.feature
Feature: Books feature
Scenario: Adding a new book
When I add "Content-Type" header equal to "application/json"
And I add "Accept" header equal to "application/json"
And I send a "POST" request to "/api/books/" with body:
"""
{
"title": "King",
"author": "T. M. Frazier",
# behat.yml.dist
default:
suites:
default:
contexts:
- FeatureContext:
kernel: '@kernel'
extensions:
Behat\Symfony2Extension:
kernel:
version: '2'
services:
postgres:
image: postgres
ports:
- '5433:5432'
php:
build: php-fpm
ports:
- '9002:9000'
@takeit
takeit / Dockerfile
Last active February 12, 2018 07:33
FROM php:7.2-fpm
RUN apt-get update
RUN apt-get install -y zlib1g-dev libpq-dev git libicu-dev libxml2-dev \
&& docker-php-ext-configure intl \
&& docker-php-ext-install intl \
&& docker-php-ext-configure pgsql -with-pgsql=/usr/local/pgsql \
&& docker-php-ext-install pdo pdo_pgsql pgsql \
&& docker-php-ext-install zip xml
FROM nginx:latest
COPY default.conf /etc/nginx/conf.d/
server {
listen 80;
server_name localhost;
root /var/www/symfony/public;
location / {
try_files $uri @rewriteapp;
}
location @rewriteapp {
<VirtualHost *:80>
ServerName example.com
DocumentRoot /var/www/publisher/web
DirectoryIndex index.php index.html
<Directory /var/www/publisher/web>
AllowOverride All
Order Allow,Deny
Allow from All
</Directory>
</VirtualHost>