←November→
Sun |
Mon |
Tue |
Wed |
Thu |
Fri |
Sat |
|
|
|
|
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
|
|
|
Wed, Nov 14, 2018 10:22 pm
Gateway 920 Fan Information
Information on the fans contained within a Gateway
920 PC. There are three fans in the system: a CPU fan, a case fan, and a fan
attached to the power supply unit (PSU).
CPU Temp.: | 34°C/93°F |
System Temp.: | 28°C/82°F
|
CPU Fan Speed: | 3515 RPM |
System Fan Speed: | 2678 RPM |
CPU Fan
Manufacturer: AVC
Model: C6025B12L
Power Connection: 3-Pin
Fan Size: 60mm
DC 12V
0.12A
Ball Bearing
Case Fan
Manufacturer: Antec
Fan Size: 80mm
Power Supply with Fan
Power Supply Manufacturer: Newton Power Limited
Power Supply Model: NPS-250HB A
Output: 250W Max.
Fan Size: 90mm
[ More Info ]
[/hardware/fans]
permanent link
Mon, Nov 12, 2018 6:13 pm
Adding Google Drive to Nautilus File Manager
Google, unfortunately, does not provide a software package for Linux for Google
Drive support. However, one can still get support for Google Drive through
third-party software or one can use support provided with
GNOME
Files, aka Nautilus, which is the default
file
manager for the
GNOME desktop software under
CentOS 7
Linux. To be able to access files and transfer files to and from Google Drive
storage under CentOS 7 Linux, take the following steps:
-
Click on Applications at the top, left-hand corner of the screen and
select System Tools.
-
Then select Settings.
-
Select Online Accounts from Settings.
-
In the online accounts list, click on Google.
-
You will then be presented with a Google Account sign in window where you
can provide your Google credentials, e.g., an email address or phone number.
-
After you hit enter and log in, you will then be asked to accede to allowing
GNOME to access your Google account, which will allow GNOME the following
access:
If you then click on Applications and Files, you
should see your Google account listed at the left side of the window.
You can then copy files to and from your Google Drive folders to the local
host or access files already stored in Google Drive.
[ More Info ]
[/network/web/services/google/drive]
permanent link
Sat, Oct 06, 2018 10:35 pm
Deleting Windows backups after specified media type is invalid message
When I checked on the status of the weekly backup process on a Microsoft
Windows 10
system by issuing a wbadmin get versions
command at
a command prompt, I saw that no
backups had been created since July of 2018.
Microsoft Windows [Version 10.0.17134.285]
(c) 2018 Microsoft Corporation. All rights reserved.
C:\WINDOWS\system32>wbadmin get versions
wbadmin 1.0 - Backup command-line tool
(C) Copyright 2013 Microsoft Corporation. All rights reserved.
Backup time: 7/17/2016 7:00 PM
Backup target: 1394/USB Disk labeled My Passport(K:)
Version identifier: 07/17/2016-23:00
Can recover: Volume(s), File(s), Application(s), Bare Metal Recovery, System State
Snapshot ID: {76dc6b17-ef40-418f-b13a-a332f3f18c66}
Backup time: 7/24/2016 7:00 PM
Backup target: 1394/USB Disk labeled My Passport(K:)
Version identifier: 07/24/2016-23:00
Can recover: Volume(s), File(s), Application(s), Bare Metal Recovery, System State
Snapshot ID: {f394de8f-b3e2-4cc0-a2ee-ffb12448f1c6}
Backup time: 7/31/2016 7:00 PM
Backup target: 1394/USB Disk labeled My Passport(K:)
Version identifier: 07/31/2016-23:00
Can recover: Volume(s), File(s), Application(s), Bare Metal Recovery, System State
Snapshot ID: {275475f1-22d9-455d-893b-f327b8069f99}
Backup time: 8/7/2016 7:00 PM
Backup target: 1394/USB Disk labeled My Passport(K:)
Version identifier: 08/07/2016-23:00
Can recover: Volume(s), File(s), Application(s), Bare Metal Recovery, System State
Snapshot ID: {58902ac7-c0aa-4384-9abf-b96e89fe1954}
Backup time: 8/14/2016 7:00 PM
Backup target: 1394/USB Disk labeled My Passport(K:)
Version identifier: 08/14/2016-23:00
Can recover: Volume(s), File(s), Application(s), Bare Metal Recovery, System State
Snapshot ID: {7600fdeb-9722-4f0d-9647-6a5a22613a40}
Backup time: 8/21/2016 7:00 PM
Backup target: 1394/USB Disk labeled My Passport(K:)
Version identifier: 08/21/2016-23:00
Can recover: Volume(s), File(s), Application(s), Bare Metal Recovery, System State
Snapshot ID: {05e8eefe-486f-4286-bf7a-57ca7ba192e6}
Backup time: 8/28/2016 7:00 PM
Backup target: 1394/USB Disk labeled My Passport(K:)
Version identifier: 08/28/2016-23:00
Can recover: Volume(s), File(s), Application(s), Bare Metal Recovery, System State
Snapshot ID: {cc0c16df-4eb2-43ca-bb40-4d02928e7617}
Backup time: 9/4/2016 7:00 PM
Backup target: 1394/USB Disk labeled My Passport(K:)
Version identifier: 09/04/2016-23:00
Can recover: Volume(s), File(s), Application(s), Bare Metal Recovery, System State
Snapshot ID: {98c0f7a3-ca59-4c78-b4c3-5ff716a60bf2}
Backup time: 9/11/2016 7:00 PM
Backup target: 1394/USB Disk labeled My Passport(K:)
Version identifier: 09/11/2016-23:00
Can recover: Volume(s), File(s), Application(s), Bare Metal Recovery, System State
Snapshot ID: {b066d090-fd1f-44e2-9899-b5defe860e65}
Backup time: 9/18/2016 7:00 PM
Backup target: 1394/USB Disk labeled My Passport(K:)
Version identifier: 09/18/2016-23:00
Can recover: Volume(s), File(s), Application(s), Bare Metal Recovery, System State
Snapshot ID: {88b6a6aa-dce0-439b-96b8-98e1038411cd}
Backup time: 5/27/2018 7:00 PM
Backup target: 1394/USB Disk labeled Seagate Backup Plus Drive(K:)
Version identifier: 05/27/2018-23:00
Can recover: Volume(s), File(s), Application(s), Bare Metal Recovery, System State
Snapshot ID: {e7999e64-18ef-4ffe-826f-63460ae10a95}
Backup time: 6/3/2018 7:00 PM
Backup target: 1394/USB Disk labeled Seagate Backup Plus Drive(K:)
Version identifier: 06/03/2018-23:00
Can recover: Volume(s), File(s), Application(s), Bare Metal Recovery, System State
Snapshot ID: {ed35b3bb-5409-4351-82b3-42829908d5b2}
Backup time: 6/10/2018 7:00 PM
Backup target: 1394/USB Disk labeled Seagate Backup Plus Drive(K:)
Version identifier: 06/10/2018-23:00
Can recover: Volume(s), File(s), Application(s), Bare Metal Recovery, System State
Snapshot ID: {8dd10f96-c62e-42e9-9d68-0947f529db52}
Backup time: 6/17/2018 7:00 PM
Backup target: 1394/USB Disk labeled Seagate Backup Plus Drive(K:)
Version identifier: 06/17/2018-23:00
Can recover: Volume(s), File(s), Application(s), Bare Metal Recovery, System State
Snapshot ID: {0ebd7188-35b3-4317-bb20-b718dfd35789}
Backup time: 6/24/2018 7:00 PM
Backup target: 1394/USB Disk labeled Seagate Backup Plus Drive(K:)
Version identifier: 06/24/2018-23:00
Can recover: Volume(s), File(s), Application(s), Bare Metal Recovery, System State
Snapshot ID: {93803f25-207b-410d-891f-d1e8244236aa}
Backup time: 7/1/2018 7:00 PM
Backup target: 1394/USB Disk labeled Seagate Backup Plus Drive(K:)
Version identifier: 07/01/2018-23:00
Can recover: Volume(s), File(s), Application(s), Bare Metal Recovery, System State
Snapshot ID: {76022746-9b00-4380-a08b-d9a9b5bdd2d8}
Backup time: 7/8/2018 7:00 PM
Backup target: 1394/USB Disk labeled Seagate Backup Plus Drive(K:)
Version identifier: 07/08/2018-23:00
Can recover: Volume(s), File(s), Application(s), Bare Metal Recovery, System State
Snapshot ID: {030fb852-6e15-4ad3-8acb-e0b0d0057e87}
C:\WINDOWS\system32>
When I checked the free space left on the drive on which the backups
were stored from the Windows
File
Explorer, I saw there was only a few megabytes of free disk space left,
so I attempted to delete some of the prior backups with the wbadmin command,
but I was unable to delete them with the message "failed with error: The
specified media type is invalid" message appearing.
[ More Info ]
[/os/windows/win10]
permanent link
Fri, Oct 05, 2018 9:39 pm
Checking port 465 connectivity
I needed to check on whether a system was functioning as a mail server listening
on the Simple Mail
Transfer Protocol Secure (SMTPS) port, TCP port 465. One way to check is
to attempt to establish a telnet connection to that port. E.g.:
$ telnet 192.168.248.91 465
Trying 192.168.248.91...
Connected to esa.example.com
Escape character is '^]'.
^C
^CConnection closed by foreign host.
$
If you see a "connected to" message that indicates the system is listening
on that port and you can terminate the connection by hitting Ctrl-C
a couple of times. But you can also use an
OpenSSL
command as shown below to test SMTPS connectivity on TCP port 465:
$ openssl s_client -connect 192.168.248.91:465 -quiet
depth=0 /OU=Zimbra Collaboration Server/CN=esa.example.com
verify error:num=20:unable to get local issuer certificate
verify return:1
depth=0 /OU=Zimbra Collaboration Server/CN=esa.example.com
verify error:num=27:certificate not trusted
verify return:1
depth=0 /OU=Zimbra Collaboration Server/CN=esa.example.com
verify error:num=21:unable to verify the first certificate
verify return:1
220 esa.example.com ESMTP Postfix
quit
221 2.0.0 Bye
$
If you leave the -quiet
off the end of the command, you can
see additional information about the certificate on the email server.
Related articles:
-
Using the openssl command to troubleshoot POP3S
[/network/email]
permanent link
Thu, Oct 04, 2018 9:47 pm
Extracting images from an Excel spreadsheet
I needed to extract two diagrams from a worksheet in a
Microsoft Excel workbook. The diagrams appeared to have been put in the
worksheet as an image through a copy and paste operation. I could right-click
on an image in the sheet and choose "Copy" or "Save as Picture" and for the
latter option I could choose PNG, JPEG, PDF, GIF, or BMP for the "Save as Type"
value, but I wondered what type of file Excel was using for the embedded image.
The file was a .xlsm file, which like a .xlsx file is an
Office
Open XML (OpenXML) file format that can be "unzipped" to reveal the
constituent files within it by renaming the file to have a .zip
filename extension or copying the file to a new file with a .zip extension
- see Zipping and unzipping
Excel xlsx files. So I copied the file giving the new file a .zip extension
and then extracted the contents of that file by unzipping it. I then had a
file named "[Content_Types].xml" and the following directories in the directory
where I had extracted files from the zip file:
_rels
customXml
docProps
xl
[ More Info ]
[/os/windows/office/excel]
permanent link
Sun, Sep 23, 2018 1:54 pm
Obtaining information for online citations of an article with Altmetric
Altmetric, a company
founded by Euan Adie in 2011, provides a website where one can look up
information on references to journal articles published online from other
online sources, such as references to an article from
Wikipedia articles,
tweets,
blogs,
Facebook,
etc., which will provide you with information
on how widely cited the online research may be. To easily access
the information, you need to install the Altmetric
bookmarklet.
[ More Info ]
[/network/web/browser/firefox]
permanent link
Sat, Aug 18, 2018 10:16 pm
Determine Python installed modules/packages
If you need to determine the
packages/modules/
libraries installed for
Python on a system, you can do so by obtaining a Python
command prompt and issuing the help("modules")
command.
$ python
Python 2.7.10 (default, Oct 23 2015, 19:19:21)
[GCC 4.2.1 Compatible Apple LLVM 7.0.0 (clang-700.0.59.5)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> help("modules")
Please wait a moment while I gather a list of all available modules...
2018-08-18 15:31:45.666 Python[74959:5231860] Cannot find executable for CFBundle 0x
7fe335602be0 </System/Library/Frameworks/Message.framework> (not loaded)
AVFoundation _TE dircache profile
Accounts _Win dis pstats
AddressBook __builtin__ distutils pty
AppKit __future__ dl pwd
AppleScriptKit _abcoll doctest py2app
AppleScriptObjC _ast dumbdbm py_compile
Audio_mac _bisect dummy_thread pyclbr
Automator _builtinSuites dummy_threading pydoc
BaseHTTPServer _codecs easy_install pydoc_data
Bastion _codecs_cn email pyexpat
CFNetwork _codecs_hk encodings pylab
CFOpenDirectory _codecs_iso2022 ensurepip pyparsing
CGIHTTPServer _codecs_jp errno pytz
Canvas _codecs_kr exceptions quopri
Carbon _codecs_tw fcntl random
Cocoa _collections filecmp re
CodeWarrior _csv fileinput readline
Collaboration _ctypes findertools repr
ColorPicker _ctypes_test fnmatch resource
ConfigParser _curses formatter rexec
Cookie _curses_panel fpformat rfc822
CoreData _elementtree fractions rlcompleter
CoreFoundation _functools ftplib robotparser
CoreGraphics _hashlib functools runpy
CoreLocation _heapq future_builtins sched
CoreText _hotshot gc scipy
Dialog _io genericpath select
DictionaryServices _json gensuitemodule sets
DocXMLRPCServer _locale gestalt setuptools
EasyDialogs _lsprof getopt sgmllib
EventKit _markerlib getpass sha
ExceptionHandling _multibytecodec gettext shelve
Explorer _multiprocessing glob shlex
FSEvents _osx_support grp shutil
FileDialog _pyio gzip signal
Finder _random hashlib site
FixTk _scproxy heapq six
Foundation _socket hmac smtpd
FrameWork _sqlite3 hotshot smtplib
HTMLParser _sre htmlentitydefs sndhdr
IN _ssl htmllib socket
InputMethodKit _strptime httplib sqlite3
InstallerPlugins _struct ic sre
InstantMessage _symtable icglue sre_compile
JavaScriptCore _sysconfigdata icopen sre_constants
LatentSemanticMapping _testcapi idlelib sre_parse
LaunchServices _threading_local ihooks ssl
MacOS _tkinter imageop stat
Message _warnings imaplib statvfs
MimeWriter _weakref imghdr string
MiniAEFrame _weakrefset imp stringold
Nav abc importlib stringprep
Netscape aepack imputil strop
OSATerminology aetools inspect struct
OpenDirectory aetypes io subprocess
OpenSSL aifc itertools sunau
PixMapWrapper altgraph json sunaudio
PreferencePanes antigravity keyword symbol
PubSub anydbm lib2to3 symtable
PyObjCTools applesingle linecache sys
PyPDF2 appletrawmain locale sysconfig
QTKit appletrunner logging syslog
Quartz argparse macerrors tabnanny
Queue argvemulator macholib tarfile
ScreenSaver array macostools telnetlib
ScriptingBridge ast macpath tempfile
ScrolledText asynchat macresource terminalcommand
SearchKit asyncore macurl2path termios
ServiceManagement atexit mailbox test
SimpleDialog audiodev mailcap textwrap
SimpleHTTPServer audioop markupbase this
SimpleXMLRPCServer autoGIL marshal thread
Social base64 math threading
SocketServer bdb matplotlib time
StdSuites bdist_mpkg md5 timeit
StringIO bgenlocations mhlib tkColorChooser
SyncServices binascii mimetools tkCommonDialog
SystemConfiguration binhex mimetypes tkFileDialog
SystemEvents bisect mimify tkFont
Tix bonjour mmap tkMessageBox
Tkconstants bsddb modulefinder tkSimpleDialog
Tkdnd bsddb185 modulegraph toaiff
Tkinter buildtools multifile token
UserDict bundlebuilder multiprocessing tokenize
UserList bz2 mutex trace
UserString cPickle netrc traceback
WebKit cProfile new ttk
_AE cStringIO nis tty
_AH calendar nntplib turtle
_App cfmfile ntpath types
_CF cgi nturl2path unicodedata
_CG cgitb numbers unittest
_CarbonEvt chunk numpy urllib
_Cm cmath objc urllib2
_Ctl cmd olefile urlparse
_Dlg code opcode user
_Drag codecs operator uu
_Evt codeop optparse uuid
_File collections os videoreader
_Fm colorsys os2emxpath warnings
_Folder commands parser wave
_Help compileall pdb weakref
_IBCarbon compiler pickle webbrowser
_Icn contextlib pickletools whichdb
_LWPCookieJar cookielib pimp wsgiref
_Launch copy pip xattr
_List copy_reg pipes xdrlib
_Menu crypt pkg_resources xlrd
_Mlte csv pkgutil xml
_MozillaCookieJar ctypes platform xmllib
_OSA curses plistlib xmlrpclib
_Qd datetime popen2 xxsubtype
_Qdoffs dateutil poplib zipfile
_Qt dbhash posix zipimport
_Res dbm posixfile zlib
_Scrap decimal posixpath zope
_Snd difflib pprint
Enter any module name to get more help. Or, type "modules spam" to search
for modules whose descriptions contain the word "spam".
>>> exit()
$
[ More Info ]
[/languages/python]
permanent link
Sun, Jul 29, 2018 8:26 pm
Recovering a file on a Windows system from a shadow copy
After editing a
spreadsheet in
Microsoft Excel on a
Microsoft Windows Server 2012 system, I intended to save the modified
version under a new file name, but inadvertently chose "Save" rather than
"Save As." Fortunately, Windows systems running the Volume Snapshot Service,
aka
Shadow
Copy, provide an easy mechanism to recover lost data by reverting to a prior
"shadow copy" version of a file. To revert to the prior version, you can
take the following steps:
-
In the
Windows File Explorer, click on the file to select it, then choose
"Properties" from the ribbon of options at the top of the File Explorer
window or right-click on the file and choose "Properties." Or, you can click
on the file to select it and then hit the Alt and Enter
keys simultaneously to bring up the Properties window for that file.
-
Then click on the Previous Versions tab.
-
Click on the prior version of the file to select it and then click on the
Restore button at the bottom of the window.
-
You will see a window asking "Are you sure you want to restore the previous
version of" followed by the file name and the
timestamp
on the prior version of the file. The window also warns you that "This will
replace the current version of this file on your computer and cannot be
undone." Click on the Restore button on that window.
-
You should then see a window stating "The file has been successfully restored
to the previous version." Click on the OK button to close that window.
If you click on the General tab at this point, the Modified date
will still reflect the timestamp before you restored the file, but if you
close the Properties window and reopen it, you should then see
the Modified date and time reflect the timestamp of the prior version that
was restored to the system.
[ More Info ]
[/os/windows/filesystem]
permanent link
Sat, Jul 28, 2018 10:45 pm
Viewing and Editing Defined Names in Excel 2013
To view or edit the
defined names in the
Microsoft Excel 2013 spreadsheet program, you can take the following steps:
-
Click on the Forumulas tab at the top of the
Excel
window.
-
From the Formulas menu, select Name Manager.
In the Name Manager window, you can see the defined names.
[ More Info ]
[/os/windows/office/excel]
permanent link
Fri, Jul 27, 2018 11:07 pm
Determining if the system is connected to a VPN from the command line under OS X
I connect to a work
Virtual Private Network (VPN) from home using a
MacBook Pro
laptop running
OS X El
Capitan (10.11.6) and was curious if there was a way that I could determine
whether the system was connected to the VPN or disconnected from a VPN using a
command-line
interface (CLI), i.e., a
Terminal window, other than by checking the IP address that
external systems see for the system, e.g., by visiting
WhatIsMyIP.com. At
How can I tell if OS X is connected to a VPN network from the command line?,
I found someone suggesting using the
scutil command
scutil --nc list
and
piping
the output to the grep command looking for the word "Connected", i.e.,
scutil --nc list | grep Connected
. However, that didn't work
when I attempted to discern whether the laptop was connected to the VPN via
that method, since the scutil command always produced the following output
whether or not the system was connected to the VPN:
$ scutil --nc list
Available network connection services in the current set (*=enabled):
$
However, I was able to determine if the system was connected to the VPN by
using the method listed in the post by the person who posed the question. I.e.,
I could use the
ifconfig command and count the number of occurences of "utun0," since
the count was zero if the system was not connected to the VPN and one if it
was connected to the VPN. E.g., if the system was not connected to the VPN,
I would see the following output.
$ ifconfig | grep utun0
$ ifconfig | grep -c utun0
0
$
When the system was connected to the VPN, I would see the following output:
$ ifconfig | grep utun0
utun0: flags=8051<UP,POINTOPOINT,RUNNING,MULTICAST> mtu 1400
$ ifconfig | grep -c utun0
1
$
[ More Info ]
[/os/os-x]
permanent link
Fri, Jun 22, 2018 10:51 pm
Regular expression to find words/strings not ending with a character
If you wish to find
strings at the end of a line that don't end with a
particular character, you can use a
bracket expresion with a
caret
character after the
left square bracket in a
regular expression.
Metacharacter |
Description |
[^ ] |
Matches a single character that is not contained
within the brackets. For example, [^abc] matches any character other
than "a", "b", or "c". [^a-z] matches any single character that is
not a lowercase letter from "a" to "z". Likewise, literal characters
and ranges can be mixed. |
[ More Info ]
[/os/unix/commands]
permanent link
Sun, Jun 17, 2018 10:14 pm
Firefox reporting "Your connection is not secure" for sites
I upgraded
Firefox on a
Linux system running CentOS 7 to version 52.8.0-1 with yum upgrade
firefox
. When I opened Firefox afterwards and put google.com in the
address bar, I saw the message below:
Your connection is not secure
The website tried to negotiate an inadequate level of security.
uses security technology that is outdated and vulnerable to attack. An
attacker could easily reveal information which you thought to be safe. The
website administrator will need to fix the server first before you can
visit the site.
Error code: NS_ERROR_NET_INADEQUATE_SECURITY
When I went to another site, wikipedia.org, using
HTTPS, I saw
the same message. I checked to ensure that the web browser wasn't configured to
use a proxy by clicking on the icon with the three horizontal bars at the top,
right-hand side of the browser window and selecting Preferences, then
Advanced, then Network, then Settings. The setting
was "No proxy." I then right-clicked on the "Your connection is not secure"
page and chose View Page Info. When I clicked on the Security
tab, I saw the "Owner" value listed as "This website does not supply
ownership information." In the Technical Details section, I saw "Connection
Not Encrypted" and "The website www.google.com does not support encryption
for the page you are viewing," even though the URL listed was
https://www.google.com/?gws_rd=ssl
.
[ More Info ]
[/network/web/browser/firefox]
permanent link
Sat, Jun 16, 2018 2:59 pm
Scam call from 1-800-222-2222
I received a call to my cellphone at noon Eastern time in the U.S. on Saturday
June 16, 2018 with the calling number showing as (800) 222-2222.
When I answered the call I heard a message stating the call was an
automated call that would provide a chance to earn a $50 credit on
your next bill. I was then prompted to hit "1" to continue. I did
and heard the messaage "Please enter your Verizon billing password"
at which point I ended the call. After I ended the call, I called
the number back and heard the message "Welcome to America's hottest
talk line. Guys, ladies are waiting to talk to you." I have Verizon
as my provider for cellphone service. If a Verizon user goes to the
Verizon Wireless
webste, he or she can log into his or her account by providing
either a mobile number or User ID with the password for his or her
account. So anyone falling for the fraudulent call will, by providing
the password, since the scammer will know the called number, provide
the credentials the fraduster will need to use the person's Verizon
account. When I looked up the number online, I found others reporting
fraudulent activity from the calling number. E.g.,
800-222-2222 |
Suspected Scam Call | Whitepages. At that page, someone posted
on June 14, 2018 3:10:48 PM that he or she received a "Verizon
Wireless scam" call from that number. I logged into my account from
a computer and opened a chat session with a Verizon representative to
report the fraudster. She told me she was going to report it.
I also submitted the number at the Federal Communications Commission (FCC)
Stop Unwanted Calls and Texts webpage through the "file a complaint
with the FCC" link on that page.
[/security/scams]
permanent link
Wed, Jun 13, 2018 11:21 pm
Screen goes black with only mouse pointer visible on MacBook Pro laptop
I've been experiencing an intermittent issue on my
MacBook
Pro laptop, which is running
OS X El Capitan, where I find a black screen with only the mouse pointer
visible after I return to it from being away from it for some time. I can move the pointer by moving my finger about on the touchpad, but I get no visible
response to hitting any keys. I've tried hitting lots of different
key combinations to try to get the desktop to reappear or at least get
a login prompt, but none have worked. If I had music playing through
the headphones from
iTunes , I can hear it still playing if I put the
headphones back on, but when I hit any key or keys I simply hear a "bonk"
sound and see no response from the system. Initially, when I encountered
the problem the only way I could gain access to the system again was to
reboot, which might lead to a loss of unsaved work. I have found, though,
that if I simply close the lid of the laptop as I might if I wanted to put
it to sleep, wait about a minute, then reopen the lid and hit a key that most
of the times I've tried that, instead of rebooting, when the problem has
occurred, that I could get a login prompt allowing me to log back into the
system with everything apparently running as it was before I encountered
the problem.
[/os/os-x]
permanent link
Mon, Jun 11, 2018 10:43 pm
Finding text within lines in a file with PHP
For a weekly status report, I need to determine the number of work requests
that are approved and awaiting implementation. The list of requests in that
state is contained in a webpage that contains other information, including
requests that are in various other states, such as those awaiting approval.
I normally download the webpage containing the information to run
scripts against it to extract other information from the page, so I decided
to create a PHP
script that would display just the list of requests awaiting implementation and
produce a count of those requests in that state. On the source webpage the
line on the page that marks the start of the section of the page containing
the requests that are approved and awaiting implementation contains the text
"Requests Waiting Implementation". The
HTML code on
the page that marks the end of that section contains and ending
div
tag. So I created the two PHP variables below to hold the two
strings I
need to search for within the file.
$startString = "Requests Waiting Implementation";
$endString = "</div>";
[ More Info ]
[/languages/php]
permanent link
Sat, Jun 09, 2018 10:40 pm
Blinking caps lock LED on HP envy 6t-1100
A coworker replaced the keyboard on an HP envy 6t-1100 laptop because some
keys on the keyboard were no longer working. When he powered on the laptop
after replacing the keyboard, the laptop would no longer boot. Instead of
booting, the CAPS LOCK LED would blink three times slowly followed by a pause
and then the sequence would repeat. The F5 key LED was also lit along with the
WiFi LED, which was red. I found some posters on HP's website associating that
behavior with issues with a memory module. E.g.,
Blinking caps lock 3 times, screen black, f12 wifi light on Hp Pavilion
dv7-6c64nr entertainment pc and
Caps Lock and Num Lock blinking 3 times / Memory module issue.
He was able to resolve that problem and get the latpop to boot again by
blowing out the sockets with compressed air and cleaning the contacts on the
memory modules with rubbing alcohol.
[/pc/hardware/hp]
permanent link
Wed, Jun 06, 2018 11:13 pm
UDP traffic with source and destination ports of 54915
While troubleshooting a network problem on my
MacBook Pro
laptop, I noticed, while examining a
packet
capture file in Wireshark, that a system was
sending a lot of
User Datagram Protocol (UDP) traffic to the xxx.xxx.xxx.255 subnet
broadcast address, i.e. to all systems on the
subnet,
using port 54915 as both the source and destination
ports. The below screenshot shows what I saw when I applied
a Wireshark filter
of udp.port == 54915
.
[ More Info ]
[/network/udp]
permanent link
Fri, Jun 01, 2018 10:11 pm
Modifying the "from" domain of a message with sendmail
A user sends a monthly email newsletter to a distribution list on an email
server I maintain that uses sendmail. He sends the message to an
email alias
on the system where sendmail converts the alias to all of the email
addresses in the mailing list and the sends it out through a
smart host to be
delivered to all of the recipients of the newsletter. The sender sends the
message from his verizon.net address and I needed to convert the "from"
address from a verizon.net email address to a local email address on the
server running sendmail. To do so, I placed the following lines at the
end of /etc/mail/sendmail.mc
. For the example below, I use the
example.com domain as the local domain name for the server.
MASQUERADE_DOMAIN(`verizon.net')dnl
MASQUERADE_AS(`example.com')dnl
Note: the "dnl" at the end of each line has the letter "l", not the
number "1" at the end of the line. And a
backtick, i.e., `
, is used before
"verizon.net" while a single quote is used after it.
[ More Info ]
[/network/email/sendmail]
permanent link
Sun, May 27, 2018 9:13 pm
Centering divs with flex-container
With
HTML 4, centering the contents within a
div is simple. You
just use <div align="center">
. E.g., if I wanted to
center the image and text below on a webpage, I could use the following
code:
<div align="center">
<img src="186px-Antinous_Mandragone_profil.jpg" alt="Antinous Mangragone
profile"><br>
<a href="https://commons.wikimedia.org/wiki/File:Antinous_Mandragone_profil.jpg">
Antinous Mandragone</a>
</div>
The image would then be displayed in browsers as seen below:
[ More Info ]
[/network/web/html/css]
permanent link
Thu, May 24, 2018 11:10 pm
Using sox to record audio on OS X
I wanted to record a talk this week so I took my
MacBook Pro
laptop with me to the auditorium where the talk was being held. I
normally
use the QuickTime
Player to record audio in such cases. But this time when I attempted
to use the QuickTime Player, it wouldn't actually start recording.
The presenters had started talking when I attempted to begin recording
their presentation, so I opted to install
Sound eXchange
(SoX), which provides a
command-line interface (CLI) for recording and
editing audio on a variety of
operating systems, including
Microsoft Windows,
Linux, and
OS X. Since I had previously
installed Homebrew on OS X on the system, I
opened a
Terminal window and used it to install SoX.
[ More Info ]
[/os/os-x/audio]
permanent link
Wed, May 23, 2018 10:53 pm
Dovecot restart
A user reported that she was unable to check her email today; she had also
reported the problem yesterday. When I checked
Sendmail,
which would handle her outgoing email, by using
Telnet to
connect to the well-known port for
Simple Mail Transfer Protocol (SMTP) on the server with
telnet mail.example.com 25
, I saw the Sendmail banner as expected,
so I presumed her problem was likely with
Dovecot, the software on the system that would allow her to receive her
incoming email. I tried connecting to port 110, the well-known port
for Post Office Protocol version 3 (POP3) connections using
Telnet. When I saw the "Connected to" and "Escape character is" messages, I
entered the POP3 user
command followed by the user's name,
but I would shortly thereafter see a "Connection closed" message every
time I tried the connection with Telnet. I never saw the "Dovecot ready" prompt
appear.
# telnet 127.0.0.1 110
Trying 127.0.0.1...
Connected to 127.0.0.1.
Escape character is '^]'.
user nell
Connection closed by foreign host.
You have new mail in /var/spool/mail/root
#
[ More Info ]
[/network/email/dovecot]
permanent link
Fri, May 18, 2018 10:56 pm
Installing new packages for WinPython
To install a new package/module under
WinPython, double-click on WinPython Command Prompt
in
the directory where you installed WinPython to open a command prompt window.
At the command prompt window type pip install pkgname
where pkgname is the name of the package you wish to install. If the
package is already present, you will see the message "requirement already
satisfied."
[ More Info ]
[/languages/python]
permanent link
Thu, May 17, 2018 11:15 pm
Identifying Apple systems on the network
If you need to determine whether a system on the network is an
Apple
system, there are a number of means you can use to help identify whether
the system is, or is at least likely to be, manufactured by Apple. E.g.,
if the system is on the same
local area network (LAN) as a system from which you can
ping it, you can check the
media access control (MAC) address associated with the
IP address
you just pinged using the
Address Resolution Protocol (ARP), since the first 6
hexadecimal
digits of the MAC address can be used to identify the manufacturer of the
network interface controller (NIC) in the device pinged.
This technique won't work if there is an intervening
router between the device from which the ping is sent and the
receiving device, though, since the arp address you will see when there are
intervening
network hops is the one of the first hop device. You can see the number
of hops between the source and destination hosts using the
traceroute command (tracert is the equivalent command on
Microsoft Windows systems). E.g., in the example
below, I issued a ping command from a
Terminal window on my
MacBook
Pro laptop running OS X El Capitan (10.11.6). When I then peformed a
reverse DNS lookup on the IP address using
nslookup,
the fully qualified domain name (FQDN) identified the device
as an iPad.
The FQDN usually won't identify the type of device so clearly, but a check
of the MAC address may indicate the device was manufacturered by Apple. You
can get the MAC address using the
arp command.
$ ping -c 1 192.168.196.212
PING 192.168.196.212 (192.168.196.212): 56 data bytes
64 bytes from 192.168.196.212: icmp_seq=0 ttl=64 time=45.140 ms
--- 192.168.196.212 ping statistics ---
1 packets transmitted, 1 packets received, 0.0% packet loss
round-trip min/avg/max/stddev = 45.140/45.140/45.140/0.000 ms
$ nslookup 192.168.196.212
Server: 192.168.10.134
Address: 192.168.10.134#53
212.196.168.192.in-addr.arpa name = Margarets-iPad.abc.example.com
$ arp Margarets-iPad.abc.example.com
margarets-ipad.abc.example.com (192.168.196.212) at 78:7b:8a:55:bb:35 on en0 ifscope [ethernet]
$
[ More Info ]
[/os/os-x]
permanent link
Mon, May 14, 2018 11:09 pm
Using local time for date calculations in SQLite
I have an
SQLite database that I use to track approval of tasks. Every Monday,
I need to generate a count of the number of tasks approved from the prior
Tuesday through the Monday on which I'm creating the report. The approval
dates are stored in the database as an integer and I enter them in the
form 2018-05-14
. I use the following
SQL command in a
Python script to determine the number I've approved
in the last week:
sql = 'SELECT COUNT(*) FROM Tasks WHERE Approved >= date(CURRENT_DATE,"-6 day")'
But I noticed that the count didn't always include the tasks I approved
on the prior Tuesday. E.g., when I ran the script tonight, May 14, the number
reported was 5, yet I expected the result to be 7.
[ More Info ]
[/software/database/sqlite]
permanent link
Sun, May 13, 2018 9:55 pm
WinPython - Python for Microsoft Windows
If you wish to run
Python on a
Microsoft Windows system, you can use
WinPython.
The first window you will see when run run the downloaded installation file is
one for the license agreement, which notes
"WinPython components are distributed as they were received from their
copyright holder, under their own copyright and/or license, and without any
linking with each other." WinPython itself uses the
MIT
license. Once you accede to the license, you will be prompted for a
destination folder. By default that will be a WinPython directory created
beneath the directory where you're running the downloaded file from,
but you can change the location. When the installation has been
completed, a window will appear where you can click on a Finish
button to exit from the installation program.
[ More Info ]
[/languages/python]
permanent link
Sat, May 12, 2018 8:58 pm
Undo and Redo in Microsoft Windows File Explorer
If you wish to undo or redo an operation you just performed in the
Microsoft Windows
File Explorer on a Windows 10 system, you can do so by
hitting
Ctrl+Z (hit the
Ctrl and
Z keys
simultaneously). E.g., if you inadvertently deleted a file, sending it to the
recycle bin, you can hit those keys together to restore the file to its
prior location. If you wanted to redo an operation you undid, you can
hit
Ctrl+Y to redo the previously undone operation. E.g., if I deleted
a file, then undeleted it with
Ctrl+Z, I could redo the delete
action by hitting
Ctrl+Y sending it back to the recycle bin.
If you wish, you can add undo and redo icons to the Quick Access Toolbar
at the top of the Explorer window by clicking on the icon of a downward
pointing arrowhead with a horizontal line above it that appears at the
top of the Explorer window. You can then select "Undo" and "Redo" from
the menu that appears. Select both, so that you see checkmarks next to
each of those options. You should then see curved Undo and Redo arrows
next to the button you clicked on for the Customize Quick Access Toolbar.
You can now use those arrows, in addition to the shortcut keys, if you
prefer to undo and redo actions in the File Explorer.
[ More Info ]
[/os/windows/win10]
permanent link
Mon, May 07, 2018 11:42 pm
Performing a bare metal backup on a Windows 10 system
If you want to perform a "bare metal" backup of a Microsoft Windows 10 system
to an external USB
drive without a third-party application, you can use the
Backup and Restore utility that is provided by Microsoft with the
operating system. You can run the program from a command-line interface
(CLI) by
opening a command prompt window with
administrator privileges and issuing the command wbadmin start
backup -backupTarget:x -allcritical -quiet
where x
is the drive letter for the drive where you wish to store the backup.
When you add the -quiet
option, the backup will be run with no
prompts for the user. The --allcritical
option "creates a backup
that includes all critical volumes (critical volumes contain the operating
system files and components)."
[ More Info ]
[/os/windows/commands]
permanent link
Fri, Mar 30, 2018 10:23 pm
Cloudmark CSI IP Reputation Remediation
I manage an email server that uses an
Atlantic Broadband
SMTP
server as a
smart host. I maintain a mailing list on the server that currently has
about 1,300 email addresses. Each month someone sends a monthly newsletter to
the email addresses in that list; the people associated with those addresses
are all members of a retirees organization and have all indicated they wish to
receive that organization's newsletter. Usually, the newsletter is
transmitted without problems, but occasionally I will find that email
transmitted from the server is silently discarded with no bounced emai
indicating why that is occurring. Though that doesn't occur often, when it
occurs, it usually occurs when the newsletter is sent. When the problem
occurs, as it did yesterday, I have to request that the IP address of my
server be unblocked. Initially, I would call the ISP's phone support number,
i.e, an Atlantic Broadband support number, but they would in turn have to
contact their email service provider, since the email service they provide
is outsourced to Echo Labs as I found from examining email headers - see
Email sent via an Atlantic Broadband SMTP server not being delivered.
But I found that I could get the block removed more quickly if I submitted
a request through Cloudmark, an anti-spam company co-founded by
Vipul Ved Prakash and
Napster's
co-founder
Jordan Ritter, which provides an anti-spam service used by Echo Labs.
[ More Info ]
[/network/email/spam/blocklists]
permanent link
Sat, Mar 24, 2018 10:46 pm
Deleting old Windows backups with wbadmin
I had set up the built-in Windows 7 backup utility to run on my
mother-in-law's Windows 10 PC to back up the computer's internal hard
disk drive (HDD) to an external
USB drive. She asked me to verify that the backup was
still functioning, so I checked the status of the backup process on her
Windows 10 (version 1709) system
using the wbadmin
command by
opening a command prompt
window with administrator access to run the
wbadmin get versions
command to obtain a list of all the
backups. I found that the last backup had occurred on December 31, 2017.
[ More Info ]
[/os/windows/commands]
permanent link
Fri, Mar 23, 2018 11:05 pm
DNS - Standard Query Response Refused
While filtering on
Domain Name System (DNS) queries in the
Wireshark
packet capture tool with a
filter
of udp.port==53
on a
MacBook Pro
laptop running
OS X El
Capitan (10.11.6), I saw a lot of "Stanard query response refused"
replies in the "Info" field for responses from the DNS server. When
I expanded the "flags" section of the DNS response for those replies
from the DNS server, I saw "Reply code: Refused (5)" for some IP
address lookups, though other DNS queries were being answered with
an IP address.
[ More Info ]
[/network/dns]
permanent link
Thu, Mar 01, 2018 10:44 pm
Determining the the elapsed time between two timestamps in Excel
If you have an Excel workbook containing two cells that contain
a date and time and you want to know the time difference between
them in days and hours, you can subtract one from the other and get
the elapsed time between the two timestamps in days and hours by
using a custom date and time format for the cell that will hold the
results. E.g., suppose I have a
spreadsheet with the following
timestamps
in columns A and B:
|
A |
B |
C |
1 |
Start Time |
End Time |
Elapsed Time |
2 |
1/1/18 0:01 |
3/1/18 15:03 |
|
3 |
2/6/18 15:18 |
2/7/18 18:07 |
|
4 |
3/1/18 7:55 |
3/1/18 13:01 |
|
The cells containing the date and time have the custom format
m/d/yy h:mm
.
[ More Info ]
[/software/office/excel]
permanent link
Tue, Feb 27, 2018 11:10 pm
Error message "You don't have permission to access / on this server."
I had been running an Apache webserver under
OS X El Capitan on my
MacBook
Pro laptop. After an upgrade on the laptop, now running
OS X El Capitan (10.11.6), when I tried accessing the site
via http://localhost
, I saw a page with the title "403 Forbidden"
and the following text displayed on the page:
Forbidden
You don't have permission to access /
on this server.
[ More Info ]
[/os/os-x/apache]
permanent link
Mon, Feb 26, 2018 11:46 pm
Outlook reports a security problem with an encryption certificate
When I attempted to send a
PKI-encrypted email message to several recipients
from Microsoft Outlook for Mac 2016 (version 15.41),
I saw the message "Encryption certificates for some recipients could
not be found in the Outlook Contacts. Do you want to search the
Active Directory servers for them?"
I clicked on OK and then saw the message "The following recipients
have encryption certificates with security problems. Do you still want to
send this encrypted message?"
I clicked on Cancel and checked on whether Outlook was storing a
public key certificate for the person in my contacts list. He
was in the contact list, but there was no certificate associated
with the person in the contacts list when I clicked on the
Certificates tab.
[ More Info ]
[/network/email/clients/outlook]
permanent link
Sat, Feb 24, 2018 10:51 pm
Installing gnuplot and using it for a simple graph
Gnuplot
is a command-line interface (CLI) program that can be used to
create two and three-dimensional plots on a variety of operating systems
including
Linux, OS
X/macOS,
Unix, and Microsoft Windows systems. If you use
CentOS Linux,
you can install it with the
yum package management utility with yum install
gnuplot
. The information shown below is for the gnuplot 4.6.2 package
on a CentOS system.
$ rpm -qi gnuplot
Name : gnuplot
Version : 4.6.2
Release : 3.el7
Architecture: x86_64
Install Date: Fri 23 Feb 2018 09:30:00 PM EST
Group : Applications/Engineering
Size : 1551543
License : gnuplot and MIT
Signature : RSA/SHA256, Thu 03 Jul 2014 09:41:15 PM EDT, Key ID 24c6a8a7f4a80eb5
Source RPM : gnuplot-4.6.2-3.el7.src.rpm
Build Date : Tue 10 Jun 2014 12:07:58 AM EDT
Build Host : worker1.bsys.centos.org
Relocations : (not relocatable)
Packager : CentOS BuildSystem <http://bugs.centos.org>
Vendor : CentOS
URL : http://www.gnuplot.info/
Summary : A program for plotting mathematical expressions and data
Description :
Gnuplot is a command-line driven, interactive function plotting
program especially suited for scientific data representation. Gnuplot
can be used to plot functions and data points in both two and three
dimensions and in many different formats.
Install gnuplot if you need a graphics package for scientific data
representation.
$
Once you've installed the software on a Linux system, you can start
the program by typing gnuplot
and hitting Enter. You
will get a gnuplot prompt where you can type commands, e.g., help
for information on using the program. You can terminate the program by typing
exit
at the prompt.
[ More Info ]
[/software/graph/gnuplot]
permanent link
Thu, Feb 22, 2018 11:01 pm
Installing GIMP on OS X
To install the
GNU Image Manipulation Program
(GIMP) on
OS X systems, take the following steps:
-
Download the GIMP installation file from
GIMP - Downloads. The
file is an Apple Disk Image .dmg file.
-
Double-click on the downloaded file to start the installation process.
-
When the GIMP installation window opens, you will see "GIMP.app" in the
window that opens. Click on "GIMP.app" and drag it over into a
Finder window with the Applications folder
displayed to complete the installation of the GIMP application into that folder.
[ More Info ]
[/os/os-x]
permanent link
Mon, Feb 19, 2018 11:24 pm
xlrd and hidden worksheets
I use the xlrd
module in Python scripts to extract data from Excel workbooks. You can
use the Python xlrd module to
list the worksheets in a workbook and you can use the
xlrd.sheet "visibility" value to determine whether a sheet is hidden and,
if it is hidden, whether a user can unhide the sheet. The value should be
either 0, 1, or 2 with the numbers having the following meaning:
Visibility of the sheet:
0 = visible
1 = hidden (can be unhidden by user -- Format -> Sheet -> Unhide)
2 = "very hidden" (can be unhidden only by VBA macro)
[ More Info ]
[/languages/python/excel]
permanent link
Sun, Feb 18, 2018 10:10 pm
Displaying a tooltip
A tooltip, aka infotip or hint, is a small box of text
that appears when a user hovers the mouse pointer over an item, such as a
particular word or phrase, on a webpage. If you wish to display a
tooltip when a user hovers the mouse pointer over text on a webpage,
there are a number of ways you can do so. The simplest way to do so
is to specify a title
attribute, which is an
HTML global attribute with the
span tag. E.g.:
<span title="This is the tooltip text to be displayed when the mouse is
hovered over the spanned text.">example text</span>
This is an example using the above technique with example text.
[ More Info ]
[/network/web/html]
permanent link
Sat, Feb 17, 2018 1:43 pm
Windows 10 Blue Screen - Page Fault in Nonpaged Area
When we awoke this morning, my wife found a blue screen displayed on her
PC running Windows 10 Professional with the message "Your PC ran into a
problem and needs to restart. We'll restart for you." and "Stop Code: PAGE
FAULT in NONPAGED AREA". She tried rebooting the system several
times and powering the system off and on, but the message kept
reappearing. I rebooted the system and hit the F8 key before Windows
started - you may have to reboot several times to hit the key right before
Windows starts to have it take effect. That took me to a Recovery window
where I saw the message
It looks like
Windows didn't load correctly. If you'd like to restart and try
again, choose "Restart my PC" below. Otherwise, choose "See advanced
repair options" for troubleshooting tools and advanced options.
[ More Info ]
[/os/windows/win10]
permanent link
Thu, Feb 15, 2018 10:22 pm
Enabling the Developer Tab in Excel for Mac 2016
To be able to view the Developer Tab in
Microsoft Excel for Mac 2016, take the following steps:
-
Click on Excel at the top, left-hand corner of the Excel window and
the select Preferences.
-
On the Excel Preferences window, click on View in the
Authoring section.
-
In the View window, click on the check box next to Developer tab,
which you will see in the In Ribbon, Show section.
-
You can close that window by clicking on the "x" in the red circle at the
top, left-hand corner of the window. You should then see Developer
as a selectable option to the right of Data, Review, and View on the menu
bar at the top of the Excel window.
-
If you click on the Developer tab, you should see options that
include Visual Basic, Macros, Record Macro, Add-ins, Excel Add-ins, Button,
Group Box, Combo Box, Label, Check Box, Scroll Bar, List Box, Option Button,
and Spinner.
[ More Info ]
[/software/office/excel]
permanent link
Wed, Feb 14, 2018 9:31 pm
Extracting embedded Microsoft Office files from an Excel spreadsheet
I work with Excel workbooks on my
MacBook Pro
laptop that have embedded
PowerPoint
slides on some worksheets. The workbooks, which I need to review, are
created by others. When I review them, I
extract information from
the Excel workbooks to an SQLite database with Python and also have begun
extracting information embedded by
Object Linking and Embedding (OLE) into files as
noted in Extracting the
contents of a directory in a zipfile using Python. Some of the
embedded files are PowerPoint files, but when they are extracted they
have a .bin extension, which I can't open in
PowerPoint without changing the
filename extension from .bin to .ppt. To automate the renaming process,
I created a Python script, extract_embedded.py
that will extract
the embedded information to files in an "embedded" directory beneath the
current working directory and then rename any .bin files that are PowerPoint
files to have a .ppt extension. The script is shown below.
[ More Info ]
[/languages/python/excel]
permanent link
Sat, Feb 10, 2018 10:55 pm
Extracting the contents of a directory in a zipfile using Python
A Microsoft Excel file with an .xlsx or .xlsm
filename extension is an
Office
Open XML (OpenXML) zipped, XML-based file. The OpenXML format was developed by Microsoft for
spreadsheets, charts, presentations and word processing documents. If you
change the file extension to .zip by renaming the file, you can
extract the contents of the zip file as you would with any other
zip file - see Zipping
and unzipping Excel xlsx files. Excel workbooks can contain other documents
embedded within them using
Object Linking and Embedding (OLE) technology - see
Using olefile to
obtain metadata from an OLE CDF V2 file. I often need to extract an
embedded PowerPoint slide or
Visio
diagram from Excel .xlsm files, so I've been renaming the files to
zip files and unzipping them as I would other zip files, but, since
I want to automate the process and extract just specific embedded
files for further processing within a Python script, I created the
script below to extract the embedded files, which are contained
within a xl/embeddings
subdirectory within the .xlsm
zip files. The script uses the
zipfile module
to deal with the zip files.
Python's
OS module is used to check for the existence of the destination
directory and create it, if it doesn't yet exist.
#!/usr/bin/python
import os, zipfile
dirToExtract = "xl/embeddings/"
destinationDir = "embedded"
infile = raw_input("Enter zipfile: ")
archive = zipfile.ZipFile(infile)
if not os.path.exists(destinationDir):
os.makedirs(destinationDir)
for file in archive.namelist():
if file.startswith(dirToExtract):
archive.extract(file, destinationDir)
The script prompts for the file to be unzipped and then extracts just
the "xl/embeddings" folder and the files contained within it to a new
directory it will create within the current working directory. The new
directory will be named "embedded". After extracting the contents of the
"xl/embeddings" directory to the newly created "embedded" folder, I had the
the files below in the case of the particular .xlsm file I used for this
example.
[ More Info ]
[/languages/python/excel]
permanent link
Fri, Feb 09, 2018 10:04 pm
Using the Python xlrd module to list the worksheets in a workbook
To view the list of sheets in an
Excel
spreadsheet, I can use the
xlrd module within the
Python script below to obtain the list of
worksheets within the workbook.
#!/usr/bin/python
import xlrd as xl
file_name = raw_input("File: ")
workbook = xl.open_workbook(file_name)
print workbook.sheet_names()
If I use the script to display the list of worksheets in a workbook
named report.xlsx
that has three sheets named alpha,
beta, and gamma, I would see the following output:
$ ./sheetlist.py
File: report.xlsx
[u'alpha', u'beta', u'gamma']
$
[ More Info ]
[/languages/python/excel]
permanent link
Sun, Feb 04, 2018 11:03 pm
Run a cronjob at the end of every year
At the end of every year, I need to create some new directories to hold
log files with the directory name reflecting the new year on a
CentOS
Linux system. To create those directories on the last day of the year,
December 31, I can use the cron utility found on Linux/Unix and OS X/MacOS systems
to schedule a cronjob to run on the last day of the year. I can edit the
crontab file
that holds jobs to be run at a scheduled time or times by issuing the
crontab command
crontab -e
, which will allow me to edit the file with the
vi editor.
If the vi editor is the default editor, which it likely is, but you
are unfamiliar with that editor, you can change the editor for the current
login session to the GNU nano text editor, which may be easier to use for
someone unfamiliar with the vi text editor, by issuing the following command at
the command line.
export EDITOR="/usr/bin/nano"
The value will be reset when you log off or you can reset it manually
with the command below:
export EDITOR="/usr/bin/vi"
I can put the following line in the crontab file to run my script named
end-of-year-dirs
at 7:00 AM on December 31 of every year. When
you add a new entry, be sure to hit the Enter key at the end of the
line.
0 7 31 DEC * /home/jdoe/scripts/end-of-year-dirs
[ More Info ]
[/os/unix/commands]
permanent link
Sat, Feb 03, 2018 10:34 pm
Using PyInstaller to create an executable file from a Python script
If you wish to convert Python scripts to executable files that you can run on
systems where Python or all of the needed dependencies for the script are
not installed, one program that is available for
Linux, Mac OS X,
Solaris, AIX, or
Microsoft Windows systems is
PyInstaller. If you have the
pip package manager installed, you can install PyInstaller by running the
command below from the root account.
To then create an executable file that will run on other sytems with that
same operating system, e.g., you can create an executable file on one Linux
system that will run on another Linux system or create an .exe file on a
Microsoft Windows system that can be ported to another Windos system, you can
issue the command pyinstaller yourprogram.py
.
[ More Info ]
[/languages/python]
permanent link
Fri, Feb 02, 2018 11:16 pm
Extracting information from a .msg file with Python
I received a
.msg file attachment to an email message I received with
Microsoft Outlook for Mac, which is part of
Microsoft Office 2016 on my
MacBook Pro
laptop. When I double-clicked on the attachment in Outlook to view
the contents of the file, I saw "There is no application specified to open
the document Re_ Netbond.msg."
And also a window giving me an option to "Search App Store" with the message
"Search the App Store for an application that can open this document, or
choose an existing application on your computer."
[ More Info ]
[/languages/python]
permanent link
Wed, Jan 31, 2018 11:48 pm
Using olefile to obtain metadata from an OLE CDF V2 file
Microsoft's Object Linking and Embedding (OLE) technology allows
embedding and linking to documents and other objects. OLE allows the
addition of different kinds of data to a document from different
applications, such as a text editor and an image editor. This creates
a Compound File Binary Format (CFBF), aka a
Compound File, Compound Document format, or Composite Document File V2 (CDF V2)
document.
While using my MacBook Pro laptop, which is currently running the
OS X El
Capitan (10.11.6) operating system, I often need to
extract embedded documents from an
Excel .xlsm file. I do that by renaming the file to have a .zip rather than
a .xlsm file extension. I can then extract the files contained
within the .zip file just as I would any
zip file. Within the directory structure created by unzipping the
zip file there is an xl/embeddings
subdirectory with .bin
files within it.
$ ls xl/embeddings
Microsoft_Visio_Drawing1.vsdx oleObject2.bin
Microsoft_Visio_Drawing2.vsdx oleObject3.bin
oleObject1.bin
$
[ More Info ]
[/languages/python]
permanent link
Tue, Jan 30, 2018 11:22 pm
Using Python to extract data from a spreadsheet and put it in a database
I need to review spreadsheets related to work requests on a daily basis. The
Excel
workbooks have multiple worksheets within them. I have been manually copying
data from specific cells in one of the worksheets and pasting it into a
SQLite
database. I use DB Browser for SQLite
to paste the information into the database. I wanted to automate the
process of extracting the data from the .xlsm or .xlsx workbook files and
inserting it into the SQLite database using a
Python script. So I initially created a script that I could
run from a Teminal window on my
MacBook Pro laptop,
as noted in
Extracting data from cells in an Excel workbook with Python, that
would just print the information to the Terminal window's command-line
interface. I had another script to
import data from
a text file into an SQLite database with Python, so I combined code from
that script with the one to read data from the spreadsheets to add the data
to a table in the database.
[ More Info ]
[/languages/python/excel]
permanent link
Sun, Jan 28, 2018 10:15 pm
Reading specific lines from a file into another file within Vi
If you need to read lines from another file into the file you are currently
editing within the Vi text editor, you can do so by utilizing the editor's
ability to execute an external command, e.g., a Linux/Unix
shell
command, by entering an
exclamation mark followed by the external command. E.g., if I wanted to
read the first 55 lines from the file ~/temp/lincoln.txt
, I could e
nter Vi's colon mode by hitting Esc followed by the colon character.
I could then type r
, which is the command used to read from
another file. But, instead of immediately typing the file name, e.g.
:r ~/temp/lincoln.txt
, I could use the
head utility to read the
first fifty-five lines of the file by typing head -55
followed by
the path to the file and the file name. E.g.:
:r !head -55 ~/temp/lincoln.txt
If, instead, I wanted to read the last 14 lines of the file, I could use
the tail command.
:r !tail -14 ~/temp/lincoln.txt
If I wanted to include specific lines from the other file into the one I'm
currently editing, e.g., lines 10 through 15, I could use the
sed command as shown below.
:r !sed -n 10,15p ~/temp/lincoln.txt
[ More Info ]
[/software/editors/vi]
permanent link
Sat, Jan 27, 2018 6:50 pm
Turning on UltraVNC server service on a Windows system
If you installed
UltraVNC,
which is
free and open-source software, to provide
Virtual Network Computing (VNC) connectivity from/to
a system for remote administration capabilities, but haven't enabled
the UltraVNC server service to allow the system itself to be managed remotely,
you can enable that service by taking the following steps:
-
Run the
uvnc_settings.exe
program, which you can find in
the directory where you installed UltraVNC. You will need to provide the
login credentials for an account with administrator-level access on the
system.
-
Click on the Service tab then click on the Install Service
button, which will install the software as a service, i.e. as a function
provided by a server, on the system.
-
Once the service is installed, you can click on the Start Service
button to run the service.
-
You can set the password to be used for VNC connections by clicking on
the Security tab. You can set two passwords. The "VNC Password"
will allow remote control of the system whereas the "View-Only Password"
will only allow viewing the display on the system, which is helpful if you
want to show someone what is happening on the system without giving the
person the ability to control the system. You can then click on the
OK button to close the UltraVNC settings window.
[
More Info ]
[/os/windows/software/remote-control/vnc/ultravnc]
permanent link
Fri, Jan 26, 2018 10:51 pm
Extracting data from cells in an Excel workbook with Python
I've been
using xlrd to extract a column from an Excel spreadsheet with a
Python script on my MacBook Pro laptop. With xlrd, you can
read data from cells in a workbook by specifying a specific sheet and the cells
from which you wish to extract the data in
spreadsheet
programs, such as
Microsoft Excel,
Apache OpenOffice Calc, or
LibreOffice Cale.
With spreadsheet applications you normally have rows sequenced by numbers
and columns sequenced by alphabetical characters. With xlrd, though, both
rows and columns are specified by numbers with the first row starting at 0
and the first column starting at 0 as well.
[ More Info ]
[/languages/python/excel]
permanent link
Wed, Jan 24, 2018 10:39 pm
Determine NTP server on a Microsoft Windows system
If you wish to determine the
Network Time Protocol (NTP) server that a Microsoft Windows system is
using to synchronize its time, you can find that information in the
Windows registry at
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\W32Time\Parameters\NtpServer
.
You can query that value from a
command-line interface (CLI) with the command reg query
HKLM\System\CurrentControlSet\Services\W32Time\Parameters
. To see
just the NTP server
fully qualified domain name (FQDN), you can
pipe the output of the reg query
command to the
find command and search for "NtpServer".
C:\>reg query HKLM\System\CurrentControlSet\Services\W32Time\Parameters
HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\W32Time\Parameters
NtpServer REG_SZ time.windows.com,0x9
ServiceDll REG_EXPAND_SZ %systemroot%\system32\w32time.dll
ServiceDllUnloadOnStop REG_DWORD 0x1
ServiceMain REG_SZ SvchostEntry_W32Time
Type REG_SZ NTP
C:\Users\Administrator.LABYRINTH>reg query HKLM\System\CurrentControlSet\Services\W32Time\Parameters | find "NtpServer"
NtpServer REG_SZ time.windows.com,0x9
C:\>
In the above example, the time server is time.windows.com, an NTP server
provided by Microsoft.
[/network/ntp]
permanent link
Tue, Jan 23, 2018 9:42 pm
Using key pairs with SSH
The
Secure Shell (SSH) protocol provides a means one can use for
secure, encrypted connections between systems for logins or file transfers.
One can use a username and password to login from an SSH client to an SSH
server or one can use a
public and private key combination where a public
key for a user's account is stored on a remote SSH server while a corresponding
private key is stored on the system from which the user will initiate the
SSH or SFTP connection. On
Linux systems,
private keys are normally stored in the .ssh
directory
beneath the home directory for your account. If you haven't created
any keys yet, the directory may only contain a known_hosts
file that contains public keys for servers you've previously logged into
via SSH.
[ More Info ]
[/network/ssh]
permanent link
Mon, Jan 22, 2018 5:26 pm
This page intentionally left blank
Books and other documents may often include pages intentionally left blank
stating "This page [is] intentionally left blank." As explained in the Wikipedia
intentionally blank page article, this is often done due to the way
pages are printed from a much larger sheet of paper or for legal reasons.
On the web you can find an online equivalent in
The This Page Intentionally Left Blank (TPILB) Project which notes:
In former times printed manuals had some blank pages, usually with
the remark “this page intentionally left blank”. In most cases there
had been technical reasons for that. Today almost all blank pages disappeared
and if some still exist here and there, they present flatterly comments
like “for your notes” instead of the real truth: This page
intentionally left blank!
Nowadays the “This Page Intentionally Left Blank”-Project
(TPILB-Project) tries to introduce these blank pages to the
Web again. One reason is to keep alive the remembrance of these famous
historical blank pages. But it is the primary reason to offer internet
wanderers a place of quietness and simplicity on the overcrowded World
Wide Web—a blank page for relaxing the restless mind.
Since I sometimes want to take browser screenshots that display
options that are available in various browsers, but would prefer not to
have any webpage content displayed in those screenshots, I've also created a
"this page intentionally
left blank" page.
[/network/web/design]
permanent link
Sun, Jan 21, 2018 10:56 pm
OpenVPN
OpenVPN is
free and open-source software that provides
Virtual Private Network (VPN) connectivity that is available for a variety
of
operating systems. To use the software on a
Microsoft Windows 10 system, download the the installer for
Windows
Vista and later from the OpenVPN
Community Downloads page; get the OpenVPN community software not the
PrivateTunnel software from the OpenVPN project - I mistakenly downloaded
and installed PrivateTunnel when I first went to the
OpenVPN site and then had to
uninstall PrivateTunnel.
[ More Info ]
[/os/windows/network/vpn]
permanent link
Sat, Jan 20, 2018 11:01 pm
Updating Windows Subsystem for Linux
If you
set up the Windows Subsystem for Linux on Windows 10, you may find that
when you subsequently select Bash on Ubuntu on Windows to obtain a
Bash shell
prompt, that you see a message indicating that packages need to be
updated. E.g.:
106 packages can be updated.
71 updates are security updates.
root@ANAHEIM:~#
You can get the updates with apt-get update
.
You can then install the updates with apt-get upgrade
. You may
need to respond to a "Do you want to continue?" prompt. If there are a lot of
updated packages to install, be prepared to wait awhile for the upgrade
process to complete.
[ More Info ]
[/os/windows/win10/Linux-Subsystem]
permanent link
Fri, Jan 19, 2018 8:21 pm
Windows 7 to 10 upgrade hung at "finalizing your settings"
A few days ago I upgraded a Windows 7 Professional system to Windows 10.
After the upgrade was installed, I saw a blue screen with "Finalizing your
setings" with a spinning circle of dots above it. I didn't need to use
the system for a few days, so I left it in that state for about 3 days.
But with the same message displayed today, I was able to resolve the
problem today by holding the power button down for about 15 seconds until
the system powered off. When I powered the system back on afterwards I
saw "Welcome to Windows 10!" with the account I had been logged into
before the upgrade showing and a Next button near the bottom,
right-hand corner of the screen. When I clicked on Next, I saw
the "Choose privacy settings for your device" screen, though I had made
those selections during the upgrade process previously. I altered the
selections again as I had before and then saw a "Meet Cortana" screen
where I clicked on Not now. I then saw "Finalizing your settings"
again briefly and then the screen went black. I saw the disk activity
LED for the laptop blinking rapidly for a minute and then I saw a circle
of spinning dots on a blue background above "Please wait", but then I
got to the "Press Ctrl+Alt+Delete to unlock" screen and was able to log
into the laptop where within a few moments I saw "Thank you for updating
to the latest version of Windows 10. I typed winver
in the
Cortana "Ask me anything" field and hit Enter which resulted in
winver being shown as the best match. When I selected it, I saw
the current version of Windows being displayed as Windows 10 Version 1709
(OS Build 16299.125).
[/os/windows/win10]
permanent link
Thu, Jan 18, 2018 11:55 pm
Viewing the login history for a user on a Linux or OS X system
If you want to see the IP addresses from which logins have occurred on a
Linux or OS X system, you can use the
last command. E.g.:
$ last ann
ann tty2 Thu Jan 5 20:23 - 20:27 (00:03)
ann tty2 Thu Jan 5 20:05 - 20:06 (00:00)
ann tty2 Thu Jan 5 20:01 - 20:02 (00:00)
ann pts/0 8.25.222.2 Sun Oct 30 10:43 - 16:59 (06:16)
ann pts/0 192.168.0.2 Tue Oct 11 12:02 - 12:03 (00:00)
ann pts/0 192.168.0.2 Tue Oct 11 12:01 - 12:01 (00:00)
ann pts/32 192.168.1.6 Sat Jun 11 20:03 - 20:38 (00:35)
ann pts/32 192.168.1.6 Sat Jun 11 13:23 - 14:22 (00:58)
ann pts/14 192.168.1.5 Sun Feb 14 17:05 - 18:28 (6+01:22)
ann pts/6 8.23.51.9 Sun Nov 8 09:23 - 10:16 (00:52)
ann pts/6 8.23.51.9 Sat Nov 7 08:54 - 16:42 (07:48)
ann pts/7 8.23.51.9 Fri Nov 6 16:47 - 16:49 (00:02)
ann pts/6 8.23.51.9 Fri Nov 6 15:48 - 23:33 (07:44)
ann pts/0 :0 Thu Sep 10 15:25 - 12:38 (129+22:13)
ann :0 :0 Thu Sep 10 15:24 - 12:38 (129+22:14)
ann pts/5 :0 Sun Aug 23 11:08 - crash (18+04:03)
ann pts/4 :0 Sat Aug 22 21:16 - crash (18+17:56)
ann pts/3 :0 Sat Aug 22 09:14 - crash (19+05:58)
ann :0 :0 Sat Aug 22 09:07 - crash (19+06:05)
ann pts/2 192.168.1.6 Sun Jul 19 15:41 - 20:59 (1+05:18)
ann pts/2 192.168.1.5 Mon Jun 22 21:28 - 20:17 (18+22:49)
ann pts/2 192.168.1.6 Fri Feb 6 21:26 - 21:26 (00:00)
ann pts/5 192.168.0.3 Wed Nov 5 21:07 - 22:15 (01:08)
wtmp begins Sun Oct 5 20:09:11 2014
$
[ More Info ]
[/os/unix/commands]
permanent link
Wed, Jan 17, 2018 11:01 pm
Renewing a DHCP lease under OS X
If you wish to renew a
Dynamic Host Configuration Protocol (DHCP) lease on a Mac
OS X
system, you can do so by clicking on the Apple icon in the upper, left-hand
corner of the screen, selecting System Preferences, and then Network
, and then the relevant network interface, e.g., Wi-Fi.
Then click on the Advanced button and then the TCP/IP tab.
You can then click on the Renew DHCP Lease button to have the system
attempt to renew its DHCP lease.
[ More Info ]
[/os/os-x]
permanent link
Tue, Jan 16, 2018 10:30 pm
Can't insert worksheet in Microsoft Excel for Mac 2016
When I tried to insert another worksheet in an Excel workbook today, I found
that the option to insert a new blank worksheet was grayed out when I clicked on
Insert and selected
Sheet.
When I tried another means of adding a new sheet by clicking on
the plus sign at the right side of the list of sheets in the worksheet
to add the sheet, I saw an alert message stating "Workbook is protected
and cannot be changed."
[ More Info ]
[/software/office]
permanent link
Mon, Jan 15, 2018 7:37 pm
Using the Windows Resource Monitor to monitor network activity
If you want to see the IP addresses to which a program on a Microsoft Windows
system is establishing connections, you can use the
Resource Monitor utility that is provided with
Windows
Vista and later versions of Windows to check on network connections from
a particular application on the system. To start the program, you can click
on the Windows
Start button and type resmon
or resmon.exe
in the "Search programs and files" field on a Windows 7 system or the
"Type here to search" field on a Windows 10 system. You should see the
resmon utility returned as the best match.
When the Resource Monitor program is running, you can click on the
Network tab and then TCP Connections to see network activity
associated with programs currently running on the system . You can click on a
column header, e.g. "Image" to sort the entries by the values in that column.
[ More Info ]
[/os/windows/network/monitoring/resmon]
permanent link
Sun, Jan 14, 2018 11:02 pm
Comodo OCSP
After I started the
gVim text editor on a Windows laptop, I saw a "firewall
alert" from the Symantec antivirus/firewall software on the system stating
"Suspicious network activity has been detected." I've used gVim on many
other systems for many years, but those systems weren't running the Symantec
security software. The Symantec software showed that gvim.exe was attempting
a
Domain Name System (DNS) query to port 53, the
well-known port for DNS, to IP address 8.8.8.8, the
Google DNS
server specified on the system for DNS queries.
[ More Info ]
[/network/ocsp]
permanent link
Sat, Jan 13, 2018 10:20 pm
Using downloaded Visio stencils with Visio 2016
I needed to add a
Juniper SRX Series Services Gateway to a network diagram created with
Microsoft Visio 2016, so I downloaded the SRX Series stencils from
Juniper Networks
Product Icons & Visio Stencils page. The downloaded file was a
ZIP file, so I extracted the contents of that file. Within the .zip file
were two .VSS files:
Juniper Branch SRX Series.vss and
Juniper Data Center SRX Series.vss. On a Microsoft Windows system,
if you wish to make shapes within a .vss file available within Visio, you
can copy the .vss files to the My Shapes
directory within
the Documents
directory for the account you are using. To
then access the shapes, click on More Shapes on the left side
of the Visio 2016 window, then select My Shapes. You should then
see the names for the .vss files you added to the My Shapes
directory listed.
[ More Info ]
[/os/windows/office/visio]
permanent link
Fri, Jan 12, 2018 10:55 pm
Viewing only the files created today on a Linux system
I sometimes need to see only the files created or modified today in a
directory. On a Linux system, you can
pipe
the output of the
ls command
into the grep
command looking for just today's date in the input to the grep command as
shown below:
$ ls -al --time-style=+%D ~/Documents/*.zip | grep $(date +%D)
-rw-r--r--. 1 joe joe 269338 01/12/18 /home/joe/Documents/gloves.zip
$
You can specify how the date is displayed with +format
where format is a particular format in which you want the date
displayed - see
Formatting the output from the date command on a Linux system. If you
use +%D
, the date will be displayed as m/d/y
, i.e.,
month/day/year, e.g. 01/12/18 for January 12, 2018. By then using the
grep command to search for that value, you can limit the displayed files
to only those created or modified today.
[ More Info ]
[/os/unix/commands]
permanent link
Sat, Jan 06, 2018 5:01 pm
Configuring Sendmail to always allow Steam email
A family member wasn't receiving email for a
Steam
account she created to play a
PC game.
Her email comes through a
Sendmail
email server I manage and I found that a
Domain Name
System-based Blackhole List (DNSBL), the
Spam and Open Relay Blocking System (SORBS), had blocked
email from the IP address that
Valve
had for the email server used to send email to her about the account.
When I checked the sendmail log file, I found the following two entries:
Dec 29 21:10:26 moonpoint sendmail[27413]: ruleset=check_relay, arg1=smtp03.stea
mpowered.com, arg2=127.0.0.6, relay=smtp03.steampowered.com [208.64.202.39], rej
ect=550 5.7.1 Spam Block:mail from 208.64.202.39 refused - see http://dnsbl.sorb
s.net/
Dec 29 21:17:35 moonpoint sendmail[27661]: ruleset=check_relay, arg1=smtp01.stea
mpowered.com, arg2=127.0.0.6, relay=smtp01.steampowered.com [208.64.202.37], rej
ect=550 5.7.1 Spam Block:mail from 208.64.202.37 refused - see http://dnsbl.sorb
s.net/
Checking, I found the following IP addresses and
fully qualified domain names (FQDNs) for Steam email
servers:
IP Address | FQDN |
208.64.202.36 |
smtp.steampowered.com |
208.64.202.37 |
smtp01.steampowered.com |
208.64.202.38 |
smtp02.steampowered.com |
208.64.202.39 |
smtp03.steampowered.com |
208.64.202.40 |
steammail.steampowered.com |
To ensure that none of the DNSBLs I use with Sendmail will ever block
email from the Steam email servers, I added the following lines to
/etc/mail/access
:
Connect:208.64.202.36 OK
Connect:208.64.202.37 OK
Connect:208.64.202.38 OK
Connect:208.64.202.39 OK
Connect:208.64.202.40 OK
I then used the makemap hash
command to rebuild the access
database.
# makemap hash /etc/mail/access </etc/mail/access
#
Once I did that, she was able to receive the Steam-related email.
[/network/email/sendmail]
permanent link
Privacy Policy
Contact