Wisdom (things I seldom remember)
Gmail (aka: Google Mail)
Address aliases (dot's and +'s in address)
Useful things to remember/know about Google addresses:
- Any dots are ignored. For instance, these all go to the same mailbox:
aNother@gmail.com A.N.Other@gmail.com a.n.o.t.h.e.r@gmail.com
- Anything including and following a
+
and before the @
is ignored (referred to as an alias by Google).
So these all go to the same mailbox: A.N.Other@gmail.com A.N.Other+bank@gmail.com another+library@gmail.com
Using such an address to register with a website means you can filter mails from the website
(ref: Unlimited Gmail addresses)
and identify spam mails from the website (or a breach thereof).
NB: some websites (incorrectly) do not recognise +
as a valid email address character, so won't let you register using
such an alias.
@gmail.com
and @googlemail.com
(its older antecedent) both go to the same mailboxes
- Like all mail systems, addresses are case-insensitive
NB: these rules apply only to the way Google handles incoming email. They do not apply when you use an email address
as a login name to a website (websites generally treat such names case-insensitively, but will certainly want you to have
the same characters as you used when you registered with them).
But, sadly some websites do not understand the allowed syntax in email addresses
(in particular the use of +
in the Local-part of the address - the bit before the @
)
so you cannot use aliases with such backward sites.
for
Search by size, attachment, etc
size:5m
has:attachment
is:starred
is:unread
has:nouserlabels
Ref: Search operators you can use with Gmail
including basics (which you need in the app, which has no Advanced Search form):
to:string
from:string
subject:string
And combinations and wildcards such as:
in:trash is:unread -from:JCPR*
Also, the google page above doesn't show you that AND, OR and NOT can be used.
eg: to:(Janet.Binney@gmail.com OR Janet.Binney+) OR DeliveredTo: janet.binney@gmail.com AND NOT from:(calendar-notification@google.com)
cf: Refine Web searches - constructs in Google search.
Filter to clear old mail
To clear old mail, you need a filter which (because filters only run on incoming mail) you open and run from time to time
(thanks to Matt Skaggs for this). eg:
- Create a filter with, in it's "Has the Words" field:
older_than:1y, label:sent
- Every time you want to run it, open it, click Continue and then check "Also apply filter to" and click "Update filter"
Filter for different labelling of mails from the same domain
Thanks to Draconian Overlord (DO) for this.
I wanted to handle incoming messages from different addresses in the same domain differently.
This is done by carefully managing the ordering (I just did it by deleting them and re-creating them in the order I wanted,
rather than the more exhaustive way DO describes) of two filters :
- "Move" mails from a specific address to its own label:
To: Paul@somewhere.net
Skip the Inbox
Apply the label: Paul@somewhere.net
- Then label all other mails from that domain:
Includes the words: to:@somewhere.net -label:Paul@somewhere.net
click Continue on the warning dialog saying "... searches containing "label:", ...
are not recommended as they will never match incoming emails"
Apply the label: Somewhere.net
"New mail" downgrade mid-2018
Sadly Google decided to "upgrade" the web-based UI with these consequences:
- It's slower throughout. Particularly annoying is the lower responsiveness when showing hover text
on (often inscrutable) icons and sensitive areas.
- It no longer synchronises Drafts reliably when using multiple browsers.
We frequently use a shared Google Accounts account where one of us, many minutes after another has closed a draft email,
opens it on a different PC (or a different login on the same one).
This now invariably shows an old, out-of-date version of the draft - which never happened before
this updowngrade.
The problem is only with the body of the message. Any updates to the title and
the first words of the body shown in the message list in grey do correctly reflect the "message".
This is a highly worrying and dangerous bug.
- Draft reply and forward mails are now awful to edit. The default is to edit them inline with the original mail
thread but, when you open them, the editing form is not always visible. The only safe/clear way to edit such mails
is to use the "Edit subject" drop down to edit in a popup window, when the message you are editing
is properly presented.
- The down-arrow next to the "Select" checkbox at the top LH of the message list has poor mouse sensitivity
(if nothing is currently selected).
If you move the mouse to the checkbox and then right-wards to be over the down-arrow and then click, the action is to select all.
It should show the drop-down of what to select.
- Fonts are heavier and harder to read - particularly for bold text (eg: unread message titles)
- You can no longer have more than one popup message editor visible at a time. If you have multiples going, selecting one hides any other.
- Also, it no longer remembers when you have been editing a message in a popup window. With the old version if you had been doing so and then closed (saved but not sent) a draft,
when reopened it automatically went into popup window mode.
- The hover-highlight as you move the mouse over a message list removes the date (RH column) in favour of a bunch of action icons.
- The awful text-less icon mantra continues to reduce usability for (at least) non-power users.
eg: the "More" button is now a three-vertical-dots icon.
- The tabs at the top of the Inbox list ("Primary", "Promotions", etc) are much less well delineated
and so less clearly tabs.
- The unread message count is no longer so well highlighted in the message list. It used to be bold and is no longer, being
thereby lost amongst other over-dominant bold text everywhere. It would be a trivial enhancement/solution to bolden it as well
as the label name.
Even more sadly, since Google do not deign to allow bug reporting, they probably won't even fix the bugs above.
Google searching
Filetype, eg: user manual filetype:pdf
(thanks to Chris Hoffman)
Google Authenticator
To clone account settings from one device to another
(or if I've mis-set up GA on device and its codes don't work)
(ref: support.google):
- Open GA on new device (and if re-settting, delete all existing accounts)
- Open working GA, click 3-dot menu and Transfer Accounts | Export accounts
- Next thru to show QR code
- On new device use GA to scan the code
The codes generated will then be the same on both devices.
Google's instructions and UI to add a new Authenticator device (eg: when moving to a new Tablet) are opaque.
The process is simply:
- Install Authenticator on the new device (and uninstall from the old one if required)
- Click the + icon to add a new account and then Scan QR code
- Go to Manage your Google Account (eg: seen when clicking on your person icon at the top RH of a Gmail page)
- Click Security | 2-Step Verification sign in and then, under Authenticator app, click
CHANGE PHONE (sic - despite the wording, this process does not disable/remove the Authenticator from
working on other devices)
- Select the OS (ie: Android) and then NEXT which displays a QR code.
Point the camera at the QR and the app will add the account once you confirm with a code from the newly-added Authenticator
- Repeat steps 2-5 for each account
EE/T-mobile
Text AL
to 150 to get text back with remaining credit/allowances.
Three : phone 444 for balance
Documenting bugs to support-shy suppliers like Google and Amazon
Sadly one penalty of so many of the free Internet-ware one uses is that the supplier
has no bug tracking and reporting system for its users to access (on occasion one wonders whether they even
have one themselves). The best I've been able to find is:
- Google: open the application's website and use Settings | Send Feedback.
Of course you get no feedback on your feedback! Issues I have reported:
- Mar-2019: Problem using the Keep app on a decent sized Android device (such as Google Nexus 10):-
If you select a Label from the menu and then edit one of the displayed notes the background selection is
replaced by the "no label selected" view.
Then when you finish editing you no longer have
the selected view and when you click the menu it shows the originally selected view as being active.
Work-around: select a different view then re-select the one you started with.
- Amazon: all I have found is, for instance,
Amazon forums (this for Kindle).
Issues I have reported:
- Mar-2019:
Cannot remove from last/only Collection using + option on Kindle app
Given the dire management features for Kindle Collections, the + option on the app is a godsend.
It allows you to add and remove a book from Collections much more easily than, for instance, on the "My Content and Devices"
website list.
But you sadly can't use this to remove an item from all collections because when you
have un-ticked all current collections, the OK button is greyed out.
All Amazon't need to do is to leave the OK button active in this case.
See also: my Web Posts Index where I note significant (to me) things
I have submitted to suppliers who do have a proper system.
CSS style sheet
Define in <HEAD>, using one of:
- Reference to file, eg:
<LINK REL=STYLESHEET TYPE="text/css"
HREF="includes/styles.css">
- In-line eg:
<style TYPE="text/css">
BODY, div, span, td, th, table, p, li {font-family:
Verdana, Arial, Helvetica, sans-serif}
BODY, div, span, td, th, table, p, li {font-size: 10pt}
h1 {font-size: 14pt; font-style: bold; color: green}
h2 {font-size: 10pt; color: green}
</style>
Note: in IE can just use asterisk (*) instead of list of elements.
Javascript
Testing for presence of a variable
if (window.variableName != null)
// NB: can't just use if (window.variableName) because that evaluates
to null if the variable exists and contains a blank string
or:
if (typeof(variableName) != "undefined")
Objects
Useful function (in utils.js):
PDF-ery
Convert (scanned) PDF to text
We often get (and make) PDF's created by scanning a textual document.
When viewing in Acrobat Reader you can't copy the text from them.
If the document is not sensitive, there are numerous online services to (OCR) convert
these to various text formats.
I mainly use the excellent Online OCR.
This handles some appalling-looking original scanned documents.
If you sign up it has a 50-page limit before you have to pay for more pages
(or cheat, remove cookies and create a new account with a different email address!).
I tried PDF to Text, but it's nothing like as good.
Annotating PDF
I was very happy with Sejda's PDF Editor.
There is an online option, but I downloaded and used the Desktop version on Windows, which
worked well but does have a massive disk footprint (~¼ Gig download and ~½ Gig installation).
Remove pages from PDF
I used online only ilovepdf's Remove Pages option successfully.
Image resizing websites
Android bug report
Enable Developer Options (press several times on Build number in About tablet | Settings).
Then in Developer Options there's a Take bug report option (and option to add shortcut to the power menu).
Usually the default (Interactive Report).
Drop-down when it's done allows sharing. Usually take Email, cancelling the mail, to leave in Drafts.
Mail has .zip attachment which contains a bugreport...*.txt
Firefox
Restoring Firefox Profile
A Firefox Profile records everything a user views when using the browser - saved passwords, bookmarks, page layout, startup and tab options, etc.
Use this procedure when moving to a new computer, or rebuilding a broken one
(though if doing the latter, clearly step 1 must have been done before the computer broke - eg: as a monthly task):
- To copy the Profile from the source system: make sure Firefox is not running, then:
Using Windows Explorer:
- click into the Address Bar and type:
%appdata%\Mozilla\Firefox
- this displays a folder containing, inter alia, the folder
Profiles
and the (Configuration settings) file profiles.ini
Select both these (Left-click once on one of them and then Ctrl-Left-click on the other
- With the cursor still within the highlight for both, Right-click and click Copy
- Navigate to where you want to copy them to (eg: a folder created on a USB)
- Right-click in the folder and click Paste
This starts the copy which could take a while (the Profile is usually 100's of Mbytes
and this process may copy a couple of irrelevant, but not large, skeleton Profiles).
-
Wait for the copy to finish (Windows Explorer will have a progress indicator somewhere). Then,
if having copied to USB, eject it:
- if the oblong cat icon
isn't showing in the taskbar, click the
up-arrow at its right-hand side to "Show hidden icons"
- click the "Safely Remove Hardware and Eject Media" icon (the oblong cat)
- click the Eject option for the USB which should shortly say "Safe to Remove Hardware"
Using Cygwin (not MKS) TAR:
cd C:\Users\
username
\AppData\Roaming\Mozilla\Firefox\Profiles
cy tar -czf N:/temp/FirefoxProfile.tar gfy6yabj.default
- Identify the name of the profile we are interested in:
On the target system, open the copied profiles.ini
file - eg: right-click | Open with | Notepad on it in its USB folder.
The file contains some tech-y information organised in sections each of which starts with a line
of the form [
someName
]
.
The name we want is in a section like
[Profile1]
(the name could be anything)
containing a line saying Default=1
eg:
[Profile1]
Name=default
IsRelative=1
Path=Profiles/gfy6yabj.default
Default=1
The name is given by the Path=Profiles/ line, and will be ugly and unmemorable.
- Create the Profiles folder on the target system: start Firefox and
type
about:profiles
into the address bar to load the
Profile Manager.
The behaviour of this seems a little unpredictable, but it should show two profiles
(each in table with three blue-led rows with one or more buttons below).
The first's blue "Default profile" should show "yes"
and the second's "no"
(click for example; opens in new tab/window).
Remember the final part of the "Root Directory" of the second one (usually something of the form
9f26cnec.default
), so that you can distinguish it later from the first's
(probably of the form i36zjf5h.default-release
)
Then close Firefox and go to the created Profiles folder.
eg: in Windows Explorer %appdata%\Mozilla\Firefox\Profiles
-
Rename the second (non-Default) Profile folder with a different name.
eg: using the example above just change it to 9f26cnec-ORIGINAL.default
- Copy the copied Profile folder identified in step 2 to
%appdata%\Mozilla\Firefox\Profiles
(gfy6yabj.default
in example above).
ie: the inverse of step 1. Again, the copy may take a while.
- Rename this copied folder to the name of the second folder.
eg: using the example above rename it from gfy6yabj.default
to 9f26cnec.default
- Set the copied/renamed profile as the default:
Open Firefox and its Profile Manager again (about:profiles
in the address bar),
which should look just as it did in step 3.
Now click "Set as default profile" beneath the second entry.
Then exit and restart Firefox (I've found that the Restart options on the page don't always work as expected)
and you should see the behaviour and options from the copied Profile.
NB:
- Keep any copy(s) made in step 1 safely - particularly if you use Firefox to save passwords,
which are part of the Profile, so a villain getting access to the saved Profile
can see and use them.
- This works across different Operating Systems. eg: you can copy a Windows one to a Linux computer,
when local file bookmarks, etc (
file://
URLs) will usually need to be modified.
eg: file:///E:/peterb/website/pages/topage.htm
to: file:///media/D/ntfs-mirror/peterb/website/pages/topage.htm
google.co.uk search bar
Working in London for a German bank, my Google search bar always goes to
google.de. I think this is because of some proxy/firewall rule that redirects
google.com there.
Thanks to David
Kendall's page, I forced google.co.uk by editing \Program
Files\Mozilla Firefox\searchplugins\google.xml
- changing all
occurrences of .com
to .co.uk
Alternatively, install the Google
search plugin in addition to the default one.
"Show my windows and tabs from last time" stopped working
This excellent option stopped working at my work after the company fiddled with
Firefox settings. It was restored by changing privacy options in
about:config.
Setting all these to be false: privacy.clearOnShutdown.history
privacy.clearOnShutdown.cookies privacy.clearOnShutdown.cache
Adding .xpi file extensions
If an extension writer's site simply lists a bunch of files (eg: Jan Odvarko's Firebug
exporters), double-click on (or download and drag onto Firefox) a
.xpi
file.
Amazon - find reviews I have made
For some reason they don't make this easy to find. Their help
gives you the Public Reviews Written by You link to you need.
Netflix - remove from Continue Watching
On website go to Continue Watching list and hover cursor over an entry.
Popdown form appears, where you press X
(thanks to
CNET).
Menu | Your Account | My Profile | Viewing Activity
(thanks to
Martin Brinkmann)
File checksum checker (MD5, SHA1, SHA256, ...)
CertUtil -hashfile file [MD5 | SHA1 | SHA256 | ...]
eg: CertUtil -hashfile ubuntu-20.04.1-desktop-amd64.iso SHA256
Thanks to onthefencedevelopment
ISO image download and burn (to CD or USB)
- Copy the .iso image from source website along with it's checksum (typically SHA256 nowadays, rather than older MD5SUM).
- Run the checksum checker to confirm the download is OK
(eg: one of the Ubuntu ones).
- Run DOWNLOADS\ToolsAndUtilities\burners\rufus-3.3.exe and select the .iso
- Normally, I think, set to GPT / UEFI (non CSM), but for old hardware that doesn't support UEFI, set MBS / BIOS
jQuery - upgrade from 1.4.2 to 1.6.4
After upgrading jQuery from 1.4.2 to 1.6.4 I started getting "Error: 'nodeName'
is null or not an object" in one particular UI action (at least).
The error come from the autocompleteselect handler in jQuery UI's .dialog. It
used to be:
$("#txtPersonSearch").bind("autocompleteselect",
function (event, ui) {
if (ui.item && $(ui.item).val().match(/^[^|]*|[^|]*$/)) {
var data = $(ui.item).val().split("|")
and the error was on the $(ui.item).val()
. Turns out
ui.item is a DOM element, so the fix was to simplify the code to:
if (ui.item &&
ui.item.value.match(/^[^|]*|[^|]*$/)) {
var data = ui.item.value.split("|")
Presumably 1.4.2's .val()
is more forgiving/flexible than 1.6.4's.
DOM location.xxx fields
location.href
(full thing) |
https://my.server.com:1234/page/name?query=123#anchorName |
location.hostname |
https://my.server.com:1234/page/name?query=123#anchorName |
location.pathname |
https://my.server.com:1234/page/name?query=123#anchorName |
location.search |
https://my.server.com:1234/page/name?query=123#anchorName |
location.hash |
https://my.server.com:1234/page/name?query=123#anchorName |
So for "URL within server" (whatever the correct term is for that), just use:
location.pathname+location.search+location.hash
For this page:
Perl syntax
Multi-line comment
Fudge using perldoc syntax:
=comment
text not treated as commands...
=cut
VIM gems
Replace CR (^M)
eg: 1,$s/\r$//
Replace Null (^@)
eg: 1,$s/Ctrl-@//g
# Ctrl-@ is usually Ctrl+Shift+@
Break lines at selected character/string
The trick is to know that \r (not \n) is newline:
1,$s/xxx/&\r/g
Thanks to stackoverflow
Add new line below each line in range
'a,.s/.*\n/\0new line text\r/
Thanks to stackoverflow
Visual Studio (Community)
Setting HTML Designer mode when editing (giving Design/Split/Source options;
thanks to stackoverflow/carpetflyer):
Open .htm file, in file select dialog drop down the Open button to be Open With
and select HTML (Web Forms) Editor and click Set as Default.
Repeat this with an .html file
Also, its Design/Split/Source won't work unless the ASP.NET and Web Development component is installed
(see posts.
Re-pressurising Bosch Worcester Greenstar 25Si/30Si Combi boiler
Ours (103c) has internal filling key and needs to be re-pressurised
regularly. Good Bosch video on youtube and derivative
none-too-accurate instructions on this blog.
Summary:
- Ensure key is pushed well home and is in the open padlock
(anti-clockwise) position (it should already be so).
- Turn key clockwise to locked position (about 30°)
- Turn square white nut anticlockwise to let water flow, and keep open
until pressure risen OK
- Turn square white nut clockwise (hand tight) to close
- Turn key anti-clockwise back to open position
- Put cloth below it to catch water drips and pull key out.
Because of lack of clearance you can't remove the key, so push it all the
way home again, leaving it in the open padlock position.
MS Paint
Replace one colour with another
- Select eyedropper tool (and make sure Colour 1 is current selection)
- Click the color you want to replace
- Re-select eyedropper tool, select Colour 2 and make it the colour you want to change to.
Or, right-click in the image on the colour you want to change to (which sets it as Colour 2).
- Select Eraser tool
- Right-click and drag across the color you want to replace, which causes "Colour 2" to replace "Color 1"
without altering any of the other colours.
Do not use the left mouse button for this step!
Thanks to wikiHow
Arrows
If you are reduced to using MS paint to add arrows to a screenshot there are
some character-symbols in the Windings 3 font. Set something like 48 point
size, and enter a single letter:
h ↑ k ↗ g → m ↘ i ↓ l ↙ f ← j ↖
Thanks to Jessica
Wong and w3schools.
Cygwin / MKS toolkit differences
Things that need to be changed when making a shell script that used to run
under MKS Toolkit to run under Cygwin:
- Unix line-endings. MKS allows DOS line endings, but any such .sh file
must be converted with:
dos2unix filename
- Implicit line concatenation in (at least) CASE matches. In MKS Toolkit
the following is fine:
case ... in
value1 |
value 2) ...
In Cygwin, must have backslash added as: |\
- TAR behaves differently in some circumstances. See utils/cygwin-ery/tar
for more.
- FIND
-name
is case sensitive in Cygwin (unlike MKS). Use
-iname
for case-insensitive.
- TR in back-ticked shell gives warning (but works) if doing translate to
backslash.
eg: DOS=`echo /unix/style/path | tr '/' '\\'`
# works but
says: tr: warning: an unescaped backslash at end of string is not
portable
but: DOS=`echo /unix/style/path | tr '/' '\\\\'`
# works and
is silent
- DU's "show total" flag is -c not -t. It is also massively (unusably for
me) slower than the MKS one.
- "cd /" will go to a CYGWIN default "drive" - unlike MKS which goes to the
root of the current windows drive.
Normal workaround: cd `sh cygwin.sh --get SystemDrive`/
- CP has no "-m" flag. "cp -p ..." is sufficient on both.
- Cygwin cannot access files on a Sharepoint share, whereas MKS can. File
reading or attribute finding commands (eg: test, cat, od, wc, dd) fail
with: Bad address
I had to work round this by calling out to a CMD to, for instance, run COPY
from DOS.
- Cygwin's pattern dir/.* expands to . and .. whereas MKS's doesn't include
them.
- Some Cygwin commands don't like unqualified drive-letter: syntax - eg:
"ls c:" fails, "ls c:/" is OK.
- "du -k" gives higher values in Cygwin. eg: two folders show
in Windows Explorer: 1,945,600 bytes (84 Files, 3 Folders), 177,583,052
bytes (1,268 Files, 151 Folders)
in Cygwin: 1834, 173080
in MKS: 1715, 171120
- Cygwin's shell TRAP is not fired when a script ends with an EXEC. For
instance, the script:
trap "echo In TRAP" 0 1 2 3 15
exec echo Exiting with EXEC
displays both ECHO lines in MKS, but only "Exiting with EXEC" in
Cygwin.
I have the following scripts to help with the transition:
- cy.bat
- cygwin.sh
- cygwin-aids.bat
- cygwin-ery/tar
Bug in MKS toolkit under Windows 10
Using 6.1a under Windows 10 (and, originally, XP) generally works fine, though it's not certified for it!
But bugs I've found and worked-round include:
- shell script pipelines of the form:
command | while read var; ...
fail, losing data in the pipeline. Work-around is to rework them using an
intermediate file. eg:
command
>tempfile
then, if possible:
while read var; do
...
done <tempfile`
or, provided the volume of data isn't too great:
for var in `cat tempfile`; do ...
- vdiff32 (and, probably other utilities) are
affected by a pre-set TMP variable.
I have had intermittent problems - such as vdiff32 failing when called with
two filename with "File Open Failed" - if the environment has a TMP
variable set.
- "temporary file (./sh9999.xxx) error using here
document: The system cannot find the file specified"
These can occur with here-documents in more complex scripts (eg:
it happened to me when a block of code was moved from an in-line section to
a shell function).
Fixed by setting TMPDIR environment variable to a writable folder.
Unix/Linux/Ubuntu commands
touch
Ever unmemorable: touch -t [[CC]YY]MMDDhhmm[.ss] file
find
-mount
ignore mounted directories
-iname
case-insensitive -name flag (-name is case insensitive in MKS)
-printf "%Td-%Tb-%TY %TT %p\n"
formatted listing (dd-Mmm-yyyy timestamp path)
-printf "%M %n %u %g %8s %Td-%Tb-%TY %TH:%TM %p\n"
"ls -l" like
NB: -printf does not work with MKS. So, use, eg: cy -c "find . -mtime -20 -printf '%M %n %u %g %8s %Td-%Tb-%TY %TH:%TM %p\n'"
Show version
lsb_release -a
Scriptlets
Windows batch scripts
Hideous syntax, avoid wherever possible.
Beware that exit code is that of last command executed and that REM counts as command which returns True
(as, to be fair, Unix shell :
command does).
Clearing unused Ubuntu disk (install) space
From 12.04, used Ubuntu Cleaner (ex: Ubuntu Tweak). Go to Janitor | System
From 18.04 noticed large amount of space taken by some "snap" system. So (thanks to
osgx) I did:
Windows
Checking if activated (aka: registered)
See Settings | Update and Security | Activation,
or Control Panel | System Windows Activation section.
Clearing unused Windows space
Mainly Disk Clean Up (as Admin). See also:
Scott Hanselman
Also, SoftwareDistribution folder can get huge and can be safely removed
(ref: TheWindowsCub ), eg: in Admin console
net stop wuauserv
net stop bits
rename c:\windows\SoftwareDistribution SoftwareDistribution-DELETEME-Mmmdd
net start wuauserv
net start bits
Then check a new one has been created OK and remove the renamed one.
Get license ready to transfer to new computer
- Create a login for my Windows Account (retaining local login for normal use).
Then login in with it and check Activation status, which should show the license is auto-linked to the account
(can also check this from Devices at my Windows Account).
Ref: Mauro Huculak
- Hide the Windows Account from login screen (inter alia).
Basically find the account name using
netplwiz
then regedit
to create registry key
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon\SpecialAccounts\UserList
and, in that, a DWORD with the account name. Value 0 to hide the user, 1 to show.
Ref: Mauro Huculak, again
- That should be all that's needed, as
techspot
says:
your Windows 10 license now ties Windows keys to Microsoft accounts,
letting you activate a copy of the operating system simply by logging in with valid online credentials.
So, if you have a newer Windows PC or you already log in using your Microsoft account,
you generally shouldn't have to search for your original Windows 10 key.
But, as explained in the article, I downloaded the .vbs as Microsoft\getWindowsKey.vbs
and ran it (it creates WindowsKeyInfo.txt on Desktop) to get (I hope) the machine-specific Product ID.
Chromebook (Chrome OS) printing
Must power on printer before starting Chromebook (ie: fully shutdown Chromebook and restart it if it was on)
for it to see the printer.
Also, printing seems to take much longer than from Windows.
I assume the Chromebook generates a different and much larger print image.
OK/Cancel order in dialog
The normal order is OK followed by Cancel to the right.
Sorting out dual-boot Windows boot partitions
Probably a one-off, but I had a laptop with Ubuntu and Vista and then added
Windows 8 (W8).
Ubuntu (grub) is the primary boot, and its boot menu offered Vista (on
/dev/sda3).
After adding Windows 8 this menu showed the Windows 8 bootloader on /dev/sda3,
when selecting this one got (usually, sometimes it went straight to W8) options
for Vista and W8.
When running W8 it has C: as its main partition, and D: has the Vista
one.
I wanted to clear all sign of Vista off the machine and needed to sort out
this mess. Googling implied that BCDEDIT would help, but running it with no
arguments failed with:
The boot configuration data store could not be opened.
The system cannot find the file specified.
I found that all the boot stuff was still on the Vista partition, and had to
run: bcdedit /store d:\boot\bcd
to see:
Windows Boot Manager
--------------------
identifier {bootmgr}
device partition=D:
description Windows Boot Manager
locale en-GB
inherit {globalsettings}
integrityservices Enable
default {default}
resumeobject {a356582b-4714-11e2-9bac-adc49a6834ed}
displayorder {a356582c-4714-11e2-9bac-adc49a6834ed}
{default}
toolsdisplayorder {memdiag}
timeout 30
Windows Boot Loader
-------------------
identifier {a356582c-4714-11e2-9bac-adc49a6834ed}
device partition=C:
path \Windows\system32\winload.exe
description Windows 8
locale en-GB
inherit {bootloadersettings}
recoverysequence {a356582d-4714-11e2-9bac-adc49a6834ed}
integrityservices Enable
recoveryenabled Yes
allowedinmemorysettings 0x15000075
osdevice partition=C:
systemroot \Windows
resumeobject {a356582b-4714-11e2-9bac-adc49a6834ed}
nx OptIn
bootmenupolicy Standard
Windows Boot Loader
-------------------
identifier {default}
device partition=D:
path \Windows\system32\winload.exe
description Windows Vista (TM) Business (recovered)
osdevice partition=D:
systemroot \Windows
resumeobject {37d2a585-46d2-11e2-b599-806e6f6e6963}
More Googling (see technet
and tweakhound)
persuaded me to run: bcdboot c:\windows /s c:
After which, BCDEDIT (no args), showed:
Windows Boot Manager
--------------------
identifier {bootmgr}
device partition=C:
description Windows Boot Manager
locale en-us
inherit {globalsettings}
default {default}
resumeobject {67cb9810-9499-11e2-be83-cb77527e6e5d}
displayorder {default}
toolsdisplayorder {memdiag}
timeout 30
Windows Boot Loader
-------------------
identifier {default}
device partition=C:
path \windows\system32\winload.exe
description Windows 8
locale en-us
inherit {bootloadersettings}
allowedinmemorysettings 0x15000075
osdevice partition=C:
systemroot \windows
resumeobject {67cb9810-9499-11e2-be83-cb77527e6e5d}
nx OptIn
bootmenupolicy Standard
detecthal Yes
After this Disk Management offered me Delete Volume on D:/Vista (before that
was greyed out).
But reboot still shows w8 and Vista in windows boot menu. I hid everything
on D: and rebooted which failed, and made me realise that /dev/sda3 was to the
Vista / D: partition, and that /dev/sda2 is W8 / C:. So booted to Ubuntu and
ran update-grub, which changed grub.cfg to /dev/sda2:
195c195
< menuentry "Windows 8 (loader) (on /dev/sda2)" --class windows --class os
{
---
> menuentry "Windows 8 (loader) (on /dev/sda3)" --class windows --class os
{
198,199c198,199
< set root='(hd0,msdos2)'
< search --no-floppy --fs-uuid --set=root 984E19A84E198064
---
> set root='(hd0,msdos3)'
> search --no-floppy --fs-uuid --set=root 168AD47E8AD45C35
And all is now OK!
Windows Task Manager grid intervals
As ever, I cannot find any M$ documentation on this. Empirically (and from
some web posts) the update frequency seems to be every second on Normal speed.
You get 6 samples per grid interval, so 10 grid intervals per minute.
Performance Monitor vs. Task Manager process memory use
The Performance tool's Virtual Bytes is usually massively more than Task
Manager's VM Size.
This is because the latter is actually what the Performance tool calls Private
Bytes, which is, apparently, normally more important in determining memory
leaks.
See: stackoverflow
and msdn.
OpenOffice
Add text below nested list in Writer
Far from intuitive, but select a list's bullets/numbers, position the cursor on one, get the Bullets and Numbering toolbar up.
Then its Insert Unnumbered Entry pushes the (current) text for the selected item down to a number-less entry.
You can then, for instance, go back to the (now empty) item, insert its text and a new item which you can then
nest using Demote One Level.
See also web post on this.
Stop various unwanted (by me) behaviours and set others
- Unwanted capitalisation:
(thanks to acknak).
- Stop hyphens (En) being turned into long-dashes (Em): Tools | AutoCorrect | Replace dashes: OFF
- Stop three dots being turned into ellipsis character: Tools | AutoCorrect Options | Replace : select ... and DELETE
- Stop double-quotes being changed to left- and right- unicode ones:
Tools | AutoCorrect Options | Localised Options | Double quotes
- Stop number suffixes (st, th, etc) being superscripted:
Tools | AutoCorrect Options | Localised Options untick Format ordinal number suffixes
- Stop URLs being changed to links:
Tools | AutoCorrect | URL recognition: OFF
- When typing into cell, suggest matching text from other cells in same column:
Tools | Cell Content | Autoinput: ON (was known as Autocomplete, I think)
Array formula
Enter them using Shift-Ctrl-Enter
Ref: Using_Arrays
Add month to date
eg: =DATE(YEAR(A1);MONTH(A1)+1;20)
(thanks to Villeroy)
Convert date cell to yyyymmdd string
=TEXT(YEAR(A28);"####")&TEXT(MONTH(A28);"00")&TEXT(DAY(A28);"00")
Reverse order of rows
- Insert new colA (for instance) and select all rows in it
- Edit > Fill > Series: Start: 1, Increment: 1; OK
- Data | Sort: select colA and Descending
Thanks to acknak
Setting values for Calc's default formatting
Ctrl-F11 and modify Default Cell Style (thanks to superuser).
Setting page style for one Sheet
- Create the new page style (F11 | select Page Styles | New Style from Selection | right-click edit new style)
- With the required Sheet open (selected), use F11 | Page Styles to select new style.
- Double click on the style, which selects it for the sheet (you can see current page style in bottom line of the Calc window)
Resizing comment boxes in spreadsheets
Right-click cell and Show Comment. Click on it to get resize
handles. When done un-Show comment.
Removing spurious AutoFilters
Somehow I managed to get (BooksAndFilms.ods) into a state where it there
were several unwanted and unremovable AutoFilters. No amount of tooling around
gave me a usable Remove Autofilter option from the Data |
Filter menu.
But, after reading this
forum article (and this
one) I got rid of them by selecting them in turn using the Data |
Select Range menu (which showed 4 ranges with odd names, though not with
the word Autofilter in their names) and then either:
a. Data | Filter | Remove Autofilter (when that magically appeared for one of
them), or
b. Data | Autofilter then Save & Exit and reopen, to find the range and AF had gone!
Finding and updating external links in spreadsheets
To find, search for: file:
finds some links that cause the on-load prompt "This file contains links to other files. Should they be updated?"
To update links from another file (which, despite the "... Should they be updated?" prompt are often not on load, only on subsequent close and reopen!),
use Edit | Links | Update
Delete manual break
Position the cursor in a cell directly below the row break and Edit |
Delete Manual Break | Row Break (thanks to Hagar Delest)
Remainder
MOD function (cf: % in programming languages).
Edit PDF
Install DOWNLOADS\OpenOffice\aoo-pdf-import-0.1.0-windows-x86.oxt
then from OO Draw open a PDF,
and do Export to PDF when done
(thanks to Reference).
NB: As of July-2017 OOO extension manager errors looking for updates to this, saying:
http://aoo-pdf-import.apache-extras.org.codespot.com/git/update/windows_x86-update.xml does not exist
Rotate/Edit PDF
Various tools allow rotation (thanks to LightPDF).
I have used their online rotate tool which worked fine (though a bit slow when downloading the result).
Switching backups from Mozy to Google Drive
In early 2019 Mozy was bought by Carbonite and their free Mozy Home backup service discontinued.
Since we were already Google users and their Backup and Sync
application did more or less the same as Mozy we switched to that.
This isn't as good as Mozy but it is free.
It uses your Google Drive (Drive) - which, as a Google customer/slave, you get automatically.
Unless you already use it actively for, for instance, photos, this gives you 15 Gbytes of free storage (compared to Mozy's 2 GB).
Additional storage is not expensive. We pay about $6/year on one Google account (which has all our photos) for an additional 20 Gbytes.
We noted and/or worked-round the following differences
(using Drive from one Google account and only for backing up one Windows PC):
- You can only select complete folders to backup.
Mozy lets you select a folder and then de-select subordinate files and/or folders.
- Restoring a single file is not nearly as slick.
With Mozy you did so by right-clicking on the file or parent folder and the file
is restored with its correct modification time.
With Google you "restore" from Drive in a web browser where you "Download" the file. This just uses the browser
file download mechanics which means you have to locate the destination folder again. Also the file's modification
time is set to the download time.
You can restore multiple files from Drive in a web browser,
in which case you get a .zip file to download and extract from. The files' modification time is then
restored to the Californian timestamp of the file
(eg: being in London, this means such timestamps are 8 hours earlier than the correct one).
- The default setting is that when you delete a file Backup and Sync prompts to confirm that you also
want to delete the file from Drive.
You will probably want to change this setting.
But, an advantage of leaving it is that it also lets you restore the file (in case you deleted it by mistake).
When doing this the file is restored with its original/correct/local modification time.
- Drive's (web) restore is pretty flaky if you want more than a handful of files.
See Restore from Google Drive below to use their "Takeout" mechanism instead.
- Drive's (web) view shows folder names only.
This is fine if they are all siblings on one PC drive.
But you lose a little context when managing/examining them if they are at different levels in the file-system hierarchy
or on different Windows drives.
- The backup mechanism seems to semi-understand that OpenOffice
lock files (eg:
.~lock.mySpreadsheet.ods#
) are transient.
It backs them up when they are created but deletes them without prompt when they are removed.
- Unlike Mozy, which would run backups a few times a day, this mechanism is constantly monitoring for file changes.
For instance if you are editing a file, Saving it from time to time, each save triggers a new
backed up version on Drive.
This is probably what some folk want. I find it overkill and, presumably, means a higher system load
as Google monitors all files in your backed-up folders all the time.
- Because of this there's a noticable performance hit when the installer/Drive-owner first logs in (and,
despite having "Open Backup and Sync on system start-up" in Settings it only seems to start when that person logs in).
- It seems to hold files open on occasion (thereby causing them to open read-only in a text editor, for instance).
- A folder named
.tmp.drivedownload
is created in each PC folder being backed up.
This seems to have temporary file copies (I think) in it named 9999.driveupload
.
I assume/hope it gets rid of these from time to time.
- I never fully checked out Mozy's storage security but it sounded a little more thorough, if locked-down to a nominated PC, than Google Drive.
But, I'm sure Drive is perfectly secure. Though, of course, if someone knows your Google login they can get what they want.
Restore from Google Drive
For one-off file restore (in this case, from our PC back-up under Janet's janet.binney@gmail.com account):
-
Either: |
Open Drive (drive.google.com/drive) and use the top RH corner icon to
select Janet's account if necessary.
|
Or: |
If already logged into app on Janet's Google account, such as gmail,
just use the chequer-board Google Apps icon (3x3 dots) to select Drive.
|
-
In Drive's LH menu, double-click on Computers | JCPR-DELL-4
(where our auto-backups live)
and then double-click on down to find the file
you want.
-
Right-click on the file and select Download
If you want a previous backup (eg: the latest version on our PC has been corrupted),
select Manage Versions and click on the three vertical dots next to the version you want,
to Download it.
-
Select the folder on the filesystem to download to.
You may also want to alter the name to show this is the restored copy.
The one-off restore is tedious if you want more than a handful of files, so
Google's Takeout is a much better way to restore all your files
(and faster if all you really have on your Drive is backed-up files).
To restore everything (eg: when rebuilding a computer having lost the
original one, or its hard disk at least):
- Open Google's Takeout (takeout.google.com/settings/takeout)
and use the top RH corner icon to select Janet's account if necessary.
- In the "CREATE A NEW EXPORT" section of the resulting page, first "Deselect all"
then select "Drive" and then "Next step" (at the bottom of the page).
-
We use a good unzip program 7zip (www.7-zip.org), and so set the Archive size to 10GB
to get all our files restored in one .zip (about 4GB at time of writing).
- Then "Create archive". Google mails you when the .zip is ready.
- When you get the .zip(s) it is best to extract from it/them to a temporary area (assuming you have disk space).
Then move over file(s) as required, correcting/noting filename oddities as shown in the next section.
File(name) problems with Google Drive restore
Sadly, Drive has a number of (ill documented/publicised) restrictions on how it
restores files. I'm sure there are more, but here are ones that have affected us:
- Filenames are truncated to 50 characters.
eg: folder/123456789012345678901234567890123456789012345678.pdf
is returned as
folder/123456789012345678901234567890123456789012345678.p
- Filenames starting with a dot (.) have the dot changed to an underscore (_).
eg: folder/.DS_Store
becomes folder/_DS_Store
- Various characters in filenames are changed to underscore (_),
including: ampersand (&), percent (%), single quote (')
eg: folder/NS&I'sBrochure.pdf
becomes folder/NS_I_sBrochure.pdf
- Filenames that do not end with a .suffix have one appended if Google can determine
what sort of file it is.
eg: the RTF file suffix-less-file
becomes suffix-less-file.rtf
BEWARE: if, perversely, you have such a file and a sibling one with the correct suffix
you only see one of them in the Takeout .zip (because Google gives them identical names).
- The modification times in the .zip are incorrectly transformed to a California (I assume)
timezone.
Thus, a file restored from the .zip gets a time (on this London PC) 8 hours too early.
This must be a problem with the .zip creation at Google (and, presumably, might change
from Takeout to Takeout depending where each one runs) because the Web view
of the file shows the correct modification time
(ie: they are storing the correct UTC timestamp and re-presenting that correctly in
a browser, and must fail to retain the UTC in the .zip).
- Hard linked files are not restored.
This is very unlikely to affect anyone else, but Drive only stores one instance
of a file with more than one hard link, so you only get one of them back.
To avoid massive activity and Google Drive space requirement, we only use Google to backup (parts of) our Data (E) drive.
Some of the System drive is backed up with an intermittent (backup.sh) manual backup to the NAS box.
But, some key System drive files are backed up using one or both of:
- Archive (under N:\backups\archive\System-drive).
This is best for rarely-changed and relatively easy to recreate files,
such as application default config (eg: Vim\_vimrc).
- JCPRadmin\System-drive-copies - this (Google backed up) Data drive folder
has manual copies of files that may change more frequently. Regular (housekeeping.sh) checks
ensure that the copy in here matches the master.
It won't be worth retaining this mechanism when Peter is not around.
Find Windows version from ISO or USB
Thanks to WinHelpOnline:
find the install.esd file on the media and, in an Administrator command prompt, run
dism /Get-WimInfo /WimFile:F:\sources\install.esd /index:1
Using keypad to search Demand 5 smart TV app
Demand 5's Search box has no virtual keyboard and you have to use the keypad on the remote
to enter the search string.
I can't find any info on this, and thus any sign of backspace or delete options, but the
characters work as on an (old fashioned) mobile.
Sadly the Sony Bravia remote we have
doesn't show the number-to-letters mapping, though other ones do have them: |
|
Page last edited: 12-Sep-2023