url shorteners – Using shortened URLs instead of direct links on media hosting – will this affect site performance?

I’m working on a site project right now and I have a ton of image assets that are hosted on firebase storage – which is effectively a CDN hosting media on SSD’s globally.

When referencing the media on the site, however, I can use the firebase link directly to the image asset or, I figured, can go through a link shortener like bit.ly or branch.io (the firm uses this for link shortening) which would allow me to update the images later without having to update the website but instead just update the link the shortened one is pointing at.

I’m wondering though if there is any issue with doing this? I think uptime and latency is possible?

Any other issues?

Is this a really bad idea too?

Android Google Keep Save Snippet AND URL

How can I save both the selected text AND the URL to Google Keep from Chrome in Android? On desktop this is as simple as highlighting text then clicking the Keep icon next to URL; that’s the functionality I want when I’m browsing on Android. On desktop it’ll work multiple times- for keeping multiple snippets in the same keep note for that URL, as you read it and recognise you wish to save that part. On Android (in Chrome, with Keep plugin installed on the machine) I can long click>share to Keep, but this only shares the selected text not the URL. I can share the URL itself to keep (share at top near URL) but this only shares the URL not selected text. A lobg click menu item on selected text would be logical to me but right now I can only manually open the saved URL and copy paste the note; very inefficient.

8 – How to set URL for image with view method properly?

Image formatter should accept image_style and url parameters.
I’ve got image_style working but not url.

function mymodule_preprocess_views_view_field(&$variables) {
  // ...
  $variables('image') = $node->get('field_image')->get($delta)->view(('settings' => ('image_style' => '195', 'url' => '/test')));
  kint($variables('image'));
  // ...
}

enter image description here

Why url is NULL (instead of /test)?

seo – Should I change the AMP url? (when updating the url for the page itself?)

Let’s say I have a page under www.example.com/some/path, and its AMP version is under www.example.com/some/path/amp.

If I change the path of the page, let’s say to www.example.com/other/path, should I change the path of the AMP as well, for example to this: www.example.com/other/path/amp?

In other words, are there any disadvantages to have one fixed AMP url for a page, for all the page lifetime, without ever changing it, even the the page’s url (the canonical) is changing?

I’ve tried to search around the web and in google documentation, and all I have found is guidelines which say that I should have a redirect whenever the AMP url is changed (basically when moving from old site to new site which doesn’t supports the old url structure).
The point is that I don’t want to get to the situation when I even need the redirect, since I will always have the same AMP url.

Of course the amp page will have the updated page url as the canonical, and as I understand it, the SEO power is generated by the the url of the page and not the AMP version of the page.

So are there any advantages to update the url of the AMP as well?

Malformed entry 58 in list file /etc/apt/sources.list (URL parse) The list of sources could not be read

I saw How do I remove a malformed line from my sources.list? and did:

  • In the app software & updates, checked:

    • canonical-supported free and open-source software (main)
    • community-maintained free and open-source software(universe).

    Copping the code block in that thread (I could not show here because I do not have reputation) and pasted to sources.list, after replacing precise to focal.

    Saved, then,

    sudo apt-get update
    

    The result was the number ‘58’ became ‘55’- only.

  • Visited repogen dot simplylinux dot ch

    • My version Focal was not on the list.
  • hp-check and got:

    error: 'libcups2' package is missing/incompatible 
    error: 'libdbus-1-dev' package is missing/incompatible 
    error: 'libjpeg-dev' package is missing/incompatible 
    error: 'libcups2-dev' package is missing/incompatible 
    error: 'cups-bsd' package is missing/incompatible 
    error: 'cups-client' package is missing/incompatible 
    error: 'libcupsimage2-dev' package is missing/incompatible 
    error: 'build-essential' package is missing/incompatible 
    error: 'libusb-1.0.0-dev' package is missing/incompatible 
    error: 'libusb-0.1-4' package is missing/incompatible 
    error: 'libsane-dev' package is missing/incompatible 
    error: 'libsnmp-dev' package is missing/incompatible 
    error: 'snmp-mibs-downloader' package is missing/incompatible 
    error: 'openssl' package is missing/incompatible 
    error: 'python3-pyqt4' package is missing/incompatible 
    error: 'gtk2-engines-pixbuf' package is missing/incompatible 
    error: 'python3-dev' package is missing/incompatible 
    error: 'libtool' package is missing/incompatible 
    error: 'libtool-bin' package is missing/incompatible 
    error: 'build-essential' package is missing/incompatible 
    

Should I use URL encoding for doi links, or does it matter?

I summarize research articles of interest to my readers, for example at https://www.ptsdexams.net/disability-exams-research.html .

I usually include the Digital Object Identifier (doi), either by itself, e.g., doi:10.1007/s12207-019-09367-5 or as a link, e.g., https://doi.org/doi:10.1007/s12207-019-09367-5.

I noticed today that a link contained unusual characters (for a doi link), that I learned is URL encoding to a valid ASCII format, specifically %2F instead of a forward slash (/).

I also noticed that if I use the URL without the URL encoding, it still works, although Chrome converted the URL, as did Microsoft Edge.

https://doi.org/10.1007/s12207-019-09349-7https://doi.org/10.1007%2Fs12207-019-09349-7

Firefox and Opera did not convert the URL, although either URL worked on those browsers.

It seems to my less-knowledgeable mind that it does not make a difference which URL I use on my website, but I want to ask the experts to make sure. Thus, my question: Should I use URL encoding for doi links, or does it matter?

Notes

(1) I did search for other posts about this topic. The two most similar posts were How to remove %2F from the URL? and How to get rid of crawling errors due to the URL Encoded Slashes (%2F) problem in Apache

(2) Browser versions I used:

Chrome 84.0.4147.125 (Official Build) (64-bit)

Microsoft Edge 84.0.522.59 (Official build) (64-bit)

Firefox 79.0 (64-bit)

Opera 70.0.3728.106

A website claims DMCA violation for mentioning their url, hetzner says they'll suspend my server

Anyone can share your thoughts on this ? If someone from Hetzner can clarify, it would be great.

I have a site that creates domain statisti… | Read the rest of https://www.webhostingtalk.com/showthread.php?t=1818416&goto=newpost

urlencoding – Como codificar una URL (urlencode) en un script de bash?

Estoy generando un script que solicita datos de un usuario,
luego estos datos se deben enviar en formato de URL (url-encoded) a otro script.

echo -n "Search: "
read SEARCH
URLENCODED_VALUE=???
./searchcommand $URLENCODED_VALUE

Existe un comando estandar que pueda realizar esto?

He probado el siguiente codigo:

URLENCODED_VALUE=$(echo "$SEARCH" | sed -e 's/%/%25/g' -e 's/ /%20/g' -e 's/!/%21/g' -e 's/"/%22/g' -e 's/#/%23/g' -e 's/$/%24/g' -e 's/&/%26/g' -e 's/'''/%27/g' -e 's/(/%28/g' -e 's/)/%29/g' -e 's/*/%2a/g' -e 's/+/%2b/g' -e 's/,/%2c/g' -e 's/-/%2d/g' -e 's/./%2e/g' -e 's///%2f/g' -e 's/:/%3a/g' -e 's/;/%3b/g' -e 's//%3e/g' -e 's/?/%3f/g' -e 's/@/%40/g' -e 's/(/%5b/g' -e 's/\/%5c/g' -e 's/)/%5d/g' -e 's/^/%5e/g' -e 's/_/%5f/g' -e 's/`/%60/g' -e 's/{/%7b/g' -e 's/|/%7c/g' -e 's/}/%7d/g' -e 's/~/%7e/g') 

Funciona, pero creo que debe haber algo mas sencillo, que sea mas general (pueden haber casos no cubiertos) y que no requieraun codigo tan largo o librerias/imports adicionales.

La idea es entregar un valor como K7@e49:b234 y obtener K7%40e49%3Ab234.

android – ¿Cómo podría realizar una redirección web desde cualquier url?

mi proyecto personal consiste en levantar un punto de acceso con hostapd que funciona a modo de puente.

El problema viene cuando uno de los detalles que me gustaría implementar es la redirección a una web específica, me explico:

Que el usuario nada más conectarse a la red (O al tratar de navegar por internet) le salte una web (Ya creada) donde aparece cierta información del sitio donde se ha conectado (Su IP, el dominio y datos que ya están montados en un archivo llamado “Saludo.html”.

Gracias, un saludo.

8 – Views_pre_render How do I get a file’s path url if I only have the file name?

I have a dynamically created Views listing page where I display fields from “Collection Items” node type in this order:

  1. Item Title
  2. Item Status
  3. Date Stamp
  4. Document (uploaded file. I’m only getting the filename here)

My goal right now is to take the path of the uploaded document and use it as a link in the title. Like so

<a href="path/to/file"> Item Title </a>

I’m trying to achieve this with hook_views_pre_render(), but am stuck just testing out some code I found from here.

Here is my code:

use DrupalCoreRoutingRouteMatchInterface;
use DrupalcollectionsEntityCollectionsEntityInterface;
use DrupalcollectionsEntityCollectionsEntityType;

function collections_views_pre_render(&$view){
  $results = $view->result;
  $view_id = $view->storage->id();
  $current_display = $view->current_display;

  if(strpos($view_id,"collection__" ) > -1 && $current_display == "default_page"){
  foreach ($results as $key => $result){

    //prints 0123456
      echo $key;

      //breaks the site. Gets message "The website encountered an unexpected error. Please try again later."
      $parent_id_value =  $result->_entity->parent_id->getValue()(0)('value');
      $parent_type_value =  $result->_entity->parent_type->getValue()(0)('value');
      $media_field= $result->_entity->field_media_field->getValue()(0)('value');

    }
  }
}

Once I got the file’s path, I would then be trying the solution offered here:
https://www.drupal.org/forum/support/module-development-and-code-questions/2020-01-12/use-hook_views_pre_render-to-change

$link = DrupalCoreLink::createFromRoute($parent_id_value, 'entity.node.canonical', ('node' => $parent_id_value));