Skip to content

Instantly share code, notes, and snippets.

View fbourigault's full-sized avatar

Fabien Bourigault fbourigault

View GitHub Profile
@j1cs
j1cs / improve_fonts.md
Last active January 23, 2024 15:59
Improve fonts archlinux

Improve Fonts

Newest

Make your Arch fonts beautiful easily! This is what I do when I install Arch Linux to improve the fonts.

You may consider the following settings to improve your fonts for system-wide usage without installing a patched font library packages (eg. Infinality):

Install some fonts, for example:
sudo pacman -S ttf-dejavu ttf-liberation noto-fonts

@pborreli
pborreli / default.vcl
Last active September 8, 2016 16:05
If you are using Varnish and ESI with a Symfony application and need to profile not only the master request but with ESI requests included, don't announce your ESI support, Symfony will fallback to internal sub requests.
sub vcl_recv {
if (req.http.X-Blackfire-Query && client.ip ~ profile) {
//set req.backend_hint = backend1; // if you want to disable loadbalancer to profile (aka only 1 backend needs blackfire extension
return (pass);
} else {
// Add a Surrogate-Capability header to announce ESI support.
set req.http.Surrogate-Capability = "abc=ESI/1.0";
}
}

Requiring bundles with Symfony Flex

Symfony Flex as the new workflow to create Symfony application is awesome. It is quite easy to add or remove bundles by

composer req cli
# or
composer req symfony/console

Reciepes are responsible to create a pre configuration for bundles to register, configuration to set, env variables ... You can create your own reciepes by commiting to one of the repositories

@benediktg
benediktg / readme.md
Last active December 1, 2023 10:11
Send mails from systemd services
@Ocramius
Ocramius / psalm-compendium.php
Last active November 9, 2023 07:27
A small compendium of what is possible with `vimeo/psalm` 3.9.x to add some decent type system features to PHP
<?php
// -- types are a compile-time propagated concept
// https://psalm.dev/r/338f74a96c
class TheType
{
/** @var string */
public $foo = 'bar';
}
@blockpane
blockpane / firewall.sh
Last active July 20, 2024 21:39
Example of how to setup iptables to correctly filter Docker services
#!/bin/bash
### This is an example script that sets up IP tables with Docker. Many admins are not aware that UFW
### and Docker do not play well together, and accidently expose RPC ports and vulnerable services to
### the network. This replaces UFW with Netfilter-persistent and adds rules to the DOCKER-USER chain
### which is the correct way to filter incoming traffic with docker. This specific example is for a
### Tendermint node running via docker, and wireguard / ssh running directly on the host.
# CHANGE THIS TO ACTUAL PUBLIC INTERFACE!!!!!!!!!!