Thursday, April 25, 2019

How to print photos from text messages on android

The trick was to figure out how to save the photo from the text message, then it was possible to print it from the gallery app.

The process on my phone was a little bit different than as described in this link, but the hurdle was solved by the realization that I tap and hold on the photo to select it. In my case, the "save" option was in an ellipsis drop-down menu that would appear instead of appearing as a save icon when the photo was selected. https://www.techbout.com/save-photos-mms-message-android-phone-13066/

Tuesday, April 23, 2019

Beagle Bone Links from old phone

These are some open tabs from when I was trying to get the BeagleBone configured to talk to an external HDMI monitor.

List of common resolutions:
https://en.m.wikipedia.org/wiki/List_of_common_resolutions

Why is there no info in this wiki page anymore about the LCD7?
https://elinux.org/CircuitCo:BeagleBone_LCD7

A fascinating forum thread about which resolutions the BB supports and why. The BB guy who seems to always be answering questions on this forum put in a tantalizing message "just wait".
https://groups.google.com/forum/m/#!topic/beagleboard/4vge3Zs8dYE



The elusive Jeffery Briscoe

Finally found him, but man that must have been a long time ago.
https://www.usphonebook.com/jeffrey-briscoe/UADM3gjNwYDMxgDM5cDOwADN5MzR

Jeffrey Briscoe, Age 65

Current Address:

8113 51st Ave; College Park, MD 20740-2516

Phone Number:

(301) 408-6392 - Wireless

Prior Addresses:

15209 Orchard Farm Pl; Upper Marlboro, MD 20774-9040
7648 Elioak Ter; Gaithersburg, MD 20879-4531
57th Ave; College Park, MD 20740
813 51 St; College Park, MD 20740

Prior Phone Numbers:

(301) 345-2436 - LandLine
(301) 787-2277 - Wireless
(240) 381-3055 - Wireless
(301) 523-0383 - Wireless
(301) 474-7541 - LandLine
(301) 474-3421 - LandLine

Relatives:

Benjamin Brisco

Janice Briscoe

Pearl Briscoe

Shayla Briscoe

Associates:

Sheila Hudson

Email:

mjmbris@aol.com


One caller from a fake Silver Spring number claimed to be calling about "A real estate matter"

The area code (667) 444-5* calls are apparently unassigned VOIP numbers.

During a call from one of those numbers today the caller claimed to be from Virtuoso Sourcing Group, which is easily findable online as a debt collector. A good number of the links are to lawyers offering to help people being harassed by the collector!

Friday, April 12, 2019

Add folder name to file name linux

I had a bunch of misnamed files throughout a directory tree that I had to fix the names of to have a common prefix with the name of their folder appended. Actually it was the name of a folder two levels up.

Theoretically a single-line 'find' command with the right -exec should be possible. However, encapsulating an awk script within a mv command hanging off of find, even with xargs proved to be too tricky, and I ended up just creating an echo statement with the mv commands and then taking the echoed output and putting it into a shell script.

Here is the final find-xargs-awk command line which generated the stdout that I pasted into my shell script. In this case, the original files are in ./$TL/$SL/ and $TL is a date code and I wanted to find the oldfile which had the wrong date code on the front and rename it to a new file prefix with the desired datecode on the end:
find . -name "*oldfile.csv" | xargs -I '{}' echo {} | awk -F'/' '{SL = NF-1; TL = NF-2; print "mv " $FILENAME "./" $TL "/" $SL "/newfile_" $TL ".csv"}'

Here are some relevant links turned up during researching this:

Here's a super simple example of using find to rename files. The commenter here likes xargs too much when it's unnecessary: https://unix.stackexchange.com/questions/227662/how-to-rename-multiple-files-using-find
I tried using SED to split up the directory path but it's way too hard to get it to treat slashes as delimiters, plus the result keeps the delimiter for some reason: https://stackoverflow.com/questions/16643288/sed-to-extract-text-between-two-strings
Still trying to get sed to work, here is a nice comparison of the same task with parentheses in different languages: https://unix.stackexchange.com/questions/108250/print-the-string-between-two-parentheses
Here is an example that is a lot of what I needed with my two directory levels, but aside from generally reminding me how to use awk I didn't end up stealing a lot of this: https://unix.stackexchange.com/questions/277231/how-to-get-second-directory-name-in-the-perforce-file-path
Here is the example that I stole most of my awk code from. It has several great examples, including using a for loop (which turned out to be largely unnecessary for me) and the kint of using the built-in swk variable FILENAME. https://unix.stackexchange.com/questions/134212/extract-file-name-from-path-in-awk-program
Here is where I got the other part of my awk code using the NF built in variable. The example is in a for loop but I was able to do the same thing with find and xargs: https://stackoverflow.com/questions/643372/append-name-of-parent-folders-and-subfolders-to-the-names-of-the-multiple-files
Here is an example of a super fancy xargs command with find: https://stackoverflow.com/questions/10972002/batch-renaming-files-in-command-line-and-xargs
Here is an example where somebody was just not doing xargs correctly, and the answers eventually converge on just using the -exec feature of find: https://unix.stackexchange.com/questions/90886/how-can-i-find-files-and-then-use-xargs-to-move-them
Here is another example of a for loop for somebody that is trying to do something remarkably similar to what I want to do, but these examples weren't actually very helpful: https://superuser.com/questions/516082/add-folder-name-to-beginning-of-filename



Saturday, April 6, 2019

Gifts of stock form 709

Basic info about 709. The $14K limit. The trick of husband and wife donations, the way that gifts are counted against estate taxes:

https://www.fool.com/investing/general/2015/10/03/form-709-do-you-need-to-file-a-gift-tax-return.aspx

So the giver has to pay the taxes on gifts?

This link seems to indicate as such by listing the one case where the recipient has to pay the gift tax. Also gifts to pay tuition are excluded from being taxed! Also the fines for not paying the gift tax on time are very severe.

https://finance.zacks.com/dont-file-gift-tax-return-8338.html

This link spells almost all of the above out with exceptional clarity:

https://www.thebalance.com/when-to-file-gift-tax-return-3504960

This link precisely described how Doris filled out her form 709s.
It then says: "If the stock pays dividends, you will receive the dividends after the transfer and pay tax on them.",
and "If you sell the stock, your gain will be based upon what your father paid for the stock and not what it was worth when he gave it to you."

https://www.calcpa.org/public-resources/ask-a-cpa/tax-tips/general/how-will-a-gift-of-stocks-affect-my-taxes

Here surrounded by fluffy introductions of the basic concepts is the exact formula that I will have to use to calculate our capital gains tax using the basis:

https://www.moneycrashers.com/gift-tax-rate-rules-exclusion-limit/

A super interesting distinction laid out here is that the value of the gift is the value of the stock at the time given, but the capital gains tax is on the basis.

https://www.schwab.com/resource-center/insights/content/how-to-value-a-gift-of-stock

This link is more about regular stocks, but with so much delicious rules info, like weird gaps in the basis and long-term and short-term tax rates:

https://www.edwardjones.com/social/gifted-stock.html

But wait! What about "Items affecting basis"? Uh oh, this was an S corporation and the basis changes!

https://www.journalofaccountancy.com/issues/2012/jan/20114319.html

This answer from Turbo Tax seems to fully describe the algorithm for computing basis. Could it be true that income, on which I have already paid taxes, increases the basis????
https://ttlc.intuit.com/questions/4289459-how-do-i-calculate-the-basis-for-my-shares-of-an-s-corporation-that-was-sold


The answer is in this beautifully written analysis: YES! But this doesn't result in double taxes! By adding income to the basis, the taxed income is effectively subtracted from the capital gains tax!:
https://www.forbes.com/sites/anthonynitti/2014/05/06/tax-geek-tuesday-determining-a-shareholders-basis-in-s-corporation-stock-and-debt/#6c8dd08e5268


But wait, if that is the case, then is the income is reducing the tax on the initial value of the stock gift? I think this is just sign confusion. The income *adds* to the basis, which is subtracted out of the capital gain at the time of sale. Also a review of the form 709's seems to call into question whether we paid the taxes on the initial gifts, since they seem to be above the maximum untaxable value?

I found the above analysis almost verbatum right in an IRS page (fairly, this cribbing was mentioned in the analysis):
https://www.irs.gov/businesses/small-businesses-self-employed/s-corporation-stock-and-debt-basis

Here is a tax group's worksheet for calculating one year's worth of basis adjustment:

http://www.thetaxbook.com/updates/TheTaxBook/Client%20Tax%20Tools/S_Corporation_Shareholders_Adjusted_Basis_Worksheet.pdf

Here is a different tax group's explanation of the basics for computing basis and their slightly less nice worksheet for calculating one year of basis adjustment:

https://irp-cdn.multiscreensite.com/f58c8f33/files/uploaded/S-Corp_Shareholder_Basis.pdf

Here is an official worksheet straight from the PA dept of revenue, with instructions specific to their weird K1 form:

https://www.revenue.pa.gov/FormsandPublications/FormsforBusinesses/Partnerships-S-Corps-LLCs/Documents/rev-998.pdf

It looks like my situation is that at the time of the gift, the fair market value was way below the basis. The basis continued to increase over time. The final sale price is still way below the basis.

This link seems to pretty clearly describe the consequences of the basis being greater than the fair market value at the time of the gift, and the final sale price being between the basis and the original fair market value. Do I have a net capital gain of zero? : https://budgeting.thenest.com/fair-market-value-basis-tax-treatment-gift-24602.html

Here is the exact same information in an IRS document, except that troublingly it omits the one case that seems to apply in my case, neither a gain or a loss: https://www.irs.gov/faqs/capital-gains-losses-and-sale-of-home/property-basis-sale-of-home-etc/property-basis-sale-of-home-etc

This article again describes the basis-fmv-sale price gap, although interestingly with different language. Still no attribution to applicable tax law. https://corporate.findlaw.com/finance/tax-basis-of-inherited-and-gifted-property.html

This IRS page doesn't describe my situation, but it starts with what forms are required, so I will probably be able to look into those specific forms to fill in my numbers. The rest of the article is about brokered stocks and debt instruments: https://www.irs.gov/businesses/small-businesses-self-employed/cost-basis-reporting-faqs

Here is the famous Publication 551 on the subject of cost basis, hopefully with all the details which cover my situation.
Oddly it does little more than other articles in terms of describing the case of no gain and no loss; you'd think that there would be a form on which this should be specifically reported: https://www.irs.gov/pub/irs-pdf/p551.pdf

If the computation of the capital gain or loss is simply a matter of basis, fair market value, and sale price, why does my last K1 have additional boxes filled in which were never had values reported on previous K1's? There's a value in section 8a, Net long term capital gain (loss) which unexpectly shows a positive if low value, and the mysterious sections 8c Uncaptured sec 1250 gain and 9 Net section 1231 gain (loss). Starting to search for the meaning of these entries.

The IRS publication on the K1 form is brimming with amazing information and I haven't even gotten to the part about sections 8 and 9 yet. It even has a huge section on computing basis including links to finally an official IRS worksheet for computing basis. It states exactly where to report the numbers for boxes 8a, 8c and 9 on tax forms and has some helpful information about what they mean.: https://www.irs.gov/instructions/i1120ssk

1250 Gain links:

Here's a description in fairly plain english of Unrecaptured Section 1250 Gain. Apparently our property is depreciated? And it's assuming that our basis is less than was report on form 709?
https://www.investopedia.com/terms/u/unrecaptured-1250-gain.asp
Here is an even plainer description, complete with examples involving rental houses. The mystery in this description is how it says that the section 1250 gain is a tax on the purchase price of the house after sale of the house, while still talking about the capital gain tax also. https://finance.zacks.com/unrecaptured-1250-gain-9659.html
Here is a much more technical article, although it does seem to have an example which almost perfectly matches my own. This article mentions the Unrecaptured Section 1250 Gain Worksheet in the Schedule D instructions that was also mentioned in the IRS K1 instructions: https://www.taxcpe.com/blogs/news/recaptured-and-unrecaptured-real-estate-rental-section-1250-gain
This appears to be a link to the IRS Unrecatpured Section 1250 Gain Worksheet? https://taxmap.irs.gov/taxmap/ts0/unrecapturedsectio_o_24a36bb4.htm

1231 Gain links:
Apparently 1231 is tax speak for business property. Here is a basic description from the point of view of a small business owner:
http://loopholelewy.com/loopholelewy/15-selling-your-business/selling-your-business-12-sec1231.htm
This answer seems frustratingly incomplete. It references other gains unrelated to 1231 but does mention where to report the number on the Schedule D:
https://ttlc.intuit.com/questions/3856828-i-have-a-large-gain-on-my-k1-form-net-1231-gain-is-all-this-gain-taxable
More background information on 1231 and how it relates to 1250 and 1245 (the latter doesn't apply to us for some unclear reason):
https://www.investopedia.com/terms/s/section-1231.asp

More info for various tax forms:
Here are the IRS instructions for Schedule D. This directly applies to my returns: https://www.irs.gov/pub/irs-prior/i1040sd--2018.pdf#page=14
Schedule D supposedly requires that all stock sales be recorded on form 8949, but the instructions for form 8949 imply that it contains info tranferred from a form 1099-B or 1099-S, Neither of which I received: https://www.irs.gov/forms-pubs/about-form-8949
More about 8949. The language sounds a lot like sales of stocks in an S-corporation: https://www.investopedia.com/terms/f/form-8949.asp
These instructions for 8949 seem to spell it out; they say that I must use Schedule D only, and the corporation itself files 8949, I think: https://www.irs.gov/pub/irs-pdf/i8949.pdf
This TurboTax faq seems to imply that TurboTax will report info from the K1 on the 8949 as well as the Schedule D. This kind of confident sounding answer makes me wish that I was using TurboTax instead of H&R Block: https://ttlc.intuit.com/questions/3069162-where-do-i-report-the-sale-of-my-partnership-interest-in-an-s-corporation

Searches of reporting sales of S-corp stock often result in links that explain it from the point of view of the corporation itself. These are very interesting behind-the-scenes clues about why my K-1 might be looking the way it does:
https://info.legalzoom.com/record-s-corporation-stock-sale-23128.html
https://www.upcounsel.com/sale-of-s-corp-stock
http://www.scorporationsexplained.com/shut-down-an-s-corporation.htm
This article is so specifically talking about "liquidation" which is my scenario that it must be relevant to my case. The article mentions two IRS code sections that I've never seen mentioned before (331 and 1000), has a couple of fairly concrete examples, and then goes into better alternatives for doing liquidation: https://www.thetaxadviser.com/issues/2008/apr/understandingthetaxconsequencesofliquidationtoansshareholder.html

Final desperate searches for what is up with my K1 eventually led me to just go for the extension:

This answer about a "Final K1" insists that there should have been a 1099-DIV. No other source maintained this position so I think that this might have actually been a wrong answer, but it made me nervous.
https://ttlc.intuit.com/questions/4611573-final-k-1-after-dissolution-of-s-corp-how-to-enter-basis

Final step was to request extensions:

Here is the link from Maryland saying that the extension is automatic in the event of a federal extension (and MD taxes will be a refund): https://taxes.marylandtaxes.gov/Individual_Taxes/Individual_Tax_Types/Income_Tax/Filing_Information/Filing_Deadlines/Extensions_and_Amendments/Request_an_Extension.shtml










Friday, April 5, 2019

Copy files using find, dirname

I wanted to find files that existed in several but not all branches of a directory tree and make a copy of each file within its directory to a new (constant) filename.

The key was in using the magical -execdir option to find rather than just -exec.

Info on dirname and basename: https://stackoverflow.com/questions/2536046/extract-directory-path-and-filename

This StackExchange answer provided the key information which is that dirname wasn't going to help me because it is evaluated before find! Also the backwards quotes for using the evaluation of a command inside a command line. https://unix.stackexchange.com/questions/339880/cp-not-evaluating-dirname-properly-in-find-operation?rq=1

Here are some harder ways to do it with xargs: https://stackoverflow.com/questions/17368872/how-to-move-or-copy-files-listed-by-find-command-in-unix

My final command line:
find . -name "Prefix*.txt" -execdir cp -p `basename {}` newfilename.txt \;

Tuesday, April 2, 2019

April 2019 diversions

Politics:

A detail-rich history of the defeat of ISIS by the Kurds:
https://www.newyorker.com/news/dispatch/how-trump-betrayed-the-general-who-defeated-isis?fbclid=IwAR3DC9LYZQQP_2rgyLSkBofQiOrf1jnoPxqj7lgjvCrO_CUZJlcDfYmiHfw

Bad headline, odd for The Root. Story is about how Muller report gives extensive details on Russian misinformation ops during the 2016 election, including impersonation of liberal activists. Nothing not already known but now it's in the report.
https://www.theroot.com/mueller-report-reveals-how-black-activists-white-tears-1834150537?utm_medium=socialflow&utm_source=theroot_twitter&__twitter_impression=true&fbclid=IwAR2_o0lQPZ3F7S4_6KeSUa2y4VWBeiK50PbUjR6PxQ3cQ8Z-l2ZVBVsjZxU

Weird Nixonesque corruption at the state level:
https://www.king5.com/mobile/article/news/local/spokane-county/lawmakers-respond-to-explosive-allegations-against-rep-matt-shea/293-34ec3bd6-5046-48f8-9655-fa2fa23c4ad3?fbclid=IwAR1VUoQVcZkBposSNxtcQhoyAdO0An4A_Q9EQZYs3extekl3E0GPgJ6rU-s

Why did I spend so long reading this long article about the bad actors in Parkland?
https://www.huffpost.com/highline/article/parkland/


Best links ever:

The eclipse video from Columbia SC:
https://m.youtube.com/watch?v=kPgLK3ASHUQ

Sim Gretina These Lumps:
https://m.youtube.com/watch?v=ae4QxCmNaNo

Sim Gretina Inside And Out:
https://m.youtube.com/watch?v=TcUxaiZJGqU



Other interesting comics advertised on Gifts of Wandering Ice:
Middleways: I've seen this before, I think it's a spy/fantasy combination, fairly good art with some pretty rough edges: http://www.comic-rocket.com/read/middleways/1
Just Another Day: lovingly drawn fantasy artwork that became too difficult to do as a comic and is now an illustrated story: http://www.comic-rocket.com/read/just-another-day/1
Fragile, a mastery of manga art style so perfect that it is indistinguishable from any other similar comic: http://www.comic-rocket.com/read/fragile/1
Out Of Time: A completely gorgeous website design for a comic with such rough art that I'm not sure I can read it. But I have to respect the artist for making it happen. http://www.comic-rocket.com/read/out-of-time-3/1
UNEARTH. Let's see what this classic has been up to recently: http://www.comic-rocket.com/read/unearth-a-retro-sci-fi-graphic-novel/1
Ha ha blocked by GSFC for being marked as "gaming". The ad for this so cleverly mocked the comic's own art that I have to check this out later: http://www.comic-rocket.com/read/mischief-in-maytia/1
Retroblade, a super-polished sci-fi time travel mystic crystals adventure with fun tech and characters. Too bad it seems to be on infinite hiatus: http://www.comic-rocket.com/read/retroblade/1



Diversions:

A video of starting a 1911 race car. The video is 9 minutes of agonizing fiddling, but from the comments I learned that what is being done is priming the engine and then hitting a "tremblor" button to produce a single spark to get the whole thing running. The car has been insanely over-restored; everything is clean and gleaming chrome:
https://www.youtube.com/watch?v=xMa3_tT5mKA
The soil used to bury the Terra Cotta Army perfectly preserved their bronze weapons. Note the 4 month test compared to the effects of the same test using British soil!
https://arstechnica.com/science/2019/04/heres-the-real-reason-why-terracotta-army-weapons-are-so-well-preserved/?fbclid=IwAR3o3TgMu9EvjKfPfyKN9Bm-5LF1PI3c8gvzQLuOGAUw0tOaoDlAZcgAZUI
The fix for "your security settings do not allow you to download files from this location". Download options setting in IE: https://support.avg.com/SupportArticleView?l=en&urlname=Your-current-security-settings-do-not-allow-this-file-to-be-downloaded-in-Internet-Explorer

Another mind-bogglingly pristine Egyptian tomb discovered. It's astonishing that there are any left to discover:
https://www.boredpanda.com/4000-years-old-tomb-discovered-egypt-painted/?utm_source=facebook&utm_medium=social&utm_campaign=BPFacebook&fbclid=IwAR0cWL4miNsXbbNCa7Or671TNtXxnVxHN5C5L18YKO456Pyo85e96ob00E0

A fascinating article about how somebody realized that egyptian statue breakoffs were actually desecration and what it means:
https://www.cnn.com/style/article/egyptian-statues-broken-noses-artsy/index.html

Turns out home inspection is a scam, correlates with my experiences:
https://www.checkbook.org/national/home-inspectors/articles/We-Got-12-Home-Inspections-and-Were-Astonished-at-How-Poorly-Many-of-the-Inspectors-Performed-7029/?utm_source=facebook&utm_medium=social&utm_content=1555600861&utm_campaign=brand_awareness&fbclid=IwAR1pBIKRYgjlkEi9GpXVxiRE9fxXVsHnx13q7mhZIlhQW142gnmX9-22Q3A

There's a rabbit rescue in Columbia that has been operating since 1997?
https://www.friendsofrabbits.org/info/index

I discovered that Jeff Rowland's outlet these days in on Twitter. Man does he tweet a lot:
https://mobile.twitter.com/wigu

The Vikings combed their hair story:
https://scontent-iad3-1.xx.fbcdn.net/v/t1.0-9/fr/cp0/e15/q65/57736431_10157165809970917_5117842476832391168_n.jpg?_nc_cat=102&efg=eyJpIjoidCJ9&_nc_ht=scontent-iad3-1.xx&oh=7af4fcdaecc6208cb8e146e7812b2592&oe=5D7251CA

Raspberry Pi Beowulf cluster misinterpreted by commenters:
https://m.slashdot.org/story/354846

The Yodeller who sued Yahoo. Indie musician gets ripped off by Yahoo, gets a settlement and ends up as practically their employee until the company goes bankrupt:
https://thehustle.co/the-yodeler-who-sued-yahoo/

VI has a wiki page on fandom:
https://vim.fandom.com/wiki/Search_and_replace

The Firestone Primewell tires for the Echo:
https://www.firestonecompleteautocare.com/tires/search-results/
https://www.firestonecompleteautocare.com/tires/brands/primewell/ps830850/95872


Space news:

The destruction of the DM-1 capsule:
https://twitter.com/Astronut099/status/1119825093742530560

A great SpaceX overview video of a falcon 9 typical mission, amazingly still unlisted
https://www.youtube.com/watch?v=Z4TXCZG_NEY

Info about the Bereshet crash. It was the IMU:
https://www.jpost.com/Israel-News/SpaceIL-reveals-preliminary-reasons-behind-Beresheet-crash-587117

The astronautix page about Nova, which is often misrepresented by space nerds. The actual story is much more interesting:
http://www.astronautix.com/n/nova.html