gpg signed git commits

To enable git to sign commits we must configure the key to be used for signing. This can be accomplished by editing ~/.gitconfig

[user]
         name = Matt Kowalczyk
         email = matt.kowalczyk@gmail.com
         signingkey = A53C8900B710D91F

Also, if you have both gpg and gpg2 installed on your system, you may need to force git to use a specific program to perform the signing. In my case, I needed to use gpg2 and this was accomplished by appending the below to ~/.gitconfig,

[gpg]
         program = gpg2

With these changes, we’re now able to sign commits and tags and also verify these signatures. For instance,

$ git add foo.txt
$ git commit -S -m "initial commit"
 [master (root-commit) 7f5db95] initial commit
  1 file changed, 1 insertion(+)
  create mode 100644 foo.txt
$ git log --show-signature
 commit 7f5db95d63f68813df4229835ca6b775dbe1b5ac
 gpg: Signature made Sat 08 Jun 2019 07:51:46 PM PDT using RSA key ID 951E6431
 gpg: Good signature from "Matt Kowalczyk matt.kowalczyk@gmail.com" [ultimate]
 Author: Matt Kowalczyk matt.kowalczyk@gmail.com
 Date:   Sat Jun 8 19:51:46 2019 -0700
 initial commit

Notice the use of --show-signature. The git-scm shows various other ways of useful git commands related to signing. For instance,

$ git merge --verify-signatures -S <BRANCH>
$ git rebase -S

facebook’s invitations a violation of privacy

I don’t care much for marketing, be it guerrilla, word-of-mouth or viral or whatever. In every case, it’s always a been thief of my time. The reason I mention it is that I was a recent victim of the viral marketing time thief and worse a victim of privacy violation on facebook.

In one such viral campaign, a facebook friend was obviously tricked into spreading a company’s facebook event invite to a not so much “event” but a campaign poster. What an interesting media, I thought.

In response, my viral marketing antibodies engaged and I immediately began searching for the facebook feature to dismiss this annoyance, to erase it from my facebook existence. I was heavily disappointed to find that no matter what decision I make in response to this campaign invite, I will result in being a marketing statistic and worse suffer serious violation of my privacy.

Facebook has been battling the privacy daemon for quite sometime. The most recent have been related to security, and a “Groups” feature resulted in facebook users “talking to lots of people who aren’t on your Friends list at all”, again a serious violation of privacy. It was attempting to dismiss the marketing campaign invite on facebook that I realized yet another violation of privacy within facebook–this time within the event invite feature. The marketing firms are quite aware of this flaw.

Let me explain it. Recipient of a facebook event invitation has three options to respond to such a solicitation: “I’m Attending”, “Maybe”, and “No”. The recipient is of course not forced to answer the question; however, their name will remain in the “Awaiting Reply” bucket of names. Worse, no matter which option is selected, there exists a corresponding bucket, accessibly by anyone, including the solicitors, allowing them to view each persons response to the invite. We then have no choice, but to submit our unsolicited participation as a statistic to the marketing campaigns. This is a major flaw in the facebook event system!

Privacy settings should be granule enough to allow control of every piece of public facing piece of information. This includes my response to unsolicited event invites. Facebook, please fix this flaw.

scanimage(1) command python wrapper

To reduce clutter and improve the efficiency of my home-office, I like to digitize all my “important” documents. To accomplish this task, I use a HP All-in-one scanner, an open sourced document management software called KnowledgeTree, and scanimage(1) from the SANE project.

It turns out that scanimage(1) is a fairly cumbersome command line program to use. I opted to avoid graphical scanning software because I don’t want to be clicking around with the mouse when scanning large number of document sets. It turns out that I use a consistent set of options for all my document scanning purposes. The only options that to vary are the number of pages and whether the document set is single or double sided.

For the longest time, I was very happy with my simple bash script to store my command options to scanimage(1) and I would “manually” set any arguments (e.g. number of pages). This worked pretty well for single sided documents. After some time, I finally had it with the headache of modifying the command options manually when I wanted to scan double side documents and decided to write a python script that would wrap all this knowledge into a script. I call my script scan_pages.py. It has very simple usage:

scan_pages.py [-d | –double] total-pages

The script does three things. First, it manages the “–batch-count” and “–batch-start” command line options depending upon the parameters of the scan job. Also, it automatically calculates the number of pages that are to be scanned for a two-pass double sided scan job. It is only required to specify the ‘-d’ flag and the total number of pages, both front and back, that are to be scanned. Lastly, the script will use the convert(1) command to trim any whitespace contained in the image that is not part of the original document.

If you use scanimage(1) you may find this script helpful. Let me know if you like it. You may download it here.

Jim Cramer raises Apple (AAPL) target price!

In today’s episode of Jim Cramer’s Mad Money, Cramer has raised the target price of Apple (AAPL) to $264. This article has a great recap of the todays episode. Cramer states that the FASB is proposing a change in a revenue recognition standard such that it will dramatically increase Apple’s reported earnings. Thus, making the stock appear cheaper than it currently is, even though Apple’s financial position has not changed.

This episode has been bothering me all day because of the fundamental error in Jim Cramer’s arguments. He made two points to justify his recommendation 1) The accounting change will increase Apples P/E ration thus making it appear it’s financial position has strengthened and 2) Investors are going to ignore the accounting change.

However, I doubt it. Though there are many ways that a stock’s price can be calculated, it is fundamentally the present value of the future cash flows. One does not have to be a hedge fund manager to see that an accounting change does not increase the future value of cash flows. Secondly, as Cramer pointed out, Apple’s Statement of Cash Flows has already recognized the cash flow from the sales of Apple’s products and investors do not ignore this important financial statement.

I would think that this revenue has already been priced in Apple’s stock.