Skip to content

Instantly share code, notes, and snippets.

View carlossosa's full-sized avatar

Carlos Sosa carlossosa

View GitHub Profile
@carlossosa
carlossosa / Customer.php
Created August 17, 2021 01:38 — forked from webdevilopers/Customer.php
Using event subscriber to get MongoDB ODM Documents related to ORM Entity in Doctrine
<?php
/**
* @ORM\Entity()
* @ORM\EntityListeners({"Acme\AppBundle\Event\CustomerListener"})
*/
class Customer()
{
}
@blackgate
blackgate / mbp2011-disable-amd-gpu.md
Last active November 22, 2023 01:23
Macbook Pro 2011 - Disable AMD GPU
@magnetikonline
magnetikonline / README.md
Last active November 25, 2023 13:59
Nginx & PHP-FPM systemd services.

Nginx & PHP-FPM systemd services

A basic set of systemd units for starting Nginx and PHP-FPM daemons on system startup.

  • Ensures Nginx web server has started before the PHP-FPM process.
  • Nginx pid file placed at /run/nginx.pid.
  • PHP-FPM pid file placed at /run/php7/php-fpm.pid, PHP7 PHP-FPM config at /etc/php7.
  • Based on usage with Ubuntu 16.04LTS / 18.04LTS.

Unit files are placed in /etc/systemd/system and enabled with:

@daviddyball
daviddyball / IAM_Role.json
Last active July 25, 2021 05:39
EC2 Metadata Script to Load a bootstrap script from S3 based on EC2 Tag Definitions
{
"Statement": [
{
"Sid": "EC2DescribeInstances",
"Effect": "Allow",
"Action": [
"ec2:DescribeInstances",
"ec2:DescribeTags"
],
"Resource": [
@tylerneylon
tylerneylon / json.lua
Last active July 9, 2024 03:25
Pure Lua json library.
--[[ json.lua
A compact pure-Lua JSON library.
The main functions are: json.stringify, json.parse.
## json.stringify:
This expects the following to be true of any tables being encoded:
* They only have string or number keys. Number keys must be represented as
strings in json; this is part of the json spec.