Skip to content

Instantly share code, notes, and snippets.

@arysom
arysom / .htaccess
Created January 13, 2023 13:27 — forked from PabloKowalczyk/.htaccess
Symfony on home.pl .htaccess
:Location /*.php
Use php74
:Location
<IfModule mod_rewrite.c>
RewriteEngine On
# Determine the RewriteBase automatically and set it as environment variable.
# If you are using Apache aliases to do mass virtual hosting or installed the
# project in a subdirectory, the base path will be prepended to allow proper
@arysom
arysom / report.php
Last active September 20, 2021 21:34
TCPDF multi column layout using setEqualColumns
<?php
//data taken f.e. from https://mockaroo.com/
$data = file_get_contents('./data/MOCK_DATA.json');
$arr = json_decode($data, true);
$pdf = new TCPDF('P', PDF_UNIT, PDF_PAGE_FORMAT, true, 'UTF-8', false);
$pdf->addPage();
$pdf->SetAutoPageBreak(true);
$pdf->SetY(150);
$pdf->SetMargins(15,20,20,TRUE);
$last_y = $pdf->GetY();
@arysom
arysom / docker-compose.yml
Last active March 5, 2020 22:32
drupal 8 php apache
version: '2'
services:
php:
image: drupal:8-apache
ports:
- "8080:80"
volumes:
- ./:/var/www/html
networks:
@arysom
arysom / my_configs.vim
Created September 27, 2019 21:50
custom vim configuration for amix vimrc - ultimate vim configuration
set guifont=IBM\ Plex\ Mono\ 17
colo gruvbox
syntax on
filetype on " Enable filetype detection
filetype indent on " Enable filetype-specific indenting
filetype plugin on " Enable filetype-specific plugins
set nocompatible " not compatible with the old-fashion vi mode
set bs=2 " allow backspacing over everything in insert mode
set history=50 " keep 50 lines of command line history
set ruler " show the cursor position all the time
@arysom
arysom / docker-compose.yml
Created May 24, 2019 12:04
laravel docker compose
version: '2'
services:
#PHP Service
app:
build:
context: .
dockerfile: Dockerfile
image: digitalocean.com/php
container_name: app
@arysom
arysom / arkowy.install
Created February 11, 2019 19:12
drupal update hook example
<?php
function arkowy_update_7001() {
module_enable(['workbench_feature'], true);
}
function arkowy_update_7002() {
module_enable(['workbench_feature'], true);
}
function arkowy_update_7003() {
@arysom
arysom / docker-compose.yml
Created October 21, 2018 19:35
mongo express docker compose
version: '2'
services:
mongodb:
image: bitnami/mongodb:4.1-ol-7
volumes:
- mongodbdata:/bitnami
# ports:
# - '27017:27017'
web:
image: node:8.12-alpine
@arysom
arysom / publish.sh
Created June 10, 2018 20:51
sculpin publish.sh to github pages
#!/bin/bash
if [ $# -ne 1 ]; then
echo "usage: ./publish.sh \"commit message\""
exit 1;
fi
vendor/bin/sculpin generate --env=prod
if [ $? -ne 0 ]; then echo "Could not generate the site"; exit 1; fi
@arysom
arysom / .htrouter.php
Created September 8, 2017 21:06
Drupal .htrouter file to run built in webserver and deal with dots in url, source: https://www.drupal.org/files/issues/add_a_startup-1543858-58.patch
<?php
/**
* @file
* Routing-script for the built-in PHP web server.
*
* The built-in webserver should only be used for development and testing as it
* has a number of limitations that makes running Drupal on it highly insecure
* and somewhat limited.
*
* In particular be aware that:
@arysom
arysom / LoginPage.vue
Created April 13, 2017 07:01
vue-authenticate files
<i18n>
{
"pl":{
"email": "Adres email",
"password": "Hasło",
"send" : "Wyślij",
"reset": "Resetuj"
},
"en":{
"email": "Email address",