Skip to content

Instantly share code, notes, and snippets.

@dkarlovi
dkarlovi / Dockerfile
Last active April 6, 2023 08:38
Setting up permissions for a (Symfony) web app on Docker
FROM alpine:3.7
# this is the "app" image, contains PHP-FPM
RUN addgroup -g 82 -S www-data && \
adduser -u 82 -H -D -S -G www-data www-data && \
# etc..
# PHP-FPM is setup to run as "www-data"
WORKDIR /app
@linuxkathirvel
linuxkathirvel / print-scr-key-to-flameshot-tool-in-gnome3.md
Last active September 8, 2025 10:14
How to assign PrtScr(Print Screen) key to Flameshot screenshot tool in Gnome 3?

How to assign PrtScr(Print Screen) key to Flameshot screenshot tool in Gnome 3?

  1. Goto Keyboard settings and click 'Save a screenshot to Pictures' under 'Screenshots' section.
  2. Press 'Backspace' key delete 'PrtScr' key shortcut and press 'Set' button
  3. Press '+'(Plust) icon in the 'Custom Shortcuts' in the same window
  4. Enter 'Flameshot' in 'Name' field , 'flameshot gui' in 'Command' field, and click 'Set Shortcut' button and press 'PrtScr' button in the keyboard and close the dialog box 5.That's it. If you press 'PrtScr' key, the Flameshot selection area screen will appear.
@vudaltsov
vudaltsov / Makefile
Created September 26, 2019 19:29
Makefile for a Symfony project
DOCKER_COMPOSE = docker-compose
EXEC_PHP = $(DOCKER_COMPOSE) exec -T php
SYMFONY = $(EXEC_PHP) bin/console
COMPOSER = $(EXEC_PHP) composer
##
## Проект
## ------
install: start db ## Установить и запустить проект
@reanim8ed
reanim8ed / sample.md
Created September 21, 2020 20:51
[Converting base64 file and moving to path] #symfony #upload #vichupload
  • composer require vich/uploader-bundle
  • In the config/services.yaml, add this configuration (it's just an example)
	# config/services.yaml
	parameters:
		app.path.images: /uploads/images
  • don't forget to create uploads directory inside public directory and images directory inside uploads directory
  • And you configure the file config/packages/vich_uploader.yaml like
@lyrixx
lyrixx / index.php
Last active February 19, 2024 06:37
How to call private command method in Symfony ?
#!/usr/bin/env php
<?php
require __DIR__ . '/../../vendor/autoload.php';
use Castor\Console\Command\CompileCommand;
use Symfony\Component\Console\Application;
use Symfony\Component\Console\Command\Command;
// We extends the CompileCommand, to be able to remove the constructor, because