module – How to handle dynamic data in a script tag in head section for every page

I am absolutely new to Magento 2 (1 week in). I am trying to develop a Magento module that lets the admin specify a string (token) and when the admin saves the module I would like the token to inserted together with a tag into the section of each page.

If the admin changes the token and saves the config, it would be nice if it can update the same tag. Or even remove it if no token is specified.

The module UI is no problem and also the saving works fine and intercepting the token value (with PHP), but I got stuck on how exactly to control the that gets inserted.

I experimented with view/frontend/layout/default.xml and can influence the header, but this seems to be very static.

<?xml version="1.0" ?>
<page xmlns:xsi="" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
        <script src="" 

So basically I would like to change the value in data-token (“token_value”) when the admin saves the config from the module, which I do from a PluginConfig file:

    public function aroundSave(MagentoConfigModelConfig $subject, callable $proceed) {
        // your custom logic
        $section = $subject->getSection();
        $returnValue = $proceed();
        $newConfigs = $this->scopeConfig->getValue($section);
        $token = $newConfigs("general")("token_value");

        // +++ here would like to write value of $token to the <script> tag +++
        return $returnValue;

Any help appreciated!

c# – Run a Script at Game Startup in Unity

c# – Run a Script at Game Startup in Unity – Game Development Stack Exchange

applescript – My Apple Script Editor code doesn’t work gives “Syntax Error Expected end of line but found identifier.”

The problem is Evernote is not AppleScript scriptable.

When trying to add Evernote to the Library in Script Editor, in order to review its AppleScript dictionary, it errs with: Add Item Unable to add the item because it is not scriptable.

Additionally, when running the following command in Script Editor:

tell application "System Events" to ¬
    get has scripting terminology of application process "Evernote"

Its result is: false

WoWonder Combined Chat Timeline And News Feed Application For WoWonder PHP script

WoWonder Combined is a social timeline with chat application for WoWonder PHP Social Network, with WoWonder Timeline users can Post & Interact with users feeds and like and comment and more , now using the application is easier, and more fun !

WoWonder Combined Version is easy, secured, and it will be regularly updated.


WoWonder PHP 3.0.2 or…


Script Linux Bash, print grep output based on number of words in line

I’m trying to write a scirpt for the bash shell. I’m given 4 parameters:

  1. path of a directory
  2. extension of a file
  3. a word
  4. a number

I have to look for all files and files of subdirectories of the path, for files with the given extension. Then, look in the files for the lines matching the word given, but only if the number of words in the line is bigger or equal to the number provided.
For example:
If localDirectory has: image.png text.txt.
And text.txt has:

This is a text file
It contains many words
This is an example for a simple text file

Then give the command: ./ localDirectory txt text 7
I should output: This is an example for a simple text file.

For now, my script looks like this:

if [ "$#" -ne 4 ];
  echo "Not enough parameters"
  exit 1
find $1 -name "*.$2" -exec grep -wi $3  {} ;

And it works just fine for the first 3 goals, I just don’t know how to filter now the result such that the line has a greater or equal number of words as $4.

I could of course create a new file and output there, and then read from it and print only the relevant lines, but I would rather do this without creating new files.

I’m very new to shell scripting.

Any ideas?

magento2 – Magento 2 – Create simple hello world script with UiComponent

I try to create my own Component and reuse it.
So I created these files:

Component File:


function($, Component) {
  "use strict";

    return Component.extend({
        initialize: function () {
            return this._super();
        test: function()



var config = {
    paths: {
        inputNumber: 'js/elements/custom/input_number'


I copied the file from vendor into my theme so that I can make changes. Now I try to use my component and call my test method:

), function (Component, customerData, $, ko, _, inputNumber) {
    'use strict';



But now I get this in the console (ERROR) Failed to load the "Magento_Checkout/js/view/minicart" component.

Lubuntu 20.04 cannot execute .sh script from PCManFM-Qt

Lubuntu 20.04. I’ve created a simple .sh script to run my Java program, so content of .sh is:

java -jar /path_to_my/test.jar

I marked this script as executable, and when double-clicking on it in the file manager (PCManFM-Qt v. 0.14.1) it just opens a terminal (QTerminal) and does nothing.

When executing the script manually in the terminal it works.

unity – How can I reference for a two cameras on prefab through script?

I have this script for controlling the cameras :

using System.Collections;
using System.Collections.Generic;
using UnityEngine;

public class CamerasViewSwitch : MonoBehaviour
    public List<Camera> cameras = new List<Camera>();
    public string currentViewMode;

    // Start is called before the first frame update
    void Start()
        if (cameras(0).enabled)
            currentViewMode = "Third Person";
            currentViewMode = "First View";

    // Update is called once per frame
    void Update()
        if (Input.GetKeyDown(KeyCode.V))
            cameras(0).enabled = !cameras(0).enabled;
            cameras(1).enabled = !cameras(1).enabled;

            if (cameras(0).enabled)
                currentViewMode = "Third Person";
                currentViewMode = "First View";

In the Assets, I have a prefab with two children’s cameras that I want to use in this script.

In this screenshot to show what I mean, I dragged the prefab name Platform to the hierarchy to show where the cameras are. The script is on the object name Cameras Switch.

How do I get these two cameras from the prefab and using them in the script?


I’m using the Platform prefab with this script but the problem is when I’m starting the game the CamerasViewSwitch script is missing the two cameras I’m not to get/find them.

Platform usage

DreamProxies - Cheapest USA Elite Private Proxies 100 Private Proxies 200 Private Proxies 400 Private Proxies 1000 Private Proxies 2000 Private Proxies - Buy Cheap Private Proxies Buy 50 Private Proxies Buy 100 Private Proxies Buy 200 Private Proxies Buy 500 Private Proxies Buy 1000 Private Proxies Buy 2000 Private Proxies ProxiesLive New Proxy Lists Every Day Proxies123