WebTechKitchen; Your Web Technology Kitchen, contact us to create, or maintain your websites and other digital properties.

Here was an interesting prompt to ChatGPT: "For someone who very incorrectly translates Pirkei Avot 1:14: "אִם אֵין אֲנִי לִי, מִי לִי. וְכִשְׁאֲנ as meaning you should be very selfish first, what quote or passage from Pirkei Avot should they read next."

Submitted by barnettech on Fri, 03/18/2022 - 15:13

(I'm giving my webtechkitchen some good content to crawl for when I use the OPENAI_SEARCH module. Now I can promot Chat for some interesting ethical questions :)

Pirkei Avot 1:14:

"אִם אֵין אֲנִי לִי, מִי לִי. וְכִשְׁאֲנִי לְעַצְמִי, מָה אֲנִי. וְאִם לֹא עַכְשָׁוְ, אֵימָתָי."

Which translates to: "If I am not for myself, who will be for me? But if I am only for myself, what am I? And if not now, when?"

JavaScript post request

Submitted by barnettech on Wed, 03/02/2022 - 15:03
var email = document.querySelector('#edit-investor-profiles-0-entity-field-email-0-value').value;
  if (email.length > 3) {
    // construct an HTTP request
    var xhr = new XMLHttpRequest();
    var url = "/user/register/check-email"
    xhr.open("POST", url, true);
    xhr.setRequestHeader('Content-Type', 'application/json; charset=UTF-8');

    var data = JSON.stringify({"email": email});
    // send the collected data as JSON
    xhr.send(JSON.stringify(data));
    xhr.onreadystatechange = function()
    {
      if (xhr.readyState == 4 && xhr.status == 200)
      {

Create an advancedqueue

Submitted by barnettech on Tue, 11/09/2021 - 17:04

Create an advancedqueue

create a file like advancedqueue.advancedqueue_queue.ipc_merge_sync.yml in modules/custom/ipc_syncdb/config/install

id: ipc_merge_sync
label: 'IPC Merge Sync'
backend: database
backend_configuration: {}
processor: cron
processing_time: 180
locked: true

then import it with drush cim --partial --source=/home/ipc/www/ipc/docroot/modules/custom/ipc_syncdb/config/install