Wednesday, September 14, 2016

An Update On Combining PDF Files

Back on January 19th, 2009, I wrote a blog post about combining pdf files into one.  This is something I do now and again with one of my hobbies.
When I wrote the aforementioned article, I was only doing this on a Linux server.  Since then I have become an avid Mac user, as well as continuing my love and infatuation with Linux.  On Mac, you have a plenty of the Linux utilities you are used to, but some take some searching, and even then they may not exist or be ported.
In my quest to find an easy way on Mac OSx to combine PDF files, I did run across one.  It is called, believe it or not, "Combine PDFs".  I know, simple name, but believe me when I say that this GUI tool is pretty awesome!  You simply select the files you want to combine and it then not only shows you the order it is putting the in, but it also allows you to preview each page.
The tool is installed using brew on Mac.  If you don't have brew, you'll have to either install it.  If you don't use brew, you can always try to find it for download.  But, I recommend using brew as its pretty handy for obtaining and installing software packages you need and that aren't available through the app store.
If you do use brew, you can install it with the following command:
  brew install Caskroom/cask/combine-pdfs
After that finishes, you will see it in your applications list, as it is a GUI based application.


Friday, September 09, 2016

Python pip Broken After Upgrade To OSx El Capitan

Wow its been a long time since I blogged.  I have no excuse other than things have been a touch crazy.  My work recently started allowing us to upgrade our Mac's from Yosemite to El Capitan.  For me the upgrade only took about 45 minutes, which is pretty quick in the grand scheme of things.  The download is a little over 6 gb and went pretty quickly.  

I was going along fine until today when I tried to install a new module using pip.  About 1/2 way through the installation I was presented with the following output:

    In file included from src/lxml/lxml.etree.c:321:
    src/lxml/includes/etree_defs.h:14:10: fatal error: 'libxml/xmlversion.h' file not found
    #include "libxml/xmlversion.h"
    1 error generated.
    Compile failed: command 'cc' failed with exit status 1
    creating tmp
    cc -I/usr/include/libxml2 -I/usr/include/libxml2 -c /tmp/xmlXPathInitf3OxN6.c -o tmp/xmlXPathInitf3OxN6.o
    /tmp/xmlXPathInitf3OxN6.c:1:10: fatal error: 'libxml/xpath.h' file not found
    #include "libxml/xpath.h"
    1 error generated.
    Could not find function xmlCheckVersion in library libxml2. Is libxml2 installed?
    Perhaps try: xcode-select --install
    error: command 'cc' failed with exit status 1
Command "/usr/bin/python -u -c "import setuptools, tokenize;__file__='/private/tmp/pip-build-9IduXA/lxml/';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record /tmp/pip-RgavmY-record/install-record.txt --single-version-externally-managed --compile" failed with error code 1 in /private/tmp/pip-build-9IduXA/lxml/

I had installed other modules last week, but then I realized that that was prior to my upgrading.  I looked at the above output and noticed the line:

     Perhaps try: xcode-select --install

OF COURSE!!!  Although I upgraded, and XCode had been upgraded to, I still needed to do some things with XCode to get things going again.  First, I opened XCode and went through its initial startup after an upgrade.  A bunch of clicking and things were good there.  I then opened up my command line and, prefixing the command with 'sudo', I ran the 'xcode-select --install' command from above.  This presented me a pop-up window to install tools.  So, I accepted and allowed it to install.  Once finished, I tried my pip module installation again and VOILA!!!!  It worked!!!

So, in this lesson, always make sure to update your XCode and xcode-select before moving on after an upgrade.

Wednesday, February 10, 2016

Where Is All My iPhone Space???

So recently my work upgraded my iPhone to an iPhone 6.  In preparation for this, I plugged in my old phone and offloaded all of my photos.  I made sure to delete them so the phone was cleaned off (as I always did.   To my amazement though, when going into iTunes, I noticed that there was still about 2Gb of space used up by photos.

I navigated over to Photos on my phone and there was nothing.  I had emptied out all my stuff.  I did a search and something said to turn off photo synching in iTunes.  I remember I had done that a while ago, but checked it and sure enough, it was off.

So, a bit more digging and I discovered that apparently, there is an 'issue' (I call it that, but Apple may call it a feature), where there are deleted files that are hidden and not visible, remaining on your phone.  You cannot see them or find them..... so you think.    Time to have some fun.

If you would like to clean these hidden pictures off of your phone, do the following:

- go to Settings-> General -> Date & Time
- Uncheck "Set Automatically" and then set the date to August 1st, 2014 (I don't know why, its a magical date apparently.

After you have done that, get out of settings and open Photos.  You should now see a bunch of items in the deleted folder. Voila!! Your hidden photos that you have probably already offloaded to your laptop.

I don't know why Apple hides them, but I really wish one of their developers would look at this issue and make the phone do the right thing.  Our phones need space, not things we deleted taking up said space.

All you need to do with the deleted items is go into the folder, touch "Select" and select all items and then click 'Delete' and they will be gone...... Space recovered.  After that, go back to the Date & Time above and turn back on Set Automatically and your date should fix itself.

Enjoy the added space to your phone!

Thursday, January 07, 2016

Keep Your SSH Session ALIVE!!

Most of us have had those days where we have a bunch of windows open, ssh'd into multiple servers.  You get caught up working on one of those servers and forget about your other ssh sessions.  Or, if you are like me, you are using something like screen/tmux and have many sessions going at the same time that you want to keep alive.

Well, with the default ssh setup, there is a setting in your ssh_config file called "ServerAliveInterval".  Initially (at least on my system) it is commented out and also has a value of zero (0).  

In order to keep your sessions alive indefinitely, you will need to uncomment that variable in the ssh_config file and set it to a value other than zero.  I have mine set to 60. 

What this variable does is tell ssh that it needs to send a packet across the wire to the connected server so that there is traffic, keeping the connection active, not letting it time out. 

So, by to keep your sessions alive, you will need to make the changes as above, but also, do not forget that this change will only effect new connections made after you save the change.  If you have active connections, you will need to exit them out and restart them.  If you don't, they will still be subject to the same issue you just corrected.

Go now, keep those connections alive! 

Wednesday, January 06, 2016

Online Learning - Open Source Society (Computer Science)

Almost a year ago (1/31/2015 to be exact), I posted an article about online learning.  I reviewed a number of online places to take courses and learn a new skill and provided the list. 

In my research around the internet I stumbled across another resource which I have found very valuable.  I am referring to the Open Source Society page on Github.  The OSS has the tag line "Path to a free self-taught education in Computer Science".  This is great for someone similar to myself, who his completely self-taught, or is looking for an inexpensive way to get into the field, starting with Computer Science. 

The courses listed are sourced from several of the places that I reviewed in my previous article (MIT, Stanford, Coursera, Udacity, Edx, etc) and are all Free for the taking/learning.  The nice thing is, you don't have to go searching through and navigating each of the individual sites, the links are all gathered for you there on the OSS page. 

Hopefully this comes in as handy for everyone as it has for me.

Creative Commons License
This work is licensed under a Creative Commons Attribution 3.0 License.