Thu, Dec 31, 2015 5:53 pm
Determining the day of the week for a specific date under Linux
If you want to determine the day of the week for a specific date on a Lunux
system, you can provide that date as a parameter to the
date
command with
--date
.
-d, --date=STRING
display time described by STRING, not 'now'
E.g., to determine the day of the week for August 10, 2008, you could
use the following command at a
Bash prompt:
$ date --date=2008-08-10
Sun Aug 10 00:00:00 EDT 2008
If you only want to see the day of the week, e.g., day 7, "Sun", or "Sunday",
then you can provide a format parameter as well as shown below:
$ date '+%u' --date=2008-08-10
7
$ date '+%a' --date=2008-08-10
Sun
$ date '+%A' --date=2008-08-10
Sunday
The format values used above are as follows:
%a locale's abbreviated weekday name (e.g., Sun)
%A locale's full weekday name (e.g., Sunday)
%u day of week (1..7); 1 is Monday
[/os/unix/linux]
permanent link
Wed, Dec 30, 2015 10:34 pm
Windows System Image Backup failed with 0x80070002 code
After attempting to create a system image backup on an external USB
drive of a Windows 7 Ultimate system, I saw a message that "The backup
failed. The system cannot find the file specified. (0x80070002)." The
window where I saw the error message didn't offer me a way to see what
file or files were associated with the error message. It took me many hours
to finally connect the error message to an issue with a USB port on
the front of the computer. When I moved the cable between the external
USB drive and the computer from a USB port on the front of the computer
to one on the back, I was finally able to successfully create a system
image on the external drive.
[ More Info ]
[/os/windows/win7]
permanent link
Mon, Dec 28, 2015 10:41 pm
Apple Software Update on Microsoft Windows systems
The
Apple Software Update application, which may be found in
C:\Program Files (x86)\Apple Software Update
on Microsoft
Windows systems, is used to check for updates for Apple software products
on those systems. While checking for updates, the software establishes
HTTP connections to
swcdn.apple.com
and
swcatalog.apple.com
. You may find that a web server it is querying regarding updates,
though, is in the IP address space of the Internet Service Provider (ISP)
for the system on which the software runs because Apple has partnered with
Akamai
Technologies as have many other large companies, for use of
Akamai's
content
delivery network (CDN) for the delivery of content from Apple. By
partnering with a CDN provider a company can have its content delivered
from servers closer to the end user.
[ More Info ]
[/os/windows/software]
permanent link
Wed, Dec 23, 2015 11:04 pm
Adding the Microsoft Windows FTP Service to a Windows 7 system
If you wish to set up a Microsoft Windows 7 system as an
File Transfer
Protocol (FTP) server, Microsoft provides FTP server software which you can
enable through the
Turn Windows Features on or off capability under
Programs and Features, which you can access from the
Control Panel
. You can configure the FTP server service to use "Basic" authentication
so that users will need to provide a user name and password for an account
on the system in order to transfer files to/from the FTP server or you can
choose to set up the FTP server to use anonymous authentication, which will
allow FTP users to type
anonymous
when prompted for a user name
and then provide whatever they wish when prompted for a password.
[ More Info ]
[/os/windows/win7]
permanent link
Tue, Dec 22, 2015 11:23 pm
Displaying mail account information with AppleScript
Apple's
AppleScript
scripting language provides a means to obtain information
from applications on a OS X system. Applications have a
"dictionary" that can be consulted to determine what properties
can be queried or altered. E.g., to see the dictionary for the
Mail application on
an OS X system, I can open the
AppleScript Editor program found
in
Applications/Utilities
, then click on
File,
select
Open Dictionary and scroll down until I see the Mail
application listed. I can then click on it to highlight it and then
click on the
Choose button to open that dictionary.
[ More Info ]
[/os/os-x/applescript]
permanent link
Sat, Dec 19, 2015 11:25 pm
Installing a Telnet client from Microsoft on Windows systems
If you need a
telnet client
on a Microsoft Windows system, e.g., a Windows Vista, 7, 8, Server 2008
R2, Windows Server 2008 system, etc., you can install
PuTTY, which is probably the
most popular telnet client for Microsoft Windows systems, created by
Simon Tatham, or you
can install one provided by Microsoft from a
command line
interface (CLI), i.e., a command prompt, using the
pkgmgr
command as shown below:
Microsoft Windows [Version 6.1.7601]
Copyright (c) 2009 Microsoft Corporation. All rights reserved.
C:\Users\Administrator>pkgmgr /iu:"TelnetClient"
C:\Users\Administrator>
After you enter the pkgmgr /iu:"TelnetClient"
command, you won't
see any indication that the software has been installed. The command prompt
will be redisplayed and you may have to wait a couple of minutes afterwards
for the installation to be completed depending on the speed of your system. If
you see a User
Account Control dialog box displayed when you enter the command, provide
a userid and password for an administrator account and confirm that you want to
allow the action it displays.
After you've installed the telnet client application, you can type
telnet
at a command prompt to start the client, which will
take you to the telnet client prompt:
Welcome to Microsoft Telnet Client
Escape Character is 'CTRL+]'
Microsoft Telnet>
The telnet client program, telnet.exe
is installed in
\windows\system32
.
C:\Windows>dir /s telnet.exe
Volume in drive C has no label.
Volume Serial Number is 9420-A68C
Directory of C:\Windows\System32
07/13/2009 08:39 PM 79,872 telnet.exe
1 File(s) 79,872 bytes
Directory of C:\Windows\winsxs\amd64_microsoft-windows-telnet-client_31bf3856ad
364e35_6.1.7600.16385_none_1426830c3ebb712d
07/13/2009 08:39 PM 79,872 telnet.exe
1 File(s) 79,872 bytes
Total Files Listed:
2 File(s) 159,744 bytes
0 Dir(s) 61,068,718,080 bytes free
[/network/telnet]
permanent link
Fri, Dec 18, 2015 10:40 pm
Changing Default Application to Open a File under OS X
If you need to change the default application that will be used to open
a particular file type on a Mac OS X system, you can do so by taking
the following steps:
- Right-click on a file of that type in the Finder.
- Select Get Info.
-
Click on the triangle to the left of "Open with", then select the
application you wish to use to open files of that kind.
- Click on the Change All.. button.
-
When asked to confirm that you want to change all similar documents to
open with the application click on the Continue button.
Example
[/os/os-x]
permanent link
Thu, Dec 17, 2015 11:23 pm
Star Wars in ASCII
A new
Star Wars movie,
"The Force Awakens" is being released on Friday December 18, 2015.
The Star Wars ssaga has been told in movies, animated TV series, a comic
book series, novels, games, and
fan fiction. It has
also been related in ASCII art
.
-=== ####
What are you ""o o {"o o}
talking _\ -/_ { =}
about? # / \ {~~ //~}
\\//| __ |\\ {{~{ //}~}}
\/ |/ \| \\ {} {// } {}
[][][] || {} // } {}
|\ /| [# {} H{{}}} {}
|_||_| I] @ H"||"} @
[ ][ ] I {"||"}
| || | {"||"}
|_||_| {"||"}
__________________/__][_]________________[_][_]____________________
To view the story retold in ASCII art, use a telnet program to connect
to a site in the Netherlands, towel.blinkenlights.nl
. You
can do so on an Apple OS X system by opening the Terminal program
found in Applications/Utilities
and then issuing the
command telnet towel.blinkenlights.nl
. You can issue the same
command from a Linux system. You can stop the display by typing Ctrl-]
and then typing quit
at the telnet>
prompt. On a
Microsoft Windows system, you can use
PuTTY; set the connection
type to telnet
rather than ssh
. If you've
ever created ASCII art,
you can appreciate the magntitude of the effort by the following individuals:
Original Work : Simon Jansen (
http://www.asciimation.co.nz/ )
Telnetification : Sten Spans ( http://blinkenlights.nl/ )
Terminal Tricks : Mike Edwards (pf-asciimation@mirkwood.net)
/~\
|oo )
_\=/_
___ # / _ \
/ ()\ \\//|/.\|\\
_|_____|_ \/ \_/ ||
| | === | | |\ /| ||
|_| O |_| \_ _/ #
|| O || | | |
||__*__|| | | |
|~ \___/ ~| []|[]
/=\ /=\ /=\ | | |
________________[_]_[_]_[_]________/_]_[_\_________________________
[/graphics]
permanent link
Wed, Dec 16, 2015 11:27 pm
OS X sips command and image dimensions
On a Mac OS X system, you can use the
file
command to determine
the width and height of an image in pixels.
$ file example.png
example.png: PNG image data, 69 x 91, 8-bit/color RGBA, non-interlaced
You can also use the sips
command with the -g
parameter followed by pixelWidth
or pixelHeight
.
$ sips -g pixelWidth example.png
/Users/jdoe/Documents/example.png
pixelWidth: 69
$ sips -g pixelHeight example.png
/Users/jdoe/Documents/example.png
pixelHeight: 91
Make sure you capitalize those as shown above; if you don't and use
PixelWidth
or PixelHeight
, i.e., you use an uppercase
"P" rather than a lowercase "p", the result will be "<nil>".
$ sips -g PixelWidth example.png
/Users/jdoe/Documents/example.png
PixelWidth: <nil>
If you only want to see the number, you can pipe the output of the
command to the tail
command, instructing that command to
show only the last line of output, and then pipe the output of the tail
command to the cut
command, instructing that command to use
the colon as the delimiter for separating items on the line and to show
just the second field, which will be the number preceded by a space:
$ sips -g pixelWidth example.png | tail -n1 | cut -d":" -f2
69
$ sips -g pixelHeight example.png | tail -n1 | cut -d":" -f2
91
Or you can omit the tail
command and just use
cut
by adding the -s
argument to that command
to suppress lines with no field delimiter character, i.e., lines with
no colon in this case, assuming there will be none on the first line of
output from the sips
command.
$ sips -g pixelWidth example.png | cut -d":" -f2 -s
69
$ sips -g pixelHeight example.png | cut -d":" -f2 -s
91
If you don't want the space preceding the number, you can use a space character
as the delimiter and specify f4
rather than f2
, since
there are two spaces output before "pixel" on the second line of ouput and a
third one after the colon.
$ sips -g pixelWidth example.png | cut -d" " -f4 -s
69
If you wished to put that in a window that will be displayed to the user,
you can use AppleScript.
set w to do shell script "sips -g pixelWidth /Users/jdoe/Documents/example.png | cut -d':' -f2 -s"
set h to do shell script "sips -g pixelHeight /Users/jdoe/Documents/example.png | cut -d':' -f2 -s"
display alert "Width:" & (w as text) & "
Height:" & (h as text)
Hit Enter after the double quote at the end of the second-to-last line
to have a newline character appear in the ouput after the line with the width
is displayed so that the height appears on a separate line. The ouput will
be as shown below:
[/os/os-x]
permanent link
Tue, Dec 15, 2015 11:05 pm
Determining last Windows backup time from a command prompt
If you want to determine the last time a backup was made on a Microsoft
Windows system using the built-in Windows backup utility, you can do so
from a
command-line interface (CLI), i.e., a
command prompt, using the
wbadmin
utility.
C:\Users\Administrator>wbadmin /?
wbadmin 1.0 - Backup command-line tool
(C) Copyright 2004 Microsoft Corp.
---- Commands Supported ----
START BACKUP -- Runs a one-time backup.
STOP JOB -- Stops the currently running backup or recovery
operation.
GET VERSIONS -- List details of backups recoverable from a
specified location.
GET ITEMS -- Lists items contained in a backup.
GET STATUS -- Reports the status of the currently running
operation.
[ More Info ]
[/os/windows/commands]
permanent link
Sun, Dec 13, 2015 4:10 pm
Video DownloadHelper
Another add-on for Firefox for downloading videos from YouTube pages is
Video
DownloadHelper. The add-on works in Chrome as well and also will allow
you to download videos from other sites as well as the YouTube site. Like
the
Download YouTube Videos as MP4 extension, it allows you to select from
various resolutions for the downloaded video, so you can trade off resolution
against file size, i.e., a higher resolution and larger file size or a lower
resolution and smaller file size.
[/network/web/browser/firefox/addons]
permanent link
Sat, Dec 12, 2015 10:52 pm
Download YouTube Videos as MP4 Add-on for Firefox
If you wish to be able to download
YouTube videos to your
own computer, you can use a site, such as
Offliberty or,
for the Firefox web browser, you can install an extension, aka add-on, that
will provide that capability from within the browser. One such add-on for
Firefox is
Download YouTube Videos as MP4 by
ialc.
The extension places a download button on
YouTube pages allowing you
to easily download the video on the page as an MP4 or FLV file. If you select
MP4 as the format for the downloaded file, you can choose from two resolutions:
720p or 360p.
[/network/web/browser/firefox/addons]
permanent link
Fri, Dec 11, 2015 10:33 pm
OS X dictionary lookup
If you have a Mac OS X system, there is a built-in dictionary application that
you can use by moving the mouse pointer over a word and then hitting the
control-command-D keys simultaneously. When you do so the word will
be highlighted in yellow and, if the word is in the dictionary, its
meaning will be displayed as well as thesaurus information for the word.
If the word isn't in the dictionary, you will see "No results found"
displayed.
So, if you encounter a word on a webpage that you don't recognize,
you can go to dictionary.com to
look up the definition of the word or you can stay on the page and look it
up by hitting those three keys simultaneously.
[/os/os-x]
permanent link
Wed, Dec 09, 2015 11:43 pm
Wrapping text and viewing the current line and column in the vi editor
If you use the
vi
or
Vim text
editors and wish to have lines automatically wrap to the next line
when you get close to the margin, i.e., the 80th column, rather
than having to hit the
Return key, you can use the
wrapmargin
parameter, e.g.,
wrapmargin=10
.
To enter the command, while not in input mode type
:wrapmargin=
followed by the number you wish to use for the wrap margin.
The wrapmargin parameter is set to an integer number of characters. When set to
any nonzero number, vi will watch the lines that you type in the input modes.
When you get to within the "wraprmargin" number of characters of the 80th
character on the line, the next space character that you type will cause vi to
enter a carriage return for you. This parameter gives vi a word wrap
feature for entering text data. When set to zero, the wrap margin feature
is disabled.
Source:
Unix for Application Developers
by William A. Parrette ©1991, page 320
If you wish to have vi display the current line and column number as
you type, use :set ruler
. If it is turned on you will see the
current line number and column number displayed at the bottom of the vi window,
e.g., 24,67
if you were on line 24 at column 67. The numbers
will change as you move the cursor whether you are in input mode or
not. You can turn it off with :set noruler
.
Alternatively, you can also use control-G on a Mac OS X system or
Ctrl-G on a Linux system or with Vim on a Microsoft Windows
system, i.e., hit the control, or Ctrl, and G keys
simultaneously to see the current line and column numbers. You
will see something like the following displayed at the bottom of
the window:
"temp.txt" [Modified] line 30 of 34 --88%-- col 32
In the above example, while editing the file temp.txt the cursor
was on line 30 of the 34 lines in the file and was at column 32 when I
hit control-G. Since 30 is 88% of 34, the cursor was at a point 88
percent of the way through the file. Each time you hit control-G,
the status information will be displayed for the current line and column
when you hit the key combination.
With vi on a Mac OS X or Linux system, you can also use
!}fmt
when not in input mode, to automatically wrap the text in
a paragraph so that a line doesn't exceed column 80 in that paragraph from the
point where you enter that command.
[/software/editors/vi]
permanent link
Wed, Dec 02, 2015 10:51 pm
Using networksetup for Wi-Fi networks on OS X systems
On a Mac OS X system, you can check on the status of a wifi connection using
the
wifi icon at the top of
the screen. If you wish to check the status of a wifi connection from
the command line, you can use the
networksetup
utility provided
with the operating system. The command has a lot of options suitable for
viewing the status of a wifi connection and managing wireless connectivity.
You can view the available wireless networks, switch from one wireless network
to another, power the wireless connection on and off, etc. using options
supported by the command.
[ More Info ]
[/os/os-x]
permanent link
Tue, Dec 01, 2015 11:06 pm
Finding and Using a Google Voice Number
I use my personal cell phone for work purposes as well, since I don't want
to carry two cell phones. I have the phone's number registered with the
U.S. government's
National
Do Not Call Registry. Unfortunately, though, that has not stopped all
telemarketers from calling. Since I can't know the phone number for everyone
who may call me for work-related purposes, I can't choose to ignore incoming
calls based on whether I recognize the incoming number and often
telemarketers
spoof calling numbers, so that, for instance, if you have a phone number
that is 555-555-5555, the telemarketer will spoof the number from which calls
are being placed so that you see a similar number as the calling number, e.g.,
555-555-5566, which may lead those called to assume the caller is someone
local that they may know.
When I'm working I don't want to be interrupted by telemarketing calls,
requests for donations, political spiels, etc. So I registered for a
Google Voice number, which provides me with another phone number that I
can provide to businesses or other entities that I believe may possibly
sell my phone number to others or call me when I don't want interruptions
because I'm working on something I need to focus on. Through the Google
Voice webpage, I can configure the settings for the phone number provided
by Google to automatically forward calls and text messages to the Google Voice
number to my mobile number or stop the forwarding of calls and texts to the
mobile number. When calls/texts aren't forwarded, callers can leave voice
messages, which you can listen to through the Google Voice webpage or
from email in your inbox. You can also view text messages the same way.
E.g., I wanted to check on refinancing my mortgage through LendingTree
which required I provide a phone number at the website. I didn't want to
provide my mobile number for fear I might start receiving a large number
of calls when I'm trying to work. I don't want to turn off the phone, at
such times which would mean I might miss work-related or calls or texts
from family members. And I can't be certain that my phone number won't be
sold to many telemarketers increasing the number of annoying telemarketing
calls I receive. So I provided the Google Voice number. If at some point
in the future I find I'm receiving a large number of unwanted calls to
that number, I can just delete that number from my Google Account.
The process for obtaining a Google Voice number, which is free, is
fairly simple.
[ More Info ]
[/network/web/services/google/voice]
permanent link
Privacy Policy
Contact