Skip to content

Instantly share code, notes, and snippets.

View ganti's full-sized avatar

Simon Gantenbein ganti

View GitHub Profile
@daffoxdev
daffoxdev / AbstractAdminCrudController.php
Last active December 22, 2023 11:58
EasyAdmin 3.2.7 show records list of another controller inside of details page. Can be used as base to continue the idea
<?php
namespace App\Controller\Admin;
use App\Admin\Field\ControllerIndexField;
use EasyCorp\Bundle\EasyAdminBundle\Collection\FieldCollection;
use EasyCorp\Bundle\EasyAdminBundle\Config\Action;
use EasyCorp\Bundle\EasyAdminBundle\Config\Actions;
use EasyCorp\Bundle\EasyAdminBundle\Config\Crud;
use EasyCorp\Bundle\EasyAdminBundle\Config\KeyValueStore;
@haircut
haircut / Install PIP to user site on macOS.md
Created August 29, 2017 21:50
How to install and use pip without sudo or admin on macOS

Install and use pip on macOS without sudo / admin access

Most recently tested on macOS Sierra (10.12.6)

  1. Download the installation script; curl https://bootstrap.pypa.io/get-pip.py -o ~/Downloads/get-pip.py
  2. Run the installation, appending the --user flag; python ~/Downloads/get-pip.py --user. pip will be installed to ~/Library/Python/2.7/bin/pip
  3. Make sure ~/Library/Python/2.7/bin is in your $PATH. For bash users, edit the PATH= line in ~/.bashrc to append the local Python path; ie. PATH=$PATH:~/Library/Python/2.7/bin. Apply the changes, source ~/.bashrc.
  4. Use pip! Remember to append --user when installing modules; ie. pip install <package_name> --user

Note

@fluential
fluential / anonymized_nginx_logs.snippet
Last active March 12, 2022 23:39
Anonymized nginx server logs
## A simple solution how to anonymize nginx server logs
##
## WARNING: Please be aware that error logs can still leak client's ip address,
## currently I am not aware of any way around that except turning error logs off completely.
##
http {
#(...)