Friday, December 29, 2017

YouTube and Android 2.3

This article is not entirely a resolution. Its main content (further below) is a reply I wrote in a thread on Google Product Forums, but I thought to post it here first, because I can add links and more context.

What follows at this point, is what people might be looking for first.

Update: Since 30.12.2017, the YouTube app works again. Yay.
The original text will remain below.

So, the YouTube app does not work on Android 2.3 Gingerbread and below, and shows "Error 410".

For me, the currently working resolution in Android 2.3 is to use the mobile YouTube site in the default browser ("Internet"), which sends the YouTube stream to the built-in video player app. It works, but is impractical.
As of December 2017, Android 4.0 ICS is the earliest major version of Android still supported by the official native YouTube app. The app must be up-to-date, and version 11.01.70 certainly works.

This I found out, when I was granted access to a phone that runs Android 4.0.3.
Since Android 2.3 typically runs on lower-specced devices, then Firefox for Android is unlikely to work as a player conduit for YouTube.

That's because on low-end devices, Firefox can be a resource hog even when configured in conjunction with the NoScript extension to be as resource-unintensive as possible.

Nevertheless I consider Firefox on Android 2.3 with NoScript to be like a life-saver, expecially when many modern websites have refused to load in the default browser.

13.01.2018: It should be note, that on the basis of 2 billion monthly Android users (as of May 2017), the 0.4% of active Android 2.3 Gingerbread users make up about eight million people, which is the population size of several countries.
The forum thread reply:
The particular Android 4.0.3 phone I did research with, only has the YouTube app updated, and Google Play Services, too. (The latter auto-updates in the backround.)

Other apps in the device are not, and were never updated. — That was mostly through a stroke of curious unluck: As far as I could tell, the phone's owner never signed into his Google account linked to the device for the entire time he'd been using the phone. The Android UI did ask for account sign-in all the time, but the owner dismissed the notifications. So, this prevented automatic updates and upgrades to Google Play Services, and prevented automatic updates and upgrades of all of the other built-in apps in the device.

Then I came around and resolved the account issue. That fix enabled automatic updates of Google Play Services, and enabled access to the Google Play Store, where I quickly disabled automatic updates of apps.

Note, that Google Play Services is a core component of official Android, and therefore it's one of the few components for which automatic updates cannot be disabled.

Some of the Google apps in that phone might already have some updates applied, but they are not in their latest versions (Google Maps, Hangouts, etc.). Then I only updated YouTube—mostly in order to find out and report if at least Android 4.0 is supported.

The particular device I was checking out, has an 800 MHz single-core CPU, and 512 MB RAM. That's not a lot, but even nowadays, low-end phones with only that much RAM memory are still being sold as new.[1]

Such phones are good for just one or two apps at a time, and users would be well-advised to prioritise which apps they want to keep. For example, YouTube is a major go-to app. Facebook has an official lite version of its app available; others services, like twitter, offer mobile-friendly and lite versions of their website, if the default browser is too old.

Users should also close the apps they are not using at any particular moment.

In Androids ca version 4.x, long-pressing the Home button lists all the open apps; swiping apps to the right closes them. In newer Androids, single-pressing the Menu button shows the rolodex of any open apps; these, too, can be closed by swiping them to the right.

Friday, October 13, 2017

The Smith Corona Personal Word Processor laptop

I might have written a similar post before, but this herein offers ideas as to why I keep revisiting this device.

Once as a kid, I saw an advert for the subject matter in the Smithsonian Magazine, which mag was once handed to a relative of mine. As I finally got my hands on the journal, a page in it was dedicated to this beautiful advertisement for that machine.

Here's a separate picture of the beauty available on Flickr.

Now, the Personal Word Processor (PWP) is from ca. 1989, or 28 or so years ago as of this posting.

For its time, the device's industrial design was gorgeous, so it captured my imagination, and was thus etched into my mind. Note, that the breadth of my knowledge of computer tech back then was still somewhat limited.

What confused me even then, was this: Why would one build a dedicated word processor instead of a computer that could do that and more?

A quarter century later, I learned, that it was intentionally built as a rather limited machine, and so it lacked the kind of functionality that would have made it reasonably future-proof.

My best guess is, that the project might have taken quite a long while in the product development pipeline, and was maybe even late to market, as full-fledged notebook computers as we know them now, were just around the corner.

One possible cause for PWP's probable simmering in the pipeline may have been the small screen, for which software had to be custom-made. And that always takes time.

Whereas a full-fledged PC-compatible notebook akin to Compaq LTE and just with DOS, would have enormously reduced the time-to-market — DOS ran WordPerfect, Lotus 1-2-3, WordStar, and lots more; people trained on these would have taken very little effort to migrate. Ironically, Compaq LTE was released the same year.

Compared to PWP, Compaq LTE had a bigger and standard-sized screen, a hard drive, a standard diskette drive (PWP's Data Disk was non-standard), had some standard expansion ports, a modem, and included DOS.

Smith-Corona could have built one such general-purpose notebook computer (or even a series of those), and priced it competitively, but didn't.

So, in that same year of 1989, Compaq LTE was released, and completely changed the portables market.

In 1988 (then a year earlier), NEC UltraLite was introduced. The new and reasonably innovative thing about it was the familiar laptop form-factor in consumer space, but it notably lacked a hard drive, and was deathly expensive. (GRID Compass was the first one to have a clamshell design, but it was used in space and aeronautics.)

Smith-Corona could have provided the machine with their simple-to-use software layer anyway, which could have been made to auto-start at power-up. — And marketed it like they did, as a dedicated word processor that could double as a low-end computer.

Computer-literate people could have used a switch, a function, or a key combination to use advanced computer functions, and computer-illiterate people could have used it as a simple word processor and spreadsheet machine.

Nowadays, when compared to full-fledged computers of the time, the Smith-Corona Personal Word Processor feels like a feature phone to today's smartphones.

A cheap Android tablet almost feels the same or like a (limited) home computer of the 1980s, compared to a tablet PC with Windows or Linux.

Tuesday, October 10, 2017

What causes user interface lag (yank) in Android, and remedies to that

This was meant as a reply in /. about lag in Android durin gaming.

The lags are there, because there are processes in the background doing something.

• Switch off all other running tasks.
• Check the services running in the background, and all the currently running processes to find out, what's going on.
• Switch off the animated main screen background image, and replace it with a still one.

The two things always causing mayhem during normal phone operations, were and are Google Play Services and Google Play Store apps automatically updating in the background at the expense of everything else. There is no notification or wait-until-idle-and-then-some period. On many occasions, I just had to wait until the phone was responsive again, and when checking in settings for apps, the version numbers of these two apps had been bumped up.

Another culprit is synchronisation — of all your data, and especially the sync of all your photos. Switch off sync in almost all the apps you have. Except maybe Google Play, because without sync for that turned on, the Google Play app won't be able to access the store under you account.

Friday, September 8, 2017

ID-kaart ja Eesti mobiil-ID

Apdeit: Mobiil-ID kuutasu on 1 euro — Tuleb siiski nentida, et tegemist on pideva kuutasuga. Kõnekaartide omanikele, kes oma kõnekaarte tihti ei lae, jääb edaspidigi ID-kaartide kasutamise võimalus. Sest risk on vaid teoreetiline. Aga põhimõtteliselt võiks sellisel juhul kuutasu üldse ära kaotada.

Disclaimer: Kuna ma mobiil-ID-d ise ei kasuta, panin mustandi väheinformeerituna natuke varakult üles, mille pärast tunnen ma ennast nüüd natuke kohmetult. Vähemalt märkisin selle mustandina, aga noh...

Oli: Avalik kiri Eesti mobiilioperaatoritele (mustand, köömes)
Seoses hiljutiste uudistega uuemates Eesti ID-kaartides sisalduvate Gemalto kiipkaartide Gemalto-poolse tarkvara turvalisuse kohta on hüppeliselt kasvanud mobiil-ID kasutajate arv, sest mobiil-ID-d sarnased küsimused ei puuduta.

Spetsialistide tehtud teemakohane kommunikatsioon on igati usaldusväärne.

Küll on mõnede vastutustundetute poliitikute ja parteide avaldused tekitanud ülemäära põhjendamatut ärevust.

Et võimalikke kahtlusi hajutada, saaksid Eesti mobiilioperaatorid ja teised asjaomased asutused võtta ette järgmiseid samme:

* Teha mobiil-ID-ga liitumine septembrist kuni eel- ja e-valimiste perioodi lõpuni maksuvabaks — et see oleks täiesti tasuta, sh. mobiil-ID-d toetav SIM-kaart. Et uue SIM-kaardi järele tuleb tihtipeale tulla operaatori esindusse, tuleb sinna ka rohkem kliente, kes valivad endale äkki uuema telefoni ka.

* E-valimiste perioodil võiks kõik mobiil-ID tehingud olla samuti tasuta, sh digiallkirjastamine. Sellisel viisil oleks mobiil-ID-ga e-hääletamine täiesti tasuta ning teeks hääletamise veelgi ühetaolisemaks (muidu tuleb iga digiallkirjastamise eest maksta operaatorile tasu).

* Niisugust või sarnast kampaaniat saab läbi viia iga kord kui toimuvad valimised; eriti just e-hääletamisperioodil.

Wednesday, September 6, 2017

A small History of browser support for CSS variables

Firefox support for CSS variables began with version 29 (with the var- prefix, released 29.04.2014) and as an option to be turned on in about:config for this to work.

Support without the custom prefix exists since version 31 (22.07.2014) and with the about:config option turned on by default.

The about:config preference to toggle CSS variables was finally removed in Gecko 55 (08.08.2017), which is the current version; it includes Firefox 55 and other browsers that use the current Gecko rendering engine.

CSS variables have been supported in Google Chrome from the outset with the -webkit-var- prefix and when 'Experimental Web Features' were turned on in chrome://flags.

Prefixed variables functionality existed in Chrome until 33.0.1750 (20.02.2014, Blink 537.36, V8 v3.23.17), and was removed in Chrome 34.0.1847 (08.04.2014, Blink 537.36, V8 v3.24.35) because of performance issues. V8, or Chrome V8, is the JavaScript engine used in Chrome.

Un-prefixed variables were implemented in Chrome 49.0.2623 (02.03.2016, Blink 537.36, V8 v4.9.385). The current Chrome version is 61.0.3163 (05.09.2017, Blink 537.36, V8 v6.1.534).

Monday, August 28, 2017

Post-nova planetary hypothesis

I read a post on Google+ referencing an article about a supernova remnant. I looked at the picture, and as it happens, let my mind and imagination have a flight of fancy. Again. In a post comment, most of which I've brought up here, too.

The entire thing does look spherical, but the sphere is broken up, and its gravity—or that of the centre of the sphere—keeps the remnant elements around it.

I could posit, that it's simply a dwarf star or dwarf remnant of a star, apparently containing that shrapnel of silicon, as the title suggests.

As I looked closer, the silicon is right in the middle of the sphere, so this could either be what's left of the star's core, _or_ that surviving core is inside and in the middle of a surviving planet that moved in to take the former place of what's left of the old star. In the latter case — if it begins to gather new matter, then it will develop into a new star. A stellar renewal of sorts.

If it's a surviving planet, then a question becomes about whether it moved in, or was it pulled into the center—to the position of (around) the remnant core. It looks, like other spheres are also close, which suggests, that they have been pulled in, too.

An evolved star before nova contains concentric shells of silicon, so the silicon simply manifests the inner (surviving?) parts of the shell post-nova.
https://en.wikipedia.org/wiki/File:Evolved_star_fusion_shells.svg

The silicon remnant might rejuvenate.

If its gravity remains greater than that of any surviving panets, it will catch a planet with enough size, enough elements, and a sufficiently strong rotating core. Or one or more planets that each carry one such component, or a combination of those.

My best guess is a gas giant, because, for example, movements of Jupiter's atmosphere are not dissimilar to movements in the Sun's atmosphere. All that differs, is the behaviour of elements because of differing parameters involving gravity and pressure, but general movements do not diverge all that much.

If post-nova, the remnant's gravity is lesser than that of the surviving planet with the greatest gravity, then eventually, these two will merge, and the solar system will reconstitute around the new body.

The trick is to find a matching planet to nest in. If my description is ever found to be accurate, then we're seeing a stellar hatchling.

----
As it is, a supernova usually destroys everything. I suppose, mini-novae can also happen, which might then allow for the stellar rejuvenation described above.

Antoher possibility is, that mini nova happened in another—perhaps neighboring or nearby solar system, and that system's nova wiped out much of its sibling's (or siblings'..) planets and it star. We might simply be looking at the remains of that surviving solar system, which might be trying to rebuild after the catastrophe.

So, a more powerful nova in the distance, or a mini- or micronova right there. The destruction must anyway be survivable enough to allow such processes to move forward.

----
(Unless I got the scale wrong, and the spherical remnant is many light-years in size. But what I see, sure looks what I've desribed above.)

Thursday, July 6, 2017

What a simple Nokia 1616 featurephone can do

I have a very sturdy Nokia 1616 featurephone that I got as a present from a sister.

The phone has an FM radio, a flashlight, a 3.5mm headphone jack that supports compatible headsets, and great battery life.

Its built-in software includes a speakerphone (basically an external speaker), an alarm (duh), a talking clock ("Time is..."), a calendar with reminders, a timer, stopper, calculator, converter, an expenses ledger, three games (Sudoku, Forbidden Treasures, and Solitaire), and the possibility to add preset images to favourite contacts.

And, of course, phone calls and SMS messages, including picture messaging (rarely used now, but this is not MMS).

The clock and calendar also work beyond 2016 and 2017, unlike the two Samsung featurephones I have.

Of all things, an FM radio (with RDS) in a phone of any type is a given feature outside the United States (and maybe the entire North America).

I wrote this in response to a post shared in Google+.

Wednesday, July 5, 2017

How to get Skype on the Web to work in Firefox in old Android

As you may already know, Microsoft ceased Skype app support below Android 4.0.3. This covers Android 3.0 and Android 2.3 Gingerbread.

Maybe some of you probably cannot upgrade from these OS versions to Android 4.0.4 or greater, or that you can't upgrade your device. So, I've got a possible solution, but it's very technical, and might not work with every affected device.

If you feel adventurous, then bear with me.

The solution only works on certain devices that have a screen big enough, and a CPU and memory combo that's big enough, too.

What you need

* A reasonably fast device. Slow devices are those with a CPU with 800 MHz or less, and 512 Mb RAM or less. This was my experience, and slow means very slow. In my case, I got Skype on the Web to work, but as it loads in Firefox, the browser takes the entire resources of a device, forces other apps to quit (per Android design), and the entire interface takes three-to-four minutes to load from login to UI.

* The screen resolution must be greater than 320x480 px, because Skype on the Web was not designed for small screens.

Your mileage may vary.

* Firefox version between 44.0–47.0. Firefox 44.0 is the earliest version that can handle Skype; possibly, because of its more generous cookie acceptance mechanism from that version on. (Firefox 44.0 and newer no longer have the cookie prompting mechanism.) On some versions of Android Gingerbread, only Firefox 44.0–45.0 are the newest to run, though version 47.0 of the browser is the latest built for Android 2.3. If v47.0 won't run, get v44.0 or 45.0. Firefox 44.0 supports old-style native Android menus, v45.0 has a newer main menu.

* Another requirement is installation of the NoScript Anywhere extension in Firefox. Technical users already know about this extension. If configured correctly, then NoScript allows reducing overall resource usage while browsing the modern web.

The hardest part is allowing/disallowing sites in NoScript on a subdomain level, because it requires Vim Touch for advanced text editing. (Someone please write an extension to alleviate this issue.)

The soup

Firefox for Android comes with this neat feature, that one can specify site-specific user agent overrides in about:config.
The user agent is a piece of text that a browser sends to a website as identifying information about itself. It contains operating system name and version, and browser name and version. All browsers do that since the first browsers on the web.

about:config is the advanced settings page in Firefox, GNU IceCat, and other browsers that use the Gecko rendering engine. You can access the page by typing about:config in the address bar.

Since Firefox versions 47.0 and below for Android 2.3 are older than the version required by the web Skype, you need to modify the user agent string to make Firefox appear like a newer version to allow Skype on the Web to load.

In about:config, create a new setting string by tapping the Plus (+) button; then specify, that the setting is a string, then add the name to the setting:

general.useragent.override.skype.com

For a time, you can leave the string part empty, until you paste the one I suggest here:

The UA string needs to show that the browser is a desktop browser and of a reasonably recent version. The one I use on my device is this:

Mozilla/5.0 (X11; Linux armv7l; rv:52.0) Gecko/52.0 Firefox/52.0
Some of the items mean the following:
* X11 is the platform part, and means X Window System, the most widespread graphical environment in UNIX/Linux.
* Linux is the OS and the OS kernel name. Because Android uses the Linux kernel, stay with X11 and Linux (though Android uses a different graphical subsystem).
* armv7l — the CPU architecture in my device. Most mobile devices running Android 2.3 and 4.0 have that, and it's the one variable that you can change. The letter after number 7 is not 1 (one), but a lower-case L.
If your device is based on ARMv6, then it's more rare and physically less fast, and the most recent supported Firefox for that is version 31.3.0esr (also for Android 2.2 Froyo). You can use ARMv6 in the string, if you know the correct nomenclature naming of the architecture (I haven't looked it up), and it's actually in your device.
* rv: stands for revision;
* Gecko is the name of the browser's rendering engine;
* Firefox is the browser name. Note, that Skype on the Web does not officially support alternative Gecko-based browsers, such as IceCat, so use only Firefox in the UA string. This means, that you can use GNU IceCat, but you'd still need to enter the Firefox-based UA string.
* Firefox/52.0 is the current official extended support release (ESR). As above, the version number must be 52.0 everywhere.

Sample screenshot of how it looks in about:config —

Domains to add for useragent override


You must continue adding UA strings for a number of Skype and Microsoft domains as described above, so here's what I think is the full list of those:

skype.com
skypeassets.com
live.com
microsoft.com
s-microsoft.com
msecnd.net
gfx.com
gfx.ms
trouter.io
bing.com
azureedge.net

Domains to whitelist in NoScript


Generally, you can whitelist all of the above domains, and be happy.

But if you want to tinker on a subdomain level, then you must edit the line in about:config at

extensions.nsa.policy

To edit that line, I strongly recommend using VIM Touch, which is available from the F-Droid repository of FOSS apps for Android. For detailed instructions on how to do this, read A primer on whitelisting subdomains in Firefox NoScript. This is compulsory.

I compiled the whitelist with the help of NoScript for desktop Firefox, which lists the below domains for all to see.

then you must edit the JSON string in VIM Touch. So here's what I got what I think is the full list of subdomains to whitelist:

"config.skype.com":1,
"drip.trouter.io":1,
"lw.skype.com":1,
"secure.skypeassets.com":1,
"https://account.azureedge.net":1,
"https://api.asm.skype.com":1,
"https://api.skype.com":1,
"https://apps.skypeassets.com":1,
"https://auth.gfx.com":1,
"https://auth.gfx.ms":1,
"https://browser.pipe.aria.microsoft.com":1,
"https://c1.microsoft.com":1,
"https://client-s.gateway.messenger.live.com":1,
"https://config.skype.com":1,
"https://consumer.entitlement.skype.com":1,
"https://contacts.skype.com":1,
"https://cs.microsoft.com":1,
"https://drip.trouter.io":1,
"https://flagsapi.skype.com":1,
"https://go.trouter.io":1,
"https://apps.skypeassets.com":1,
"https://avatar.skype.com":1,
"https://c.bing.com":1,
"https://i.s-microsoft.com":1,
"https://kes.skype.com":1,
"https://login.live.com":1,
"https://prod.registrar.skype.com":1,
"https://prod.tpc.skype.com":1,
"https://s4w.cdn.skype.com":1,
"https://static-asm.secure.skypeassets.com":1,
"https://static.asm.skype.com":1,
"https://support.skype.com":1,
"https://swx.cdn.skype.com":1,
"https://web.skype.com":1,
"https://weu1-api.asm.skype.com":1,
"https://www.skype.com":1

This list is in JSON format: domains are surrounded by double quotes, with :1 meaning to allow that domain (:0 is to forbid, but you won't need that with these).

I typically also add the https:// protocol prefix to make sure, that only the secure version of the site is whitelisted. This is useful in case a non-secure version of a domain is compromised, but a secure version isn't, as domains with http:// and https:// can serve different content.

Domains in double quotes are those that use variable subdomains, which makes using the protocol prefix moot. Double-quoted domains support both http:// and https:// versions of a site. Sometimes, these are also made to serve non-secure content. The profuse use of the secure protocol prefix is really for security purposes.

Whitelisting only these domains means, that other Microsoft properties are still not script-enabled.

The entire exercise worked for me, but the Skype for Web UI was extremely slow on my device. There are newer, more powerful and better devices with only Android 2.3–4.0.3, so people with those might have more luck.

Errata and considerations

In my experience with a very low-end Android device, Video and audio won't work. Text and SMSes work, and sometimes that's everything that is needed.

Entering YouTube URLs or web addresses starting with either http:// or https:// might not work. If that is so, enter web addresses without these protocol prefixes.

A more experienced user might choose to edit the ABE string from about:config in a text editor. It goes like this: copy string, paste to text editor, edit, copy string, paste string to overwrite the olde parameter value. Editing the NoScript ABE string in Firefox mobile does have a learning curve.

February 2018 update:
I recently upgraded Malawarebytes AntiMalware, and it had "web protection" for two weeks. After that, I could not have access to Skype on both the Skype desktop app, and Skype for the web. After uninstalling, I could connect again via the browser, but the service forced me to make my Skype account a Microsoft account; possibly because of multiple unsuccessful logins.

There was also the case of having to manually set web.skype.com to accept cookies though "Page Info" > Permissions > Cookies in Firefox (set to Allow from all gray/default). Strange.

A primer on whitelisting subdomains in Firefox NoScript

In Firefox or GNU IceCat, go to about:config, look for the

extensions.nsa.policy

settings string. Search for nsa.po to get the correct match.

This configuration line is only one line in JSON format, so it must be edited in VIM Touch.

Vim Touch (stylised as VIMTouch) is a port of VIM to Android, available from the F-Droid repository of FOSS apps for Android. You do need experience with vi/VIM.

First copy the line by long-pressing the setting in about:config and selecting 'copy value'. Paste it into VIM with <"*P>.

(Hereonafter to avoid ambiguity: In places, where other punctuation is also used, I use < > with Vim commands that must be typed with the virtual keyboard. These are not to be typed.)

Save the line for backup:

:w /sdcard/yourfolder/NoScript_Firefox_whitelist_backup.txt

Always be careful with JSON syntax for that line, because a typo might bork it. That's why it's useful to save the original (working) line first as backup.

Then, in order to separate the domains part of the JSON line, break the line where the domains begin, and add a linebreak to separate the right wavy bracket } at the end of that line into a new line.

Then copy the domains line into a new window: <Shift+V> to select the entire line in visual mode, then press <y> to copy (y = yank). To copy outside Vim, use <"*y>.

Then create a new window with <:sp new> in the Vim command line. Tap into the newly-created window, and paste the copied text with <p> or <P>. I usually use the lower-case p (paste) command to save time.

Then break this one long line to separate all the domains each into their own line:

:s/\&,/&^M/g

:s — substitute. This is the find and replace command in Vi/Vim. The basics on how it works here.
\&, — search for commas
&^M — Add a newline. The ampersand & is for adding text, then press Ctrl+V and Enter/Return on the virtual keyboard to get ^M. Use Hacker's Keyboard, because it has the function keys of normal keyboard, such as Ctrl and Alt. Hacker's Keyboard is also available on F-Droid.
g — search through the entire current line

Screenshot:

NoScript Anywhere does not have many domains built in, but there are some added by its developer. The domains, each now in their own line, are formatted like this:

"https://web.skype.com":1,
"https://www.skype.com":1

The very last domain must never have a comma at the end. Upon pasting it into the original file, the wavy right bracket } goes there.

You add subdomains that you like into each new line:

"www.website.com":1,
"ads.website.com":0,

1 is to allow, 0 to forbid. This means, that the website you add has its www part working, but not its ads subdomain.

Generally, you only need to whitelist the www part, and all the other subdomains (such as ads.website.com) are not accepted for running scripts.

That's the entire soup of subdomain-based whitelisting, in that one can whitelist only the subdomains needed for scripting. Suppose m.website.com is script-heavy, but you want to visit www.website.com with scripts allowed, and m.website.com with scripts specifically disallowed:

"www.website.com":1,
"m.website.com":0,

As you add more and more domains, you need to sort the list, too. In Vim, use the

:sort

command. This sorts all the domains alphabetically.

Suppose you have the right expanded collection of subdomains you want to accept:

"ads.website.com":0,
"https://web.skype.com":1,
"https://www.skype.com":1,
"www.website.com":1

Note again, that the last line must be without a comma at the end.

To join the domains into one line, select all text with ggVG and key in gJ to join all text. Note, that case is important.

ggVGgg goes to document start, V selects the entire (first) line, G goes to the very last line, and thus expands the selection to there in conjunction with V.

Select all text again with <ggVG>, then copy it with <y>. Tap into the original Vim window with the pasted JSON settings line. Make sure the text cursor is in the domains list.

Select the entire domains line with <V>, and paste over it with <p>. Join all three lines with <gJ>.

Save the expanded line into a new file:

:w /sdcard/yourfolder/NoScript_new_whitelist_for_Firefox.txt

I usually add the date, and in one word also what I added:

:w /sdcard/yourfolder/20170705_NoScript_whitelist_for_Firefox_(Skype).txt

Copy the expanded settings line to use outside Vim (to be pasted into Firefox) by selecting it with <V>, and use <"*y> to copy it into the external buffer.

Go to Firefox (or IceCat's) about:config page. It should still be open. If it's not, it may reload on its own.

Locate the extensions.nsa.policy setting by using nsa.po to search.

* Tap on the setting to select it.
* Tap into the setting value to focus the text cursor in it.
* Tap into the line again, to get Firefox text editing tools:
* tap the select all (window-like) button to select the entire line,
* tap the paste button to paste the copied line,
* press Enter on the virtual keyboard.
* Go to about:blank in the address bar.

That should do it, and the added configuration line takes effect right away. Go to a website to test it, and the NoScript menu item should reflect the results.

Note, that Firefox/IceCat have a tendency to reload the about:config page from time-to-time, so it's more useful to copy and paste settings names and values instead of separately typing them, as occasional about:config page reloads break the new setting creation.

The basics of VIM find and replace

The basics of VIM find and replace work like this (for one line) —

:s/searchable/replaceable/optional_commands

The slashes separate the searchable and replaceable and the optional commands.

To search/replace for all occurences of searchable in the same line, use the /g option —

:s/searchable/replaceable/g

To search/replace through all the lines in the entire file, use the percentage sign before s

:%s/searchable/replaceable/g

To append (add after text) or prepend (add before text) instead of replacing, use the ampersand, and pay attention to its location relative to replaceable text:

:%s/searchable/&add_after

:%s/searchable/add_before&

If something goes wrong, press the <u> key to undo. Ctrl+R to redo.

Vim uses regular expressions for advanced searches. To test if a match works, use the simple / (slash) command in the Vim command line to find out if the searchable matches what you need to look for:

/searchable\/

looks for the word searchable that has a forward slash appended to it. Because the forward slash / is used in the search and replace syntax with subst, then it has to be escaped with a backslash \, like this: \/

If the searchable is highlighted, type :noh to turn it off for the time being.

Delete empty lines:
%s/^$\n/
^ = start of line
$ = end of line
\n = newline

Quitting Vim

Unlike strictly text-mode versions of Vim, Vim Touch has a more accessible quit command in the app's Android-native menu.

Some other basics of operating Vim:

Vim uses two modes: editing mode and command mode. The former is used to write text, the latter to manipulate text and files by way of entering commands outside editing mode.

The command mode uses two types of commands —
* those that begin with a colon, followed by additional commands and options :
* those that don't.

Quitting Vim with the virtual keyboard:

:q — simple quit. Uses confirmation.

:q! — quit without confirmation or saving files.

:qa! — quit all open files without confirmation or saving files.

Insert text:
i — before cursor
a — after cursor

I — at beginning of line
A — at end of line

Shift+R — insert text in INS mode (overwrite)

Press Esc to switch away from text insert mode.

Undo/redo:
u — undo
Ctrl+R — redo

:q

Friday, June 16, 2017

Web brands, e-mail, and their centerpiece services

As an anonymouse reply to a thread

For many things, e-mail is now one of those infrastructure/utility things that is now one of many that complements a different centerpiece service, such as music video delivery and stuff.

My case:
For Yahoo, it used to be GeoCities (remember, that GeoCities offered their own e-mail address, too), and they migrated their GeoCities userbase over. E-mail was then a useful add-on to the Yahoo portal and search. For a time, Yahoo's e-mail was great, until spam overwhelmed everyone.

Yahoo later bought Launch, and became the first large-scale music video delivery service—with ads and all, and the difficult ways to get Windows Media Player to play for sure on Mozilla and then Firefox 1.0. But Launch.com was the property that made Yahoo great. Until they began putting ads between each music video, which was horrid.

(Yahoo later bought flickr and tumblr, and while these have added value, then Yahoo has had a haphazard time getting to monetise those two.)

After Google bought YouTube, which quickly became the primary music video delivery service (along with Vevo), the Yahoo Launch site lost relevance. Maybe only die-hards swear by it. While Flash at the time was way more resource-intensive than a plug-in, then Flash was available for Mac and Linux, and arguably cross-platform on the desktop, thus managing to play videos without a hitch (YMMV). Using Flash from the outset made YouTube great. YouTube is now the centerpiece of all of Google's web properties.

A similar service to YouTube was msn video, but it was a pioneer vaguely similar to Launch; while msn video had plenty of user-created videos, I don't recall it ever having music videos.

* For Google, the centerpiece is YouTube. E-mail is still great, and many people also use Google Docs, and some even Google+. Android complements and extends the whole bunch.
* For Microsoft, it's probably a combo of Office Online, OneDrive, Skype on the web and a few other tidbits.
* For Yahoo, the centerpiece services are news, flickr, and tumblr (in no particular order).
* Apple could be best described as a non-service. It does offer services all right, but none of them has killer web features compared to above players.

Both Yahoo and Microsoft did social networking, and for a time, both were reasonably good, but seemed to have been shuttered after Facebook became a thing.

Sunday, February 26, 2017

The Google Plus app won't work in Android 2.3 any longer. Use Firefox.

This came up as an issue for me recently, and I wrote this as a reply to another person who wasn't able to access Google+ content in their app anymore. This post is meant for seasoned Android users.

Since mid-to-late February 2017, the Google Plus app wouldn't work any longer in my phone, which runs on Android 2.3.6 Gingerbread, and can't be upgraded to a newer Android version.

While the Google Plus website still works on the mobile web, the stock web browser ("Internet") is far too outdated to visit Google+ and other modern sites.

The solution — or workaround, if you will — is to download and install Firefox for Android. Try from Google Play Store first. If that doesn't work, you need to download Firefox from the Mozilla archive.

• Temporarily switch on third-party app installs.
• Below is a breakdown of which Firefox version is compatible with which combination of ARM CPU architecture and older Android version. Each Firefox version links to the appropriate Mozilla archive directory.
ARMv6 devices —
Android 2.2, 2.3: Firefox 31.3.0esr
ARMv7 devices —
Android 2.2: Firefox 31.0
Android 2.3 (on a slower phone, <1 GHz): 44.0.2
Android 2.3: Firefox 47.0
Then from the Mozilla Add-ons website, install an adblocker to block ads. I suggest uBlock Origin, because it has built-in support for anti-adblock lists; this needs to be turned on separately, but works.

Friday, February 24, 2017

A small ARM primer

Android devices' CPUs are by and large ARM microprocessors, as these were chosen for their low-power features.

The ARM family consists of different architectures, each of which is named ARMvX, where v stands for 'version', and X is the architecture version number.

CPU architectures can be incompatible with one another, as each have different instruction sets, and programs made for one architecture won't run on the other (or there's a heavy performance penalty).

Most Android device CPUs are based on ARMv7-A (usually shortened to ARMv7) or greater, but a bevy of older devices have ARMv6.

Consequently, not all Android device CPUs are based on ARMv7 or greater, and that's why it's important to pay attention to which architecture an app was compiled for.

ARMv7 is subdivided into a series of architecture profiles, of which Android devices use ARMv7-A (Application profile). The ARMv7-A grouping is also known as Cortex-A.

A deeper subdivision in each architecture is a core, and these are named differently. Cores within the same architecture are mostly compatible between one another, but differ in performance.

Each device manufacturer or maintainer of a compatible Android fork makes their own compilation of the operating system; first for a particular architecture, and then optimised for each processor type, graphics adapter (GPU), and other hardware features.

I'm specifically pointing cores out because of naming similarities between cores and architectures; for example, ARMv7 should not be confused with ARM Cortex-A7, since the former is an architecture, and the latter a core that uses said architecture.

Respectively, ARM11 is the microprocessor core using the ARMv6 architecture; as ARM Cortex-A5 and ARM Cortex-A7 are under ARMv7.

Tuesday, February 21, 2017

Some URL entry line edit commands in Lynx for Windows

Ctrl + a — move cursor to start of line
Ctrl + e — move cursor to end of line
Ctrl + d — delete next character

Ctrl + b — delete one word back (to left) from cursor position
Ctrl + f — delete one word forward (to right) from cursor position
^ These are useful for long URLs

Sunday, January 22, 2017

Uploading files via Firefox in Android 2.3

This is very much a quick-and-dirty post, so that I wouldn't forget about it. As my phone is also currently charging while off, I can't check out some information pertaining to this post. Some time after the phone will have charged, I'll update this post accordingly.

So, yesterday, I had this need to upload a file to a project in Github via Firefox in Android 2.3 Gingerbread.

Now, Github is quite a modern website, and in Android 2.3, the logical browser for visiting Github and other state-of-the-art sites is Firefox for Android or a derivative, such as GNU IceCat, Orfox, or Adblock Browser.

I have two browsers in my phone: GNU IceCat 38.8 and Firefox 44.0. Both have NoScript installed, and Github servers were whitelisted in both. Separate issues with uploading are covered at the end of this post.

The crux of the problem is having a filepicker that works.

Typically, an Android user gets a file activity dialog to pick an app through which to select a file; such as Gallery for photos and videos, or somesuch.

For a simple text file, things are a bit more complicated, but I've discovered two kinds of filepickers that I associated with after having installed two separate apps.

• One filepicker, "Choose file" with blue folder icons, seems to be related to VimTouch, a version of Vim for Android, because I noticed that filepicker after installing this great text editor.
• Another filepicker, "Find file" or "Find command" (I might err with its title) is adorned with the Terminal Emulator icon.

Both VimTouch (alternatively spelled 'Vim Touch') and Terminal Emulator were installed through F-Droid, a repository of free and open source apps for Android.

The filepicker that works, is the one I associate with Terminal Emulator.

Unfortunately, I don't know beyond my memory of my app installation activities, and beyond one app icon about how to find out which app or handler these two particular filepickers are actually associated with.

Upload issues.

Resolved on 28.04.2017.

With IceCat, there were issues relating to uploading files to GitHub, whereby file upload failed with an error. File upload to GitHub worked with Firefox for Android, but for some odd reason, did not work in IceCat.

Now, I use NoScript in Android Firefox and in IceCatMobile (based on Firefox with very small changes). Since both have slightly different NoScript whitelists, then I attributed the issue to an incomplete NoScript whitelist in IceCatMobile. But it was not at fault, and the problem was much simpler, though no less esoteric.

Turns out, that all other things being almost equal, GitHub does not recognise the Firefox-based GNU IceCat browser when uploading files, if an IceCat-only desktop user-agent (UA) string is used.

The solution is to change in IceCat's about:config page the Gecko-based user-agent override affecting the Github domain to that of Firefox, leaving the version number intact.

<Moot:> Possible issues wrt NoScript
The reason for that, is, that I edit NoScript whitelists in Vim Touch so as to get a very fine-grained whitelist on a subdomain level (3rd-level domains and below, such as sub.domain.tld ), because the browser extension in Android does not provide such functionality.

The rationale for subdomain-level whitelisting is, that my phone is rather underpowered, and subdomain-level whitelists in Firefox/derivatives make it possible to allow advanced site functionality, and at the same time, to block script-based ads and trackers. In addition, it's possible to switch off very resource-intensive site functionality by blocking certain subdomains of a website. Such features are impossible in the stock Android browser, the rendering engine of which dates back to 2011.

(I'm often contemplate writing a separate post about all that.)

So, the NoScript whitelist for IceCat is typically more fine-grained; yet oddly, file upload to Github actually worked with Firefox.

Friday, January 13, 2017

Posting URLs with multiple concurrent dots in YouTube comments

In a YouTube discussion under one of the Star Trek-related video clips, a commenter ha posted an address to a Memory Alpha page into the comments, but the address to the article was truncated, because it contained three concurrent dots:

Intended address:

http://memory-alpha.wikia.com/wiki/Star_Trek_is...

and as it turned out in truncated form:

http://memory-alpha.wikia.com/wiki/Star_Trek_is.

Note, that the two last dots are gone, and if the address is clicked on at YouTube comments, the browser is taken to a "404/Not found" page in Memory Alpha.

The article about what Star Trek is, actually does contain three dots at the end of its address, but the YouTube comments system doesn't like it, as I found this out through my Google+ notifications on the desktop and the (linked) comments at desktop YouTube.

The somewhat unorthodox solution to avoiding dots from being truncated is to insert the URL with those three ending dots and replace the two last-most dots with their percent-encoded representations. Case in point:

http://memory-alpha.wikia.com/wiki/Star_Trek_is.%2E%2E

That one dot there may remain.

The percent-encoded values are available from Windows Character Map, a similar program in UNIX/Linux, or through any Unicode character table available on the web.

One can also try with

http://memory-alpha.wikia.com/wiki/Star_Trek_is.%2E.

— with "typed dot | precent-encoded dot | typed dot" after "_is", but there cannot be any two or more concurrent normally-typed dots.

Truncation of characters in addresses pasted (or typed) into YouTube comments can also apply to other web addresses with multiple concurrent characters, but I do not know, which types of characters are more affected or less. I could lay a claim, that special and non-alphanumeric characters that are used in programming, are treated with a greater level of scrutiny.