Skip to content

Instantly share code, notes, and snippets.

View james2001's full-sized avatar

Rathgeber Stéphane james2001

View GitHub Profile
@james2001
james2001 / Version202402092204.php
Last active February 20, 2024 19:29
Sulu property migration
<?php
namespace App;
use Jackalope\Query\Row;
use PHPCR\Migrations\VersionInterface;
use PHPCR\SessionInterface;
use Sulu\Component\Localization\Localization;
use Symfony\Component\DependencyInjection\ContainerAwareInterface;
use Symfony\Component\DependencyInjection\ContainerAwareTrait;
set('php_version', function () {
return ask(' What PHP version to install? ', '8.2', ['8.1', '8.2']);
});
set('db_type', function () {
$supportedDbTypes = [
'none',
'mysql',
'mariadb',
'postgresql',
option_settings:
aws:elasticbeanstalk:application:environment:
APP_ENV: prod
commands:
01_update_composer:
command: export COMPOSER_HOME=/root && /usr/bin/composer.phar self-update
02_setvars:
command: /opt/elasticbeanstalk/bin/get-config environment | jq -r 'to_entries | .[] | "export \(.key)=\"\(.value)\""' > /etc/profile.d/sh.local
class ExportCommand extends Command
{
protected static $defaultName = 'kiora:export';
private EntityManagerInterface $entityManager;
private SerializerInterface $serializer;
public function __construct(EntityManagerInterface $entityManager, SerializerInterface $serializer)
{
@james2001
james2001 / nginx.conf
Created April 25, 2016 13:13 — forked from plentz/nginx.conf
Best nginx configuration for improved security(and performance). Complete blog post here http://tautt.com/best-nginx-configuration-for-security/
# to generate your dhparam.pem file, run in the terminal
openssl dhparam -out /etc/nginx/ssl/dhparam.pem 2048