Queue::after(function (JobProcessed $event) { $command = unserialize($event->data[‘data’][‘command’]); });
Автор: editor
How can I change the default landing page for the Keycloak cartridge?
You can create a welcome theme that overrides the welcome-page. First create the theme in: /standalone/configuration/themes/welcome/<theme name> Then configure which theme to use in keycloak-server.json: { «theme»: { «welcomeTheme»: «<theme name>» } }
How to specify the private SSH-key to use when executing shell command on Git
Something like this should work (suggested by orip): ssh-agent bash -c ‘ssh-add /somewhere/yourkey; git clone [email protected]:user/project.git’ if you prefer subshells, you could try the following (though it is more fragile): ssh-agent $(ssh-add /somewhere/yourkey; git clone [email protected]:user/project.git) Git will invoke SSH which will find its agent by environment variable; this will, […]
How to disable welcome-root / welcome content in wildfly
1. Open your standalone.xml file and head to the undertow subsystem near the bottom of the file. 2. Delete the host mapper that maps requests to «/» to the «welcome-content» handler: <server name=»default-server»> <host name=»default-host» alias=»localhost»> <location name=»/» handler=»welcome-content»/> <!— Delete this line! —> </host> </server> 3. Delete the welcome-content […]
How to remove a polymorphic relation in Eloquent?
$posts->photos() is the relationship query to return all of the photos for a post. If you call delete() on that, it will delete all of those records. If you only want to delete a specific record, you need to make sure you only call delete on the one you want to delete. For […]
Disable keycloak welcome page
After digging a bit deeper into this issue. It seems that the command /subsystem=undertow/server=default-server/host=default-host/location=\/:remove disables only the /opt/jboss/keycloak/welcome-content page, which contains only a redirect to the /auth path. The «Welcome to Keycloak» page cannot be disabled but it can be themed. The default theme is located in /opt/jboss/keycloak/themes/keycloak/welcome. It can […]
PHP Case-insensitive equivalent of strtr
Use str_ireplace: str_ireplace(array_keys($replace_pairs), array_values($replace_pairs), $str);
How do I convert from BLOB to TEXT in MySQL?
That’s unnecessary. Just use SELECT CONVERT(column USING utf8) FROM…..
How to enable MySQL Query Log?
If you don’t want or cannot restart the MySQL server you can proceed like this on your running server: Create your log tables (see answer) Enable Query logging on the database (Note that the string ‘table’ should be put literally and not substituted by any table name. Thanks Nicholas Pickering) […]
How to recover a git branch you accidentally deleted
As pointed out by @johntyree in the comments, using git reflog is easier and more reliable. Thanks for the suggestion! $ git reflog 1ed7510 HEAD@{1}: checkout: moving from develop to 1ed7510 3970d09 HEAD@{2}: checkout: moving from b-fix-build to develop 1ed7510 HEAD@{3}: commit: got everything working the way I want 70b3696 […]