Skip to content

Instantly share code, notes, and snippets.

@AlexandreGerault
AlexandreGerault / EasyAdminEditTest.php
Created February 7, 2023 19:44
Confusing error with EasyAdmin integration test
class EditSchoolTest extends SchoolTestCase
{
use ResetDatabase;
public function testItEditsASchool(): void
{
$admin = $this->createAdmin();
$school = $this->createSchool();
--- a/vendor/guzzlehttp/guzzle/src/Handler/CurlMultiHandler.php
+++ b/vendor/guzzlehttp/guzzle/src/Handler/CurlMultiHandler.php
@@ -15,6 +15,7 @@
*
* @property resource $_mh Internal use only. Lazy loaded multi-handle.
*/
+#[\AllowDynamicProperties]
class CurlMultiHandler
{
/** @var CurlFactoryInterface */
---- Minecraft Crash Report ----
// Hi. I'm Minecraft, and I'm a crashaholic.
Time: 15/06/2022 23:20
Description: Rendering screen
java.lang.ClassCastException: class net.minecraft.text.LiteralTextContent cannot be cast to class net.minecraft.text.Text (net.minecraft.text.LiteralTextContent and net.minecraft.text.Text are in unnamed module of loader net.fabricmc.loader.impl.launch.knot.KnotClassLoader @146ba0ac)
at java.base/java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:197)
at java.base/java.util.ArrayList$ArrayListSpliterator.forEachRemaining(ArrayList.java:1625)
at java.base/java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:509)
@AlexandreGerault
AlexandreGerault / composer.sh
Created February 10, 2022 23:24
Run composer from docker
docker run --mount type=bind,source="$(pwd)",target=/app install composer
[23févr.2021 17:51:04] [main/INFO]: Transitioning to ModLauncher, please wait...
[23févr.2021 17:51:04] [main/INFO]: ModLauncher running: args [--nogui, --launchTarget, sponge_server_prod]
[23févr.2021 17:51:04] [main/INFO]: ModLauncher 8.0.9+86+master.3cf110c starting: java version 11.0.2 by Oracle Corporation
[23févr.2021 17:51:04] [main/INFO]: SpongePowered PLUGIN Subsystem Version=0.1.4-SNAPSHOT Source=file:/D:/Sponge%20server/spongevanilla-1.16.5-8.0.0-RC437-universal.jar
[23févr.2021 17:51:04] [main/INFO]: Plugin resource locator 'java_directory' found.
[23févr.2021 17:51:04] [main/INFO]: Plugin resource locator 'java_classpath' found.
[23févr.2021 17:51:04] [main/INFO]: Plugin language loader 'java_plain' found.
[23févr.2021 17:51:04] [main/INFO]: SpongePowered MIXIN Subsystem Version=0.8.2 Source=file:/D:/Sponge%20server/libraries/org/spongepowered/mixin/0.8.2/mixin-0.8.2.jar Service=ModLauncher Env=SERVER
[23févr.2021 17:51:04] [main/INFO]: Locating 'java_directory' resources...
[23févr.2021 17:51:05
export class ContactFormElement extends HTMLFormElement {
constructor() {
super();
this.action = this.getAttribute('action');
this.addEventListener("submit", this.onSubmit);
}
/**
* Send the ajax request when the form is submitted
cmake_minimum_required(VERSION 3.16.5)
project(WerewolfServer VERSION 0.0)
set(CMAKE_CXX_STANDARD 20)
set(CMAKE_CXX_STANDARD_REQUIRED True)
set(GCC_COVERAGE_COMPILE_FLAGS "-fsanitize=address -D_GLIBCXX_DEBUG")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${GCC_COVERAGE_COMPILE_FLAGS}")
@AlexandreGerault
AlexandreGerault / application.cpp
Last active June 21, 2020 15:38
error using factory with servers
#include "core/application.hpp"
using namespace ww;
application::application(boost::asio::io_context &context, boost::asio::ip::tcp::endpoint const &endpoint)
: m_config("general.config") {
spdlog::debug("Application created");
init_server_factory();
try {
@AlexandreGerault
AlexandreGerault / Compile time error
Last active June 4, 2020 14:38
Error with abstract type & factory
Dans le fichier inclus depuis /run/media/alexandre-gerault/Seagate Expansion Drive/Programming/C++/werewolf/server_lib/include/rooms/server_rooms.hpp:7,
depuis /run/media/alexandre-gerault/Seagate Expansion Drive/Programming/C++/werewolf/server_lib/src/rooms/server_rooms.cpp:1:
/run/media/alexandre-gerault/Seagate Expansion Drive/Programming/C++/werewolf/server_lib/include/utils/factory.hpp: Dans l'instanciation de « class ww::factory<ww::room_interface> » :
/run/media/alexandre-gerault/Seagate Expansion Drive/Programming/C++/werewolf/server_lib/include/rooms/server_rooms.hpp:28:33: requis depuis ici
/run/media/alexandre-gerault/Seagate Expansion Drive/Programming/C++/werewolf/server_lib/include/utils/factory.hpp:22:16: erreur: le type abstrait « ww::room_interface » retourné est invalide
22 | Object make(std::string const &key, Args &&... args) const {
| ^~~~
Dans le fichier inclus depuis /run/media/alexandre-gerault/Seagate Expansion Drive/Programming/C++/w
Dans le fichier inclus depuis /run/media/alexandre-gerault/Seagate Expansion Drive/Programming/C++/werewolf/server_lib/include/rooms/server_rooms.hpp:7,
depuis /run/media/alexandre-gerault/Seagate Expansion Drive/Programming/C++/werewolf/server_lib/src/rooms/server_rooms.cpp:1:
/run/media/alexandre-gerault/Seagate Expansion Drive/Programming/C++/werewolf/server_lib/include/utils/factory.hpp: Dans l'instanciation de « class ww::factory<ww::room_interface> » :
/run/media/alexandre-gerault/Seagate Expansion Drive/Programming/C++/werewolf/server_lib/include/rooms/server_rooms.hpp:28:33: requis depuis ici
/run/media/alexandre-gerault/Seagate Expansion Drive/Programming/C++/werewolf/server_lib/include/utils/factory.hpp:22:16: erreur: le type abstrait « ww::room_interface » retourné est invalide
22 | Object make(std::string const &key, Args &&... args) const {
| ^~~~
Dans le fichier inclus depuis /run/media/alexandre-gerault/Seagate Expansion Drive/Programming/C++/w