Archive for the ‘information technology’ Category

Locked Down and Probably Out

Monday, 18 December 2023

Facebook has locked-down my account, claiming suspicious activity, and demanding that I send an image of identification (such as a driver license) in order to regain access.

The claim of suspicious activity may be genuine. Some days ago, my account was one of various to which an outside party got access. Some of the victims were using two-factor authentication, and I'd done nothing that would give others access to my password, so we may be sure that Facebook itself was cracked, again. Those who broke into our accounts did not move to take control away from us, and acted in a manner that would alert us to the cracking, so the effort seems to have been a demonstration of an ability to crack into the system. (When this 'blog was hosted by Midphase, the server itself was cracked, but the crackers did no worse to the users than to leave a non-executable file in our directories. By the way, Midphase sought to gaslight me when I discovered the cracking, claiming that every damn'd victim had been individually at fault.)

I simply won't provide Meta (qua Facebook or qua Instagram or otherwise) with an image of any identification document. Such an image would present data to them that I do not want them to possess. They have been both fools and knaves, about personal information and in other ways. (I was not using two-factor authentication with Facebook exactly because I didn't want them to possess my phone number or somesuch. Prompted by a suggestion from Ray Scott Percival, some days ago I ordered a YubiKey, which is due to arrive to-morrow. I will be using it for various other accounts, and would have been using it for Facebook.)

A few years ago, I found my account similarly locked-down, but the condition was cleared after several hours, without my providing the demanded information. However, I do not expect such a reversal in this case. So I will probably forfeit my account. I will not create another.

If you have found your way here from Facebook, and want to contact me, you can find an e.mail address at the bottom either of the sidebar (when viewing the desktop version of the site) or of the hamburger menu (when viewing the mobile version of the site). That e.mail address is presented as a graphic (to impede 'bots). The address is an alias of one with the user ID Mc_Kiernan, so if you use a white-list to screen your e.mail then you might want to effect a substitution.

Inkscape Union Thwarted by Singleton Groups

Thursday, 22 September 2022

I encountered a rather odd problem when using Inkscape, a vector graphics program. I was unable to create unions joining two paths because each was in a group with only one a member. I could think of nothing that I'd done that should have created any group, and a group with only one member is an odd thing in any case. I only discovered the grouping because I had eliminated the other possible reasons that the paths should not form a union.

Each of the two paths was originally a text object, entered separately from the other. Perhaps in recent versions of Inkscape text is always in a group, even with just one character.

Virtual Shelving

Sunday, 19 June 2022

[This entry was revised and expanded on 2022:07/07.]

I am always uncomfortable with the process of organizing books and articles on shelves or in boxes. I desire to have them grouped by each author and by each subject of interest; these desires cannot be reconciled without having multiple copies of each book and of each article, which multiplicity I cannot afford.

Electronic copies are a different matter. Even without multiple copies, symbolic links, which I discussed in a previous entry, make it possible effectively to list the same file in multiple directories. Hereïn, I'll explain the principle structure that I use for organizing documents, and I'll present some small utilities that facilitate creating and maintaining that structure on POSIX-compliant file systems. This structure is not as fine-grained as might be imagined, but it strikes a balance appropriate to my purposes. (For a more sophisticated system one should employ an application storing and retrieving documents mediated by a cataloguing relational database.)

As with many systems, mine have each a directory named Documents. Its two subdirectories relevant to this discussion are Authors and Subjects.

The entries in Subjects are subdirectories with names such as Economics, Logic and Probability, Mathematics, and Philosophy.

In turn, the entries in each of these are subdirectories with the names of authors.

Finally, in each of these subdirectories are entries for files containing their work corresponding to the superdirectory. For example, Documents/Subjects/Logic and Probability/Johnson William Ernest/ would have entries for works by him on logic or on probability, but his article on indifference curves would be listed instead in Documents/Subjects/Economics/Johnson William Ernest/.

Most of the subdirectories of Authors have names corresponding to the subdirectories in the third level of the Subjects substructure, but all of these subdirectories in Authors are different directories from those in the Subjects substructure.

Each of most of these subdirectories of Authors lists not subdirectories nor files, but symbolic links. These links take their names from the subdirectories of Subjects, but they do not link to those subdirectories. Instead, each links to an author-specific sub-subdirectory. Thus, for example, Documents/Authors/Johnson William Ernest/Logic and Probability is a symbolic link to Documents/Subjects/Logic and Probability/Johnson William Ernest. It is as if the subject-specific collection of an author's works is the author-specific collection of works on that subject, just as it should be.

One could, instead, use the complementary organization, in which the Subjects substructure were ultimately dependent upon the Authors substructure, or use a hybrid organization in which some of the dependency flows one way and some the other. The determinant should be what is most important to preserve if the collection is copied to a file system that does not support symbolic links, as in the case of a SD card with a FAT file system.

I've sketched the principal structure, but want to note useful complications of two sorts.

The first is that symbolic links may be used to place some subjects effectively under others. For example, logic an probability fall within the scope of philosophy. As well as having a directory named Logic and Probability listed in Subjects, I have a symbolic link to it listed in Philosophy. Indeed, when a subject falls within the intersection of other subjects, each may have such a symbolic link, and I have links to Documents/Subjects/Logic and Probability not only in Philosophy but in Mathematics and in Economics.

The second is that symbolic links may be used effectively to list a document with multiple authors in the directory for each author. And essentially the same device may be used to classify a single document under different subjects.

Although this organization is not especially fine-grained, it requires the creation of many directories and symbolic links. I've written seven utilities in Python to reduce the burden. Two of those utilities were presented in a previous 'blog entry because they can be put to more general purpose. Here, I will present five more.

(Again, these utilities are written for POSIX-compliant file systems. Windows is not POSIX-compliant. A full discussion of the relevant issues would be tedious, as would be an effort to rewrite these programs to support Windows.)

[Read more.]

Cataloguing and Restoring Symlinks

Wednesday, 15 June 2022

While one might imagine computer files as stored in something analogous to folders, in reality the directories of file systems are, well, directories. A directory is a file of entries, most of which correspond to names, locations, and other information about other files (some of which may themselves be directories).

But some file systems allow for entries which do not directly provide the location of a file. Instead, these entries — called symbolic links or symlinks — point to other entries. One symbolic link may point to another symbolic link, but it is to be hoped that ultimately an entry is reached that points to a file. A file system will then treat most references to a symbolic link as if they are references to whatever file is indicated by the entry to which the symbolic link ultimately leads. The option of symbolic links allows for different directory entries — possibly with different names and possibly in different directories — effectively to point always to the same file.

I use symbolic links to organize electronic copies of books and articles, so that my directory system categorizes them both by topic and by author, and sometimes by multiple topics or by multiple authors (in the cases of collaborations and of anthologies). But I face the problem that often I want to save these documents using a file system that doesn't support symbolic links.

Not just in this case, but in any case in which I copy to a file system that does not support symbolic links a collection of files in which the directories contain symbolic links, I'd like to be able to restore the entire structure from such a copy.

My solution has been to create a file that catalogues the symbolic links, so that they can be recreated. Of course, I want both the cataloguing and the recreation to be automated. Towards that end, I've written two small programs in Python. These programs will work with any POSIX-compliant operatings system (Linux, MacOS, &c), but Windows is not generally POSIX-compliant.

This program creates a catalogue of symbolic links in the current working directory and in any of its subdirectories, as a set of records with tab-separated variables, and sends it to standard output.

#!/usr/bin/env python
import os

separator = "\t"

def chase_link(link):
    source = os.readlink(link)
    dir_save = os.getcwd()
    os.chdir(link[:link.rindex("/")])
    os.chdir(source[:source.rindex("/")])
    if os.path.islink(source):
        print(source + separator,end="")
        chase_link(source)
    else:
        print(source)
    os.chdir(dir_save)

def search_dir(directory):
    list_dir = [entry for entry in os.scandir(directory)
            if entry.is_dir() or os.path.islink(entry)]
    for entry in list_dir:
        if os.path.islink(entry):
            print(entry.path + separator,end="")
            chase_link(entry.path)
        elif entry.is_dir():
            search_dir(entry)

dir_top = "."

search_dir(dir_top)

And this program reads a catalogue from standard input and recreates symbolic links in the current working directory and subdirectories (recreating subdirectories as necessary).

#!/usr/bin/env python
import os
import os.path
import fileinput

separator = "\t"

def relink(chain):
    dir_start = os.getcwd()
    os.makedirs(chain[0][:chain[0].rindex("/")],0o777,True)
    os.chdir(chain[0][:chain[0].rindex("/")])
    if len(chain) > 2:
        relink(chain[1:])
    link = chain[0][chain[0].rindex("/")+1:]
    if not os.path.exists(link):
        os.symlink(chain[1],link)
    os.chdir(dir_start)

for line in fileinput.input():
    relink(line.rstrip().split(separator))

The reason that you see so much changing of directories in these programs is that they support symbolic links with relative specification. Absolute specification is also supported, but if absolute specification is used for symbolic links then relocating a directory structure is more difficult.

A catalogue created with the first program may have many redundant links. The program could be written to omit these, but that enhancement would come at an expense in programming time and in computing resources that simply doesn't make sense at the scale at which I operate. (Likewise for recoding these programs to work or to fail gracefully with various versions of Windows.) I try not to go crazy with my refinements!

In a later 'blog entry, I'll present some other utilities that I've written more specifically for managing the symbolic links of my files of books and of articles.

Adapting Images to Small Displays

Friday, 15 January 2021

This 'blog has yet to fully accommodate mobile computing. Images in entries have usually had an absolute width of 450 pixels, which made sense when displays were 640 pixels or more wide (and seldom more than 1920 pixels wide), but is now too wide for some devices.

I've been occasionally patching old entries to fix this problem. With IMG and IFRAME elements, the trick is to add

max-width: 100% ; max-height: Rvw ;

to the string-value of the style attribute, where R is the ratio of the height divided by the width, multiplied by 100. For example, if the image is 450 pixels wide and 900 pixels tall, then

R = 100 · (900 / 450) = 200

Just what happens when R is not an integer seems to be browser-dependent.

An example of an IMG element could be

<img src="wp-content/uploads/2020/11/A6_corrected.png" alt="[image of formula]" width="449" height="92" style="display: block ; margin-left: auto ; margin-right: auto ; margin-top: 1em ; margin-bottom: 1em ; border: none ; width: 26.4em ; height: 5.4em ; max-width: 100% ; max-height: 20.5vw ;" />

When BitChute gives code to embed a video, it looks something like this:

<iframe width="640" height="360" scrolling="no" frameborder="0" style="border: none;" src="https://www.bitchute.com/embed/QKOTRHgzsuQE/"></iframe>

It should look something like this:

<iframe width="640" height="360" scrolling="no" frameborder="0" style="border: none ; max-width: 100% ; max-height: 56.25vw ;" src="https://www.bitchute.com/embed/QKOTRHgzsuQE/"></iframe>

Privacy Concerns

Thursday, 14 January 2021

Those of you concerned with privacy may appreciate that no website in any of my domains has ever used Google Analytics. Nor have these websites ever had a reäction button (such as to Like an entry) connected to Facebook or any other such service. (Those reäction buttons allow visitors to be tracked even if the visitors do not click on them.)

On the other hand, the videos embedded in some of my entries use IFRAME elements, and those elements involve sending a request from your browser to the host of the video file, even if a visitor doesn't start the video, so they might be used to track him or her. All these videos were once hosted on YouTube, most but not all have since been moved to BitChute. I may move every video to BitChute, to reduce potential tracking of my visitors.

[Up-Date (2021:01/15): At this point, visitors are simply not tracked by Alphabet while here. All embedded videos are hosted on BitChute. There are links to some videos on YouTube; but, unless a visitor follows these links, Alphabet is unaware of the visit to a page containing the link.]

Stick That in Your Lexicon!

Saturday, 23 May 2020
bru·to·ri·al /bruːˈtɔːriəl/ adjective & noun
A. noun. An otherwise useless tutorial that one is not permitted to forgo.
B. adjective. Of or pertaining to a brutorial.

A New Projectionist

Tuesday, 3 December 2019

I am in the process of relocating video embedded in entries to this 'blog. (Only a few and rather old entries have such content.)

My experiences with YouTube have been unhappy. It routinely messed-up the synchronization of sound with image for my content. Without a ready appeal process, YouTube disabled videos that made fair use of copyrighted content. Although my content has not been affected by the political bias of Alphabet Inc. (the parent company of YouTube), it was grossly unethical for YouTube to get people to cluster at their site by representing itself as an honest broker, and then to bring a bias to bear. And, when YouTube disabled a video for one reason or for another, the embedding code responded inappropriately.

For now, I am moving most or all of my video content to BitChute; I don't know that my content will remain there. But any host that does not apply an ideologic filter will attract a disproportionate share of content from those penalized by the biases of YouTube; the main-stream of the media (who share the ideologic bias of YouTube) will seize upon this disproportion to claim or to insinuate that the host and those who use it are sympathetic with the more repellent of those filtered-out by YouTube. The sophistry will be evident to all but the rather stupid, but a much larger share of people will rôle-play as if the argument were sound.

'Blog Blues

Friday, 12 July 2019

DreamHost, the hosting service that I use, recently broke this 'blog in at least two ways.

First, they deleted one or more files from my installation of Wordfence, which deletion crippled security. Second, they corrupted the database that underlies the 'blog, causing an old entry on usernames to be very imperfectly duplicated, with a date-stamp of 30 June 2019.

I noticed the problems in the wake of an up-dating of the operating system used by DreamHost; I infer that something went wrong in that process.

I contacted DreamHost and then stewed for some days, leaving things as they were to allow the support staff to set things right. They repaired the installation of Wordfence, offering an implausible conjecture about what had gone wrong. They did not repair the database appropriately.

Bitten

Friday, 28 December 2018

This 'blog has been bit hard by a bug in a plugin.

WP-Sweep includes an ostensible ability to purge categories and tags that are not used for any entries. Unfortunately, the programmer made an error such that the categories and tags purged are any not used in generally accessible entries; tags and categories used exclusively in restricted entries are therefore purged.

Still more unfortunately, I did not discover the bug until after I had made various content changes; simply restoring a previous version of the database would undo those changes. I don't remember what they were, and my only records are the database and saved versions thereöf.

I will, over time, try to repair the damage.