Skip to content

Instantly share code, notes, and snippets.

View cybernet's full-sized avatar
😇
There is not a righteous man on Earth who does what is right and never sins

cybernet cybernet

😇
There is not a righteous man on Earth who does what is right and never sins
  • /usr/sbin/mysqld
View GitHub Profile
@BenRichter
BenRichter / common.de.xlf
Last active May 12, 2019 18:28
Symfony Twig Translation with link
<trans-unit id="translation.id">
<source>translation.id</source>
<target>Some text <![CDATA[<a href="%link%">%link_text%</a>]]> end of sentence.</target>
</trans-unit>
@Raphhh
Raphhh / ContextualOptionsFormListener.php
Last active October 23, 2024 12:23
Symfony form: set options according to the data
<?php
namespace AppBundle\Form\EventListener;
use Symfony\Component\EventDispatcher\EventSubscriberInterface;
use Symfony\Component\Form\FormEvent;
use Symfony\Component\Form\FormEvents;
class ContextualOptionsFormListener implements EventSubscriberInterface
{
/**
@cvega
cvega / sed cheatsheet
Last active November 24, 2020 19:56 — forked from un33k/sed cheatsheet
sed cheatsheet
FILE SPACING:
# double space a file
sed G
# double space a file which already has blank lines in it. Output file
# should contain no more than one blank line between lines of text.
sed '/^$/d;G'
@Nothing4You
Nothing4You / letsencrypt_notes_openbsd.sh
Last active March 29, 2025 19:32 — forked from lachesis/letsencrypt_notes.sh
Set up LetsEncrypt using acme.sh without root on OpenBSD
# Modified for OpenBSD
# Assumes being root
# Requires curl to be installed, wget can also be used, relevant commands need to be adjusted. acme.sh supports both.
# Configured to use Cloudflare DNS for verification
# How to use "acme.sh" to set up Lets Encrypt without root permissions
# See https://github.com/Neilpang/acme.sh for more
# This assumes that your website has a webroot at "/var/www/<domain>"
# I'll use the domain "EXAMPLE.com" as an example
@giansalex
giansalex / docker-php-ext-install.md
Last active October 13, 2024 20:15
docker-php-ext-install Reference
RUN apt update
RUN apt upgrade -y
RUN apt install -y apt-utils
RUN a2enmod rewrite
RUN apt install -y libmcrypt-dev
RUN apt install -y libicu-dev
RUN docker-php-ext-install -j$(nproc) intl
RUN apt-get install -y libfreetype6-dev libjpeg62-turbo-dev libpng12-dev
RUN docker-php-ext-configure gd --with-freetype-dir=/usr/include/ --with-jpeg-dir=/usr/include/ 
@lsv
lsv / Menu.php
Last active January 11, 2020 10:40
Symfony 4 - KnpMenuBundle - menu with event
<?php
// src/Menu/Menu.php
namespace App\Menu;
use App\Event\Menu\Topbar\UserMenuEvent;
use Knp\Menu\FactoryInterface;
use Knp\Menu\ItemInterface;
use Symfony\Component\EventDispatcher\EventDispatcherInterface;
use Symfony\Component\HttpFoundation\RequestStack;
@mrothNET
mrothNET / LetsEncrypt+certbot+UFW+postfix+dovecot.md
Last active March 31, 2025 09:54
Let's Encrypt / Dovecot / Postfix / UFW firewall / Certbot

Let's Encrypt / Dovecot / Postfix / UFW firewall / Certbot

This tutorial describes how to install TLS to a mail server consisting of Postfix and/or Dovecot by using Let's Encrypt certificates with automatic renewing and firewall management.

The system used for this tutorial was:

$ lsb_release -idrc
Distributor ID: Ubuntu
@dcode
dcode / _Podman Volume Quotas.md
Last active September 27, 2020 06:32
Discussion on how to create named volumes for Podman and set quotas on them using the native filesystem tools.

Podman has recently added support for named volumes, which is super handy. As of today (2018-01-17), it supports the local driver, which effectively will bind-mount a tracked directory into one or more containers. It's helpful to be able to limit the size of data volumes though so that one container doesn't exhaust the resources of another.

Fortunately, the XFS filesystem let's us handle this natively using "project quotas". XFS allows setting quotas based on username, group, or project. The project quota effectively maps a project ID to a path on a filesystem.

@howyay
howyay / Setting up Postfix on Debian.md
Last active October 19, 2025 08:38
A guide to set up a Postfix + Dovecot IMAP server with complete spf, dkim and dmarc support.

An ultimate guide to Postfix + Dovecot IMAP server with complete SPF, DKIM and DMARC support and additional instructions for a multi-domain setup

In this guide, domain.com will be your root domain and mail.domain.com will be the hostname of your mail server

@thibaut-decherit
thibaut-decherit / Symfony - NPM, Webpack Encore and SASS Install (for Bootstrap 4).md
Last active August 23, 2023 16:23
Symfony - NPM, Webpack Encore and SASS Install (for Bootstrap 4)

Symfony - NPM, Webpack Encore and SASS Install (for Bootstrap 4)

If new computer start with these two:

$ curl -sL https://deb.nodesource.com/setup_8.x | sudo -E bash

$ sudo apt-get install -y nodejs

Then:

See: