newspaint

Documenting Problems That Were Difficult To Find The Answer To

Category Archives: Uncategorized

How to Redirect Stderr From Executable in PowerShell 2.0 Without Line Breaks at Console Width

So you think PowerShell is flexible and useful and you go to redirect output from an external command to a file. You’ll parse this file later. But when you do you are horrified to find line breaks inserted in the middle of lines in the file… at the width of the console in which your PowerShell session was running.

The problem is that PowerShell is so smart that it unhelpfully inserts line breaks in all output at the current console width.

There are a few suggested answers to this including adding a -Width parameter to Out-File, but this doesn’t solve the issue for stderr redirects.

The solution was found in this post. Simply put, run your external command through cmd.exe and redirect from there!

To ensure the redirect operator is passed to cmd.exe escape the angle bracket with a backtick.

cmd.exe /C wget.exe -O - http://www.google.com/ 2`>stderr.log

Installing OpenRA on Xubuntu 14.04

I had to run the following command after downloading the OpenRA deb file:

sudo apt-get install libsdl2-2.0-0 mono-runtime mono-runtime-sgen liblua5.1-0 mono-runtime-common mono-gac mono-4.0-gac libmono-corlib4.5-cil libmono-security4.0-cil cli-common libmono-system4.0-cil libmono-system-core4.0-cil libmono-system-drawing4.0-cil libmono-system-data4.0-cil libmono-system-numerics4.0-cil libmono-system-runtime-serialization4.0-cil libmono-system-xml-linq4.0-cil libmono-posix4.0-cil libmono-data-tds4.0-cil libmono-system-configuration4.0-cil libmono-system-enterpriseservices4.0-cil libmono-system-transactions4.0-cil libmono-system-xml4.0-cil libgdiplus libmono-system-security4.0-cil libmono-i18n4.0-all

Thunar and Ristretto on Xubuntu 14.04 Do Not Render Thumbnails

I was puzzled and searching all over the Internet for an explanation why the file explorer (Thunar) and the image viewer (Ristretto) were not displaying thumbnails for JPEG files. I know they had rendered them before. I tried all sorts of things, deleting local cache (~/.thumbnails/* and ~/.cache/thumbnails/*), ensuring various packages had been installed.

Finally I stumbled across this forum post which gave the necessary clue:

A package called tumbler is needed for thunar to automatically generate thumbnails.

I checked to see that I had tumbler:

~$ dpkg -l |grep tumbler
ii  libtumbler-1-0  0.1.30-1ubuntu1  amd64  library for tumbler, a D-Bus thumbnailing service
ii  tumbler         0.1.30-1ubuntu1  amd64  D-Bus thumbnailing service
ii  tumbler-common  0.1.30-1ubuntu1  all    D-Bus thumbnailing service (common files)

Then I checked to see if a tumbler process was running, and proceeded to kill it:

~$ ps fax |grep tumbler
21322 ?        SNl    0:01          \_ /usr/lib/x86_64-linux-gnu/tumbler-1/tumblerd
~$ kill 21322
~$ ps fax |grep tumbler
~$

or…

~$ killall tumblerd

Now when I opened a thunar file explorer the thumbnails were being rendered, and also rendered in ristretto, too.

Monopoly Deal Sort Order

From a new pack the cards are (bottom face down to top face down):

* (Brown) Old Kent Road
* (Brown) Whitechapel Road
* (Light Blue) Euston Road
* (Light Blue) Pentonville Road
* (Light Blue) The Angel, Islington
* (Purple) Northumberland Avenue
* (Purple) Pall Mall
* (Purple) Whitehall
* (Orange) Bow Street
* (Orange) Marlborough Street
* (Orange) Vine Street
* (Red) Fleet Street
* (Red) Strand
* (Red) Trafalgar Square
* (Yellow) Coventry Street
* (Yellow) Piccadilly
* (Yellow) Leicester Square
* (Green) Bond Street
* (Green) Oxford Street
* (Green) Regent Street
* (Rich Blue) Mayfair
* (Rich Blue) Park Lane
* (Black) Fenchurch St. Station
* (Black) Kings Cross Station
* (Black) Liverpool St. Station
* (Black) Marylebone Station
* (Pale Green) Electric Company
* (Pale Green) Water Works
* (Brown/Light Blue) Property Wild Card
* (Light Blue/Black) Property Wild Card
* (Purple/Orange) Property Wild Card
* (Purple/Orange) Property Wild Card
* (Red/Yellow) Property Wild Card
* (Red/Yellow) Property Wild Card
* (Green/Rich Blue) Property Wild Card
* (Green/Black) Property Wild Card
* (Black/Pale Green) Property Wild Card
* (Rainbow) Property Wild Card
* (Rainbow) Property Wild Card
* Deal Breaker
* Deal Breaker
* Forced Deal
* Forced Deal
* Forced Deal
* Sly Deal
* Sly Deal
* Sly Deal
* Just Say No
* Just Say No
* Just Say No
* Debt Collector
* Debt Collector
* Debt Collector
* It's My Birthday
* It's My Birthday
* It's My Birthday
* Double Rent
* Double Rent
* House
* House
* House
* Hotel
* Hotel
* Pass Go (x10)
* (Brown/Light Blue) Rent
* (Brown/Light Blue) Rent
* (Purple/Orange) Rent
* (Purple/Orange) Rent
* (Red/Yellow) Rent
* (Red/Yellow) Rent
* (Green/Rich Blue) Rent
* (Green/Rich Blue) Rent
* (Black/Pale Green) Rent
* (Black/Pale Green) Rent
* (Rainbow) Rent
* (Rainbow) Rent
* (Rainbow) Rent
* Bank 1M (x6)
* Bank 2M (x5)
* Bank 3M (x3)
* Bank 4M (x3)
* Bank 5M (x2)
* Bank 10M