Functional Programming Rules

  • Variables don't vary.
  • Don't use global variables or global constants.
  • Don't iterate. Use a higher order functions.

Repair a PDF Which Doesn't Fit the Paper

I downloaded a PDF book. It looks like someone added a footer to each page of the original, and that pushed the content up on each page so that the first half inch of each page's isn't visible.

I fixed the PDF by:

  • Downloading and installing the brew (homebrew) package manager. (I use a Mac.)
  • Running "brew install ghostscript".
  • Running

    gs -sOutputFile=output.pdf -sDEVICE=pdfwrite -sPAPERSIZE=a4 -dCompatibilityLevel=1.4 -dNOPAUSE -dBATCH -dPDFFitPage input.pdf

Getting Started With Clojure (On a Mac)

Note: I don't give choices here. If you're a beginner, you don't know enough to choose an option. Sometimes choice is a bad thing because it overwhelms.

To-do Again (October 2015 Edition)

I'm revising my to-do process again. My employer cancelled its full-time work-at-home program, so I need to use web-based tools, so I can get to them from work and home.

Some givens:

Mouse Wakes Windows 7 Even Though Allow this device to wake up the PC is Unchecked

I have a computer that wakes from sleep when the mouse gets jiggled. The mouse is so sensitive that it gets jiggled when someone walks across the floor.

I went into Device Manager and I cleared the checkbox for "Allow this device to wake up the PC" on the mouse device, and that didn't help.

It is a Logitech wireless mouse, and it added a second keyboard device, in addition to the "HID-compliant mouse" device. You have to disable wake for both the mouse device and the faux-keyboard device.

My Bear Story

I was 19. I had saved up enough money to buy some decent equipment (for the time). I headed off into the Smokies for a 5-day solo trek.

My first bear sighting was on the trail to Mt. Sterling. It was crossing the trail 100 feet ahead of me. I pause briefly while it wandered off. It was a cub, so that made me nervous about mamma's location.

My Big Backpacking Trip of 2015

I'm planning a multi-day trek on the southern Appalachian Trail for sometime in September.

I haven't been backpacking in a while, so I need to refresh/replace some equipment. My kids and my wife have pretty much quit camping, so I'll be buying equipment to support solo trekking.


apache - Unable to delete virtual host

I have an apache server. It supports multiple sites (different domain names). I went into the apache.conf and the sites-enabled directory, and deleted one of my virtual hosts. I restarted apache. It kept on serving the deleted host.

Android File Transfer Does Not Work - Reports Android Device Not Found

Android File Transfer will not "see" your phone when you plug in the USB cable unless you unlock the phone (e.g. by entering your PIN).

Then you will also need to pull down the notifications list, tap on the "USB for charging" notification, and change it to permit file transfer.

7zip Warning: Access is denied

I tried to backup my C:\Users\username folder, using 7zip. I started getting lots of warnings on folders like:

  • c:\users\username\AppData\Local\Application Data\
  • c:\users\username\AppData\Local\History\
  • c:\users\username\AppData\Local\Temporary Internet Files\

They are all symlinks, and not real directories. Apparently, 7zip cannot back up the link. Nor is there a way to tell it not to try.

So as a rule of thumb, ignore the warnings.


Subscribe to Input Jam RSS