How to properly externalize configuration using environmental variables in apache karaf? - apache-karaf

I'm trying to achieve externalization of karaf's configuration. In accordance with documentation I should be able to achieve this using environmental variables, however it doesn't work for me as can be seen here:
or here:
Why this simple example don't work?
Thanks

Well, I solved it. I'm pretty sure this is the source code for it: https://github.com/apache/karaf/blob/karaf-4.3.0/config/src/main/java/org/apache/karaf/config/core/impl/KarafConfigurationPlugin.java
Added in karaf 4.3.0 while I'm using 4.2.6 ;)
Quick check and this works in karaf 4.3.0.

Related

Can't add a breakpoint to Twig files in VS Code

I am trying to debug a Twig template in my Drupal 9 site. I am using VSCode as my IDE and using Xdebug for debugging. I have setup/configured the installation based on the instructions outlined here -
https://www.drupal.org/docs/develop/development-tools/configuring-visual-studio-code
I am able to set breakpoints in PHP files (step thru and watch variables successfully) however I just can't seem to do the same for Twig template files (just so I can see what variables I have access to in that template). What I mean by when I say I am unable to add the breakpoint is that clicking on the gutters of a Twig file within VSCode does not result in addition of any breakpoint.
I'd like to take advantage of Xdebug instead of using debugging functions like breakpoint() and dump() offered by the Devel and Twig_xdebug modules within Drupal. I am pretty sure I am doing something wrong or have missed a step but I can't seem to figure out what it is.
Some more details on my env:
a local Drupal 9 setup on a Mac OS that uses PHP 7.4 and nginx as its webserver.
Xdebug (v3.1.1) is installed and enabled (verified via phpinfo() output)
VSCode (1.63.0) installed with all of the supporting Drupal and PHP extensions outlined in the above article (specifically php-debug) have been installed.
I am using the default launch configuration to Run my debug session in VSCode.
I'd appreciate any pointers on what I am doing wrong and/or what I can try. Also, I hope I provided enough info on my use case.
Twig compiles the template files into PHP files. You need to set breakpoints in these Twig generated PHP files in order to debug them.
On this page, I also see that there is caching involved, which you will need to disable. That documentation seems to be quite comprehensive.
Came here looking for an answer to this very question.
You may be interested to know that there are a couple of ways to achieve this. You can either use a built-in feature of the devel.module (see: https://www.drupal.org/node/2788089) or there is also a contrib module called twig_xdebug, which lives here: https://www.drupal.org/project/twig_xdebug
I think the mechanism behind both of these is probably very similar, to be honest. The latter of those links provides further links to several guides on the subject matter. HTH! :)

Add Custom Scripts with Linux (Ubuntu)

I'm really enjoying Azerothcore, however I would like to add custom scripts to my server. I have found a guide on how to do that, but it is based on windows OS.
guide: http://www.ac-web.org/forums/showthread.php?145843-Trinity-How-to-add-a-c-script-to-your-core
Is there guides that are specific to Linux (Ubuntu)? Thanks in advance :)
The procedure of adding a Script to AzerothCore on Linux is the same as adding it on Windows, the only difference is the way you (re)compile the project.
So you can add your Scripts just the way you would do on Windows, then recompile the project.
As the official tutorial explains, you can just (re)compile your project by:
re-running the cmake command, for example:
cmake ../ -DCMAKE_INSTALL_PREFIX=$HOME/azeroth-server/ -DCMAKE_C_COMPILER=/usr/bin/clang -DCMAKE_CXX_COMPILER=/usr/bin/clang++ -DWITH_WARNINGS=1 -DTOOLS=0 -DSCRIPTS=1
re-running the make and make install
make -j 6;
make install
Then you're good to go.
However, AzerothCore offers a better alternative to just adding custom scripts: Modules.
Modules offer the same features of Scripts, plus the ability to keep them completely detached from the main source code. So you can for example keep them in a separate repository.

Atom Editor - linter ignore for web2py identifiers

I recently started using Atom IDE on Linux and I really like it. But I have come to small annoyance while developing a web2py application. I have installed linter and have tried several python extensions for linter (linter-python, pylint, etc.) but I can't seem to configure any of the linters to ignore the global web2py identifiers, which is really annyoing because they are used a lot. E.g. the "response" and "request" names are always shown as errors.
In my research I found a solution for the sublime-text IDE which I don't own: https://gist.github.com/maribo/4086469
Does anybody know if there is a similar solution in Atom or if there is any other package I can use?
Thanks in advance
If you cannot get the linter configured as desired, you might also try adding the following line to your files:
from gluon import *
That imports all the web2py API globals, including creating some dummy objects.

single secure executable for tidesdk

I just started looking into TideSdk and noticed that when I "compile" (or package) a project (in Win-7), I get all of these dependecies which is actually the un-compiled source code for the app.
Is there any way to:
Have Tide SDK package a file to one executable
Not have the source code visible in any way, shape, or form in the final executable?
If none of those are possible, is there an alternative that can to these things?
We are working on a solution. There are a few possibilities. The only thing that is possible currently is to obfuscate your code using google closure library through a tidebuilder option.
I found this on google when trying to do something similar. It is annoying but seems to work.
http://coffeecone.com/post/36127491095/howto-single-exe-for-tidesdk
I use the application virtualization app Cameyo for this purpose. http://www.cameyo.com/

How to install and configure the imaginebundle in symfony2

I searched in google but I disappoint that I could not get any satisfactory answer any where. How to install and configure the imaginebundle in symfony2. I have try several times as per instruction given in https://github.com/moreweb/ImagineBundle. Still I am not getting any result.
The bundle you linked to does not look like it's maintained anymore - this seems to be the correct bundle.
The new KnpIpsum demo site uses it and you can see their configuration here or alternatively download the source code of the demo app from github: KnpIpsum

Resources