Skip to content

Instantly share code, notes, and snippets.

View tlorens's full-sized avatar
🏠
Working from home

Timothy Lorens tlorens

🏠
Working from home
View GitHub Profile
@giannisp
giannisp / gist:ebaca117ac9e44231421f04e7796d5ca
Last active July 14, 2024 18:27
Upgrade PostgreSQL 9.6.5 to 10.0 using Homebrew (macOS)
After automatically updating Postgres to 10.0 via Homebrew, the pg_ctl start command didn't work.
The error was "The data directory was initialized by PostgreSQL version 9.6, which is not compatible with this version 10.0."
Database files have to be updated before starting the server, here are the steps that had to be followed:
# need to have both 9.6.x and latest 10.0 installed, and keep 10.0 as default
brew unlink postgresql
brew install postgresql@9.6
brew unlink postgresql@9.6
brew link postgresql
@acucchieri
acucchieri / Document.php
Last active February 6, 2017 05:59
Symfony Doctrine Uplodable with relation
<?php
namespace AppBundle\Entity;
use Doctrine\ORM\Mapping as ORM;
use Gedmo\Mapping\Annotation as Gedmo;
/**
* Document
*
@technetium
technetium / .Propagating-awareness-via-ManyToOne-associations.md
Created April 14, 2016 07:47
Propagating awareness via ManyToOne associations

Propagating awareness via ManyToOne associations

Introduction

Michaël Perrin has written an article about using annotation and filters improve security.

With a more complex model, for example an order that contains products, you want also to filter on the associations of the filtered entity.

@shadowbq
shadowbq / apparmor_usr.sbin.named
Last active February 13, 2019 03:31
Logrotate.d script for bind9 named server in ubuntu
# vim:syntax=apparmor
# Last Modified: Fri Jun 1 16:43:22 2007
#include <tunables/global>
/usr/sbin/named {
#include <abstractions/base>
#include <abstractions/nameservice>
capability net_bind_service,
capability setgid,
@CodingNinja
CodingNinja / Manager.php
Created December 30, 2011 13:09
Grant / Revoke ACL Permissions
<?php
/*
* Copyright (C) 2011 David Mann
*
* Permission is hereby granted, free of charge, to any person obtaining a copy of
* this software and associated documentation files (the "Software"), to deal in
* the Software without restriction, including without limitation the rights to
* use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
* of the Software, and to permit persons to whom the Software is furnished to do