The code services: my_module.event_subscriber: # Your service class class: Drupal\my_module\Entity\EventSubscriber\MyModuleSubscriber # Add your services to load here in the array arguments: [‘@current_user’] tags: # For this example, I am making an event subscriber class – { name: event_subscriber }
Author Archives: Dakwamine
[Drupal] Service dependency injection in a plugin type class
The code
Mini point sur ma carrière
J’ai quitté volontiers l’industrie du jeu vidéo, ayant perdu toute motivation d’y travailler. L’entreprise dans laquelle j’avais passé plus de quatre ans à essayer de produire des jeux et des applications est sur le point de fermer définitivement. Un chapitre de ma vie est en train de se clore, j’imagine. Avais-je dit que j’étais rentré …
[Android] Remove “Couldn’t add widget” from the Overview Screen (Lollipop 5.1)
Enraged After having spent more than a day on the matter, I have finally figured out how to remove the Couldn’t add widget block in the Overview Screen. This is the block which appears in place of the Google search bar on top of the recent apps list after you have disabled the Google app. …
Continue reading “[Android] Remove “Couldn’t add widget” from the Overview Screen (Lollipop 5.1)”
Unity3D.tips[2]: Intersection point between two lines in 2D
The code /// /// Gets the coordinates of the intersection point of two lines. /// /// A point on the first line. /// Another point on the first line. /// A point on the second line. /// Another point on the second line. /// Is set to false of there are no solution. true otherwise. …
Continue reading “Unity3D.tips[2]: Intersection point between two lines in 2D”
Unity3D.tips[1]: Strategies to prevent the collision when a ball rolls from a planar surface to another
Method 1: mega box collider Use a single BoxCollider for all your planes. For example, if you have multiple aligned planes, remove their Collider component (Box, Mesh, whichever they have) and on only one of the planes, add a BoxCollider and adjust its center and size values in the component’s inspector to encapsulate all the …
Unity3D.tips[0]: Avoid naming your MonoBehaviour
methods Main()
Try to avoid naming your MonoBehaviour methods Main(). These would be triggered between Awake() and Start(). This Main() method supports IEnumerator flavors as much as Awake() and alike! But as useful as it could be, I would not recommend to use it as there is no official documentation entry in the manual. And usually, you …
Continue reading “Unity3D.tips[0]: Avoid naming your MonoBehaviour
methods Main()
“
[Windows-10] Why some photos are not appearing in the Photos live tile
Partie française plus bas Symptoms If you are using Windows 10, you may want to pin the Photos live tile to the Start Menu. But some of the images from your pictures folders are not showing in the live tile, or even worse, no picture is displayed on the live tile. You have tried (or …
Continue reading “[Windows-10] Why some photos are not appearing in the Photos live tile”
[Linux] Use GRUB from a previously installed Linux in a dual boot setting
When you install a new Linux alongside another one, your computer will likely use the last installed OS’s GRUB instead of the one from the previous install. In my case, I have installed Debian, and a few days later, a Linux Mint on the same disk. But the thing is I prefer the Debian’s GRUB …
Continue reading “[Linux] Use GRUB from a previously installed Linux in a dual boot setting”
[Debian] Japanese IME in GNOME 3 desktop
Surprised The japanese IME on Debian, when installed properly, works pretty much similarly to the Windows 7 one… I was quite surprised by the quality of this software piece. Step by step Install those packages from official repositories: ibus and ibus-mozc (along with their dependencies, of course). Launch the Region & Language settings app. In …