Archive of posts from 2016
2016 was a year of extremes for me. It didn’t start off great with the passing of my Aunt Lu, who was one of my favorite people. However, it also included my brother’s wedding which was the nicest wedding I’ve ever attended. Like most years it had good and bad parts.
Dec 30, 2016 Things I’ve Learned About Myself This YearSince I usually wrap my year up on the 31st and make my plans for the coming year on the 1st, I’ve been thinking about this past year. Know Thyself is a common saying, so I think I should take a somewhat critical look at me. So what have I discovered about myself this year?
Dec 20, 2016 Adding a Windows Computer to an Openldap-Samba Primary Domain ControllerFor a number of years, I’ve used a linux computer running openldap and samba as the primary domain controller for my windows computers. This works great in that we can have a single sign-on for all of our windows and linux computers and use the same account for logins to websites. I’ve had an old piece of paper in my office with the changes that are needed on Windows to be able to get it to join this pdc. Thought I’d finally put them online in case something ever happens to my paper. (#2 below is really the only required step, but I always do all of them.)
Dec 16, 2016 Mariadb (Mysql) SetupI wrote these instructions years ago, but couldn’t find them the other day. So I’m updating a few things and reposting here.
Dec 4, 2016 Filtering with procmailrcI have an email account that I forward to a gmail account so that I can use google’s spam filtering. One thing that google does is limit the size of mail messages to 25mb. If someone sends me a mail message with an attachment greater than 25mb, google will bounce it back to my server, which will then forward it to google, who will then bounce it back to me… you get the picture. I had this happen today and while nothing crashed, it did slow my server to a crawl. So I thought that I’d put a rule in my .procmailrc file before the forward to the gmail account that moves the large file to a local mailbox. This is easy to do, I’d just add a section like this:
Dec 4, 2016 Random ThoughtsIt’s an early Sunday morning and I’m relaxing with a cup of coffee when I thought I’d post some random thoughts I’ve been having.
Dec 2, 2016 Delete a command from the historyIf I run a command that, maybe shows a password in it, I’d like to delete that command from my command history. Say I this shows when I run history:
Nov 27, 2016 Sewing MachinesI took the sewing machine that was given to me in to get tuned up. The repairman called and said it needed a lot of work and that it would cost around $250-$300. For an old sewing machine that I didn’t like all that much, it was too much money. So I let them keep it for whatever parts they could salvage from it. I don’t sew a lot, but it is a tool that I’d like to have. So I’ve been researching sewing machines.
Nov 19, 2016 Yearly Oatmeal UpdateAs the weather gets cooler, I change to eating oatmeal for breakfast. I didn’t grow up eating oatmeal, so I’ve been trying to teach myself how to cook it. I like a very creamy oatmeal, often how I get at a restaurant. However, when I made it at home, my oatmeal wasn’t nearly as good. Now, after a few years of making it, I feel like I have the perfect recipe for me.
Oct 25, 2016 Temp Files in RHEL7I had an RHEL7 system that would not start mariadb server on boot. I could reinstall the server rpm and then it would work fine, but it would not start after a reboot. So I finally had some time to figure out what’s going on.
Oct 9, 2016 Birthday Project ResultI took my book out of the press this morning. It’s not perfect, but it’s not at all bad for my first attempt.
Oct 8, 2016 Birthday Project Part 2My post yesterday wasn’t accurate. I hadn’t yet finished my text block. I still had to put the cover pages on it and the reinforcing paper. Before that though, I had to glue the binding. I made a book press out of a couple of pieces of wood and some clamps.
Oct 6, 2016 Birthday ProjectI’m on my annual birthday vacation. Just took three days this year instead of the whole week. And instead of taking a class somewhere, I decided to try to teach myself how to bind a book. Technically, I should say I’m learning how to do this from YouTube videos. First up, I folded and cut a bunch of paper. Then I had to sew them into a text block. I followed the video below:
Sep 27, 2016 Certificate NotesEvery so often I have to do something with certificates. It’s infrequently enough that I always have to re-lookup all the commands because I don’t remember the exact syntax. Also, for a long time, I simply used self-signed certificates because they did the job for me. However, now that there are very inexpensive certificates, I sometimes use them. Anyway, here are my notes:
Sep 27, 2016 The credentials are correct…I had a problem where one user could not login to our windows server 2012 computer. The error message that I got was:
Sep 20, 2016 El Capitan NFS MountFirst create the directory /Volumes/sharedirectory
Sep 17, 2016 Frustration!I thought that I would take today and try to finish the curtains that I’m making for my bedroom doors. My mom gave me a new iron, which works fantastically well. I also got an ironing board, which also makes ironing so much easier. So I was making great progress with ironing and sewing the side seams. Then, I ran out of thread on my bobbin. No problem, I thought. I learned how to thread the bobbin a while back and even made a youtube video of it. So I thread the bobbin and get back to work. But I don’t get back to work. For reasons I cannot determine, the machine is not moving the material forward. If I press the reverse button, it goes back with no problem. But it won’t go forward. So I screw around with it for a while. What did I do? No idea, but the material starts to move forward slowly. (Reverse goes backwards much quicker than the material is going forward.) So I try again, but things still aren’t right, as the thread is bunching on the bottom. I remember the rule that thread problems on the top of the seam are usually due to the bobbin and problems on the bottom are usually due to the needle. So I rethread the needle and it’s just not working correctly. By and large, I have a decent amount of patience, but this drained ALL of it. I can guarantee by neighbors heard the slew of obscenties I spewed. I then decided to buy a new sewing machine and started researching them online. This gave me some time for my blood pressure to drop and to calm down.
Sep 16, 2016 RHEL7 Kickstart ProblemI’ve been trying to set up an RHEL7 kickstart script for our computers and was getting a bunch of errors about PackageKit.
Sep 11, 2016 The Spice RackMy brother-in-law requested a spice rack for his kitchen. And my brother sent me this link (https://www.amazon.com/Seville-Classics-3-Tier-Expandable-Organizer/dp/B001E2864K) to see if I could copy it. I knew that the rack had to hold 31 jars of spices and that each jar was basically 2 1/4″ in diameter and 3″ tall. So I figured four shelves were needed and the overall width of it should be 20 inches. I also had some maple boards in my garage that were old shelves from my condo. I figured I could split them on my table saw (which turned out to be difficult) and then cut out the pieces I needed. I’m very happy that I could use wood I already had for this, since I wasted a lot of the board when I couldn’t split it easily or evenly. I just used glue to hold everything together because the wood was pretty thin and I thought screws or nails would split it.
Aug 30, 2016 Simple RsyncI always have to look this up, but a simple rsync command is:
Aug 30, 2016 El Capitan Simple DOS FormatThe disk utility in El Capitan looks to be much more limited than it used to be in older versions of mac os x. So I need to use the command line to do a lot of things now. First off is a simple format of a new disk as an plain dos disk.
Aug 29, 2016 RHEL7 Systemd (Startup) ScriptI have an RHEL7 system that needs to start an lmgrd license file for some autodesk software. And since RHEL7 now uses systemd, I have to change my old sysinit scripts to work here. So here’s what I did.
Aug 11, 2016 Been A WhileMy summer has been pretty crazy with a big work conference that is finally over. My life is now my own again. Yay! I’ve been very behind in doing my monthly checking, but that’s ok. The good news is that I don’t have to go back to work for over a week. So I’m trying to do a bunch of projects around the house.
Jun 1, 2016 May Check-InMay was a good month. I biked on 25 days and drove on 16. Four of the driving days included a trip to Nashville, which was fun. I did the Tour de Nash, which was my introduction to NashVegas Nashville. Also had my longest ride, when I did 40 miles on Bike the Drive, including the ride to the drive. I biked 312 miles for the month, which made it a very good month. As for driving, my odometer reads 37599, which means I drove my car for 621 miles in the month. But I took my Mom’s car to Nashville, so I have to add the 1068 miles for that trip. So my total in the car was 1689. That’s quite a lot, but it was worth it for the trip.
One of the students asked me about installing python2.7 on a redhat 6 system. Since I know the operating system depends on a particular version of python, I was immediately thinking about just upgrading the system to RHEL7, which would have the version of python required. But, happily, I’ve found that RedHat has provided a way to upgrade important systems. It has created a new channel called “RedHat Software Collections”. The beauty of these is that you can still use the regular package manager and that they won’t overwrite or conflict with system files. You need to enable the channel and install “scl-utils and scl-utils-build”. Then, the command to switch/see collections is scl. As an example,
Apr 30, 2016 April in ReviewSince the weather today is very rainy, I know I’m not going anywhere. Figured I’d take a look at April.
Apr 17, 2016 First Long RideThe weather today is BEAUTIFUL! After going through the lousy weather of late, a day like today is glorious. I couldn’t wait to get outside and go for a bike ride. My plan was to ride up to Barnes and Noble to get some books for a project. The store was is just over six miles from my house and I left about an hour before it opened, figuring I’d ride around. I was enjoying the ride so much that I just decided to head up to the north side. I texted my cousin Janet and ended up riding to her house in Logan Square. I hung out with her a for a while and then head over to the bookstore. At about the 19 mile mark, I stopped at a grocery store and got some milk and donuts, which I took to Ping Tom Park (my favorite park in the city) and had a little picnic. Then, I rode home. Total ride time: 2 hours and 18 minutes. Total distance: 23.22 miles. Me: totally happy.
Apr 6, 2016 Citizen by Louise W. KnightI just finished the book Citizen by Louise W. Knight. The subtitle is “Jane Addams and the Struggle for Democracy”. It’s basically a biography of Jane Addams. Honestly, I didn’t really know much about her, except that she founded Hull House and that there’s a grade school near where I grew up that was named after her. I knew Hull House was a settlement house, but didn’t really know what a settlement house was. The book was good in that it detailed the start of the settlement house and her life up to around 1899. The weird part was that Jane Addams died in 1935 or so. The years from the end of the book until she died were where she had become quite well-known and influential. I thought it weird that the author would end in the middle of her life. But I think she was trying to show how she went from wealthy little girl to one of the best-known social crusaders. I’ll have to find another biography about her to get the rest of the story.
Apr 5, 2016 My First AttemptI’ve wanted to volunteer somewhere for a while and decided to give Working Bikes a try. One of their volunteer nights is Tuesday night, and I’m trying to go there every Tuesday. Tonight was my third time. It starts at 5 and I got there at maybe 5:15 or so and was basically the only volunteer for a while. This was great because Andrew (the guy in charge) asked me if I could try working on a bike solo. I think he had some things he wanted to do, so working with me was low on his list. Thus, after giving me a quick refresher on how to put the bike in the stand, I got to work by myself.
Apr 1, 2016 March RoundupPretty uneventful March. I didn’t spend a lot of money, which is good. So I had plenty to save after I paid my bills. The odometer on my car read 36,722 which means I drove 1150 miles in the month. That’s a lot more than I should have. And in looking at my calendar, I know that I drove my car far too much and biked much too little.
Mar 26, 2016 Reading AgainWork was fast becoming overwhelming of late, so I have taken to quitting email when I leave work and not checking it again until I get back to the office to keep my sanity. And I’ve been trying to close my laptop up more and stay offline. For a short time, I feared I was addicted to the internet, but I’m pretty sure I’m not. I just like to read and I was reading a lot of stuff online. These days, I’ve started up my weekly (or every other weekly) visit to my local library. I’ve read a number of books and it makes me happy. Now that I’ve fully accepted that I should wear reading glasses, I’m happy again reading books.
Mar 6, 2016 The Big ShortI had been wanting to see “The Big Short” for a while. Today, I found that it was still at a theater downtown, so I biked over to see it. Like most people, I pretty much knew the story. I’ve read a bunch of Michael Lewis books, though I can’t remember if I actually read “The Big Short” or just lived through it. Anyway, I thought it would be good and it was. How I judge if a movie is good or not is based on how much I’m thinking about the movie after it’s over. And, let me tell you, all I’ve been thinking about is this movie and I’m completely depressed.
Feb 29, 2016 February Check-InI’m going to say that February was the worst month that I’ve had in a very long time. The main thing that happened is one of my favorite people in the entire world passed away. Short of something happening to my Mom, nothing could hurt as much. Along with my parents, for my entire life, my Aunt Lu was around. I will think of her on every Fourth of July (her favorite holiday) and Christmas Eve because we always went to her house. I often said she was hilariously funny, often unintentionally so. I loved going to visit her to hear about family members I never knew and what her life was like growing up. Since we knew she was sick, my siblings and I all made sure to visit her as often as we could during the month. She always loved to see us and I felt lucky to be there. If I could make people feel a quarter as good around me, as I felt around her, I’d be pretty happy. One of the last things she gave me was the dollhouse that someone made for her when she was a little girl. It has needed some work for a while and she gave it to me to fix it up. But only if I have fun doing it. If it’s not fun, I shouldn’t do it. I hope that I can get it into decent enough shape that I can donate it someplace where kids can play with it. I know she’d be happy if kids were playing with it.
Feb 27, 2016 10 years agoFebruary 25, 2016 was the 10th anniversary of my blog. Technically, it’s the 10th anniversary of my using wordpress on the blog. I believe I registered coldandheartless in 2000, when my nephew was born, though I’m not entirely sure. But since I have pictures from when he was born posted, I’m pretty sure. And I have some pictures in directories named 2003. Yay for me in naming the directories correctly. So I know I had the website before 2006. But moving to wordpress looks to have happened in 2006. So let’s celebrate that.
Feb 20, 2016 Producing a Lot of CrapI was reading some notes a person took on a book and found something that I really like a lot. In the book “The Geography of Bliss” (which I haven’t yet read, but now have a hold on at my library), the author writes that in Iceland, they produce a lot of crap. I guess the idea is that lots of people there produce art. So, of course, with so much art being produced, a lot of it is junk. But instead of thinking that’s a bad thing, it turns out that all the crap produced encourages even more people to produce art. So basically, all the bad art is working as fertilizer to help make more art. And every so often, something great is produced. I think that’s great! My immediate reaction is that I should start producing more and just accept that most of it will be bad. But, hopefully, it will work as fertilizer for me as well and maybe I’ll make something great.
Feb 13, 2016 Uploading a File in a Rails Site to Use to UpdateI want to upload a file to my rails webpage, but not store it in the database. I just want to upload it and then get the data out of it and update the database with the information in the uploaded file.
Feb 13, 2016 Using Ruby on XML FilesI need to copy some data from one system to another. On the first system, I can download an xml file. The second system is a ruby on rails website. So I’d like to them upload the xml file to the site and have it enter in the data. But since I’m not that familiar with working with xml files, I thought I’d work on it from the command line first.
In ruby, there’s a gem called nokogiri which works with xml (or html) files. Here’s the sample xml file that I’m using:
<AbstractBook> <Conference>TEST CONFERENCE 2016</Conference> <abstract> <Id>5</Id>Diversity, diversity <Content>This is all about diversity.</Content> <field id="content">This is all about diversity.</field> <PrimaryAuthor> <FirstName>George</FirstName> <FamilyName>Washington</FamilyName> <Email>[email protected]</Email> <Affiliation>WH</Affiliation> </PrimaryAuthor> <Speaker> <FirstName>George</FirstName> <FamilyName>Washington</FamilyName> <Email>[email protected]</Email> <Affiliation>WH</Affiliation> </Speaker> <ContributionType>Abstract</ContributionType> <Track>Diversity and Inclusion </Track> <AcceptedTrack>Diversity and Inclusion </AcceptedTrack> </abstract> <abstract> <Id>6</Id>Higgs, higgs, higgs <Content>I've got *something to say* out the **Higgs.**</Content> <field id="content">I've got *something to say* out the **Higgs.**</field> <PrimaryAuthor> <FirstName>Abe</FirstName> <FamilyName>Lincoln</FamilyName> <Email>[email protected]</Email> <Affiliation>The White House</Affiliation> </PrimaryAuthor> <Speaker> <FirstName>Abe</FirstName> <FamilyName>Lincoln</FamilyName> <Email>[email protected]</Email> <Affiliation>The White House</Affiliation> </Speaker> <ContributionType>None</ContributionType> <Track>Higgs Physics</Track> <AcceptedTrack>Higgs Physics</AcceptedTrack> </abstract> <abstract> <Id>7</Id>Oh the Lovely Higgs <Content>Some interesting info about how pretty the Higgs is.</Content> <field id="content">Some interesting info about how pretty the Higgs is.</field> <PrimaryAuthor> <FirstName>Grover</FirstName> <FamilyName>Cleveland</FamilyName> <Email>[email protected]</Email> <Affiliation>WH</Affiliation> </PrimaryAuthor> <Speaker> <FirstName>Grover</FirstName> <FamilyName>Cleveland</FamilyName> <Email>[email protected]</Email> <Affiliation>WH</Affiliation> </Speaker> <ContributionType>None</ContributionType> <Track>Higgs Physics</Track> </abstract> </AbstractBook>
And here’s the script I wrote:
#!/Users/maryh/Software/rubies/2.2.3/bin/ruby require 'nokogiri' File.open("Abstracts.xml") do |file| @doc2 = Nokogiri::XML(file) elems = @doc2.xpath("//Speaker") myfirst ='Abe' mylast = 'Lincoln' elems.each do |e| if (e.at('FirstName').text == myfirst) && (e.at('FamilyName').text == mylast) puts e.parent.at('Title').text puts e.parent.at('Content').text print "#{e.at('FirstName').text} " print "#{e.at('FamilyName').text}\n" end end end
First, I open the file and open it as an xml file with nokogiri. I then put in elems all the xml fields labelled “Speaker”. I then cycle through elems looking for the string “Abe” and “Lincoln”. If I find them both, I print out the field “Title” and “Content” which are both in the parent field from “Speaker” and then I print out the first and family names.
This is very basic and there are a lot more things that I need to do. I need to match the speaker info with names stored in a model in my rails app. And then update that entry with the title and content if I find a match.
Feb 13, 2016 Using Ruby on CSV FilesI’m working with some different systems for a conference I’m working on. We’re using RegOnline to handle the registrations. One of the things that I need to do is get a list of people who have registered on RegOnline and post them on our conference website. Our conference site is plain html and I don’t want to have to type in each person who registers. I can download a csv file from RegOnline. I want to write a script that reads the downloaded csv file and makes an html file for the website. I hadn’t done much with csv files before, but here’s a basic script that pretty much does what I want. (I still have to put html tags in, but that should be pretty easy.)
Feb 11, 2016 Paperclip with Spoof File ChecksI have a rails site that accepts pdf files as uploads. Based on previous experience, I have found that trying to validate on content-type causes lots of problems. There are many browsers that send weird content types with file names. For pdf files, they should always be using ‘application/pdf’ and most browsers do. However, this morning I got email from someone who couldn’t upload his file in one browser. He told me he used a different browser and it then worked. I searched the log files and found a bunch of error messages, but the main bit was this:
Jan 31, 2016 January Check-InNormally, I only review my entire year to see how I did, but I thought I’d maybe check in at the end of each month. I may not do this again until the end of the year, but I had some time so let’s take a look at how the year is going so far.
Jan 21, 2016 Getting Started with UbuntuJust about all of the linux systems that I work on are a RedHat variant (Scientific Linux or Centos). But in the past few years, more people have been using Ubuntu, so I need to become familiar with it. And yesterday, I had to set up a system to help someone troubleshoot a board that we built. So here are some things about Ubuntu that I’ve learned recently. And just about all of this stuff is done using the command line because that’s how I prefer to work.
Jan 3, 2016 So far, so goodWe’re three days into the new year and it’s so far, so good. Tomorrow, I have to go back to work. I’m a little bummed that I can’t wear sweatpants all day anymore, but that’s ok. It’ll be good to get back in the swing of things. I’ve taken short bike rides every day so far and am up to 11 miles. So only 2242 to go to hit my goal. 🙂 I’ve cooked some good meals (homemade pizza, eggs with pepper, onion and avocado) and some ok ones (roasted vegetables with noodles). I’ve also used up my blackened bananas by making banana muffins, which turned out pretty good. I went with Paul today to his bar and helped him clean up some wood. So while I didn’t technically do a workout, I worked there for a couple of hours and got my heart rate up. My car has only been out of the garage one day. And since the weather looks pretty good, I’m hoping that the bike will get me to work for most of this week.
Jan 1, 2016 To 2016Happy New Year!