Google Play Store Now Open For Progressive Web Apps – Slashdot

Google Play Store Now Open For Progressive Web Apps – Slashdot

Chrome 72 for Android shipped the long-awaited Trusted Web Activity feature, which means we can now distribute PWAs in the Google Play Store! I played with the feature for a while, digging into the APIs and here you have a summary of what’s going on, what to expect and how to use it today. Chrome 72 for Android is now shipping from the Play Store to all users and this version included Trusted Web Activity (TWA), that in a nutshell is a way to open Chrome in standalone mode (without any toolbar or Chrome UI) within the scope of our own native Android package. Let me start saying that the publishing process is not straightforward as it should be (such as “enter your URL” in the Play Console and it’s done). It’s also not a way to use the currently available WebAPK and publish it in the store. It’s a Java API that communicates through services with Chrome and seem to be in the early stages, so there is a lot of manual work to do yet today.

home directory – Is it okay to delete ~/.cache? – Ask Ubuntu

home directory – Is it okay to delete ~/.cache? – Ask Ubuntu

This will delete everything in your .cache that was last accessed more than a year ago

find ~/.cache/ -type f -atime +365 -delete

If you’re nervous about running it, this will show you what’s going to be deleted:

find ~/.cache/ -depth -type f -atime +365 

I’m using ‘access time’ for that, you could also try ‘creation time’ by using -ctime (although I’ve found many cache files which are years old but still accessed). Thanks to @n33rma for the edit suggestion.

Pinebook Pro – Hackable ARM64 Linux Laptop for $200 | Bald Nerd

: Pinebook Pro – Hackable ARM64 Linux Laptop for $200 | Bald Nerd

It looks quite promising!

Pinebook Pro System Specifications

  • 14″ 1080p IPS LCD panel
  • 64GB of eMMC storage
  • Black magnesium alloy body
  • MicroSD card slot
  • Digital video output via USB-C
  • Audio aux out / UART
  • USB 3.0 and USB 2.0 ports
  • 802.11ac WiFi
  • Bluetooth 4.2
  • 4GB of LPDDR4 RAM
  • Charging via barrel port or USB-C
  • Rockchip RK3399 Hexacore SOC
  • 2mpx front-facing camera
  • Microphone
  • Speakers
  • Slim and slick design with minimal branding
  • PCIe x4 that can take a m.2 NVMe SSD
  • Price: aiming at $199

Multiple fields primary keys in Django

I’m developing a little application in Django.

Having developed a subtle dislike for UUIDs used as primary keys I tend to rely of the “natural keys” which are almost always identificable in a data model.

Often thought those keys span over several fields. Think about a receipt of a multi-store multi-cashier store, their receipts are identificable by the tupla <store_id, cashier_id, date, progressive_number>.

It seems that Django currently does not allow, at least out-of-the-box to use several fields grouped into a tuple as primary key. It’s also explained in its FAQs:


Do Django models support multiple-column primary keys?
No. Only single-column primary keys are supported.
But this isn’t an issue in practice, because there’s nothing stopping you from adding other constraints (using the unique_together model option or creating the constraint directly in your database), and enforcing the uniqueness at that level. Single-column primary keys are needed for things such as the admin interface to work; e.g., you need a simple way of being able to specify an object to edit or delete.

So I understand why lazy developers use UUIDs.

Simone Federici has written django-compositekey but AFAICS it support only Django 1.x and not the current 2.x
It seems I have to maintain uniqueness django-way and I don’t like it the way it is: it looks like an ugly kludge.

Update:

I’ve been busy with completely unrelated issues but I still haven’t solved this. Apparently neither Django developers as they wrote in “Multi-Column Primary Key support“. Too bad, I’ll make up those keys composing primary key strings like "$store_id-$cashier_id-YYYY-MM-DD-$progressive_number". Hoping that my little hack will not still be in use in year ten thousand

How do I paste from PuTTY into Vim 8.0?

How do I paste from PuTTY into Vim 8.0?

Well, nice question, as I found it quite annoying that the usual right click on the mouse doesn’t work. In fact


Open a web browser, copy / paste some text from a website (eg. GitHub)
Use PuTTY 0.67 to SSH to a Linux VM (eg. Ubuntu 16 Xenial Xerus)
Open a file in Vim
Hit i to change into Insert mode
Right-click to paste the clipboard contents
Issue
Unfortunately, when I right-click in the PuTTY session, rather than pasting clipboard contents, what’s actually happening is that Vim is going from INSERT mode to (insert) VISUAL mode. I don’t think I’ve ever seen anything like this before.

Luckly it seems that there’s an easy workaround.


Adapt to it: With mouse mode turned on, the new way to paste is shift-right-click (at least in PuTTY)

Una buona digestione

Signore,
dammi una buona digestione
ed anche qualcosa da digerire.
Donami la salute del corpo
col buonumore necessario a mantenerla.

E donami, Signore, un’anima santa
che faccia tesoro
di quello che è buono e puro,
affinché non si spaventi
alla vista del male,
ma trovi, alla tua presenza,
la via per rimettere le cose a posto.

Donami un’anima che non conosca 
la noia, i brontolii, i sospiri e i lamenti;
e non permettere che io mi affligga eccessivamente
per quella cosa troppo invadente
che si chiama “io”.

Signore,
dammi il senso del ridicolo
e concedimi la grazia di comprendere gli scherzi,
affinché conosca nella vita
un po’ di gioia e possa farne partecipi anche gli altri.

Source: Chi siamo, dove andiamo, perchè siamo? – CattOnerD