Playhouse Expansion

Six months after we’ve moved in I’m finally getting to the task of setting up the playhouse we brought with us from the old house.  Side note:  Bryson told me this weekend he remembers going to someone’s house and taking it apart and bringing it home, then adding more to it — so it has sentimental value now!  I wanted to connect the two playhouses together with some sort of bridge.  I finally decided on a simple rigid bridge is what I wanted.

10370366_10154582886150608_304957754483865219_n Continue reading

Posted in Family, Projects | Tagged , , , | Leave a comment

Time Average in Ladder Logic (ControlLogix AOI)

I’ve needed a time-average function several times, so I figure other people have also.  Here is a handy AOI which makes it easy to use in a ControlLogix ladder program.  (AB has the Moving Average MAVE instruction in function block and structured text environments but not ladder)  I use this instruction when I’m trying to control something from a signal that jumps around too much.  The instruction takes samples from the input at the interval you set it to, and outputs the average of all the samples.  I’ve included the import file and screenshots of the ladder code.

AOI:  TimeAve.L5X.zip

Screenshot from 2014-08-29 14:21:54 Continue reading

Posted in Industrial Automation | Tagged , , , , , , , | Leave a comment

Politics Explained

10559670_10152655091555786_1095220566223581975_n

Left wing, right wing, libertarian on marriage, health care, money, taxation, and war.

Posted in Politics | Tagged , , , | Leave a comment

Convert PDF to PNG using Linux

If you use the defaults for Imagemagick, the output of a PDF file with text converted to PNG is unreadable.  The secret is to use the density option:

$ convert -density 300 xxxxx.pdf yyyyy.png

If the original PDF has a transparent background, use the alpha option:

$ convert -density 300 xxxxx.pdf -alpha off yyyyy.png
Posted in How-To, Technology | Tagged , , , , | Leave a comment

Famous Presidential Lies

Famous Presidential Lies

LBJ:
We were attacked (in the Gulf of Tonkin)

Nixon:
I am not a crook

GHW Bush:
Read my lips – No New Taxes

Clinton:
I did not have sex with that woman… Miss Lewinski

GW Bush:
Iraq has weapons of mass destruction

Obama:
I will have the most transparent administration in history.
The stimulus will fund shovel-ready jobs.
I am focused like a laser on creating jobs.
The IRS is not targeting anyone.
It was a spontaneous riot about a movie.
I will put an end to the type of politics that “breeds division, conflict and cynicism”.
You didn’t build that!
I will restore trust in Government.
The Cambridge cops acted stupidly.
The public will have 5 days to look at every bill that lands on my desk
It’s not my red line – it is the world’s red line.
Whistle blowers will be protected in my administration.
We got back every dime we used to rescue the banks and auto companies, with interest.
I am not spying on American citizens.
Obama Care will be good for America.
You can keep your family doctor.
Premiums will be lowered by $2500.
If you like it, you can keep your current healthcare plan.
It’s just like shopping at Amazon.
I knew nothing about “Fast and Furious” gunrunning to Mexican drug cartels.
I knew nothing about IRS targeting conservative groups.
I knew nothing about what happened in Benghazi.
If elected I promise not to renew the Patriot Act.
If elected I will end the war in Iraq and Afghanistan within the 1st 9 months of my term.
I will close Guantanamo within the first 6 months of my term.
I will bridge the gap between black and white and between America and other countries.
And the biggest one of all:
“I, Barrack Hussein Obama, pledge to preserve, protect and defend the Constitution of the United States of America.”

Posted in Politics | Tagged , | Leave a comment

Boot from ISO using GRUB2

Goal is to install new OS from an ISO image without creating a boot CD.

Step 1:  Format hard disk to be used with a boot partition.  (set boot flag)

Step 2:  Mount partition, create new directory named ‘boot’ (in this case the partition automatically mounted as /media/brian/boot, so new directory is /media/brian/boot/boot).  Copy the ISO file(s) you want to use to a  subdirectory named grml.  (or anywhere else) Continue reading

Posted in How-To | Tagged , , , , , , , , , | 1 Comment

The Basis for Law is Religion

image001DID YOU KNOW?
As you walk up the steps to the building which houses the U.S. Supreme Court you can see near the top of the building a row of the world’s law givers and each one is facing one person in the middle who is facing forward with a full frontal view ….

It is Moses and he is holding the Ten Commandments!

DID YOU KNOW?
image002As you enter the Supreme Court courtroom, the two huge oak doors have the Ten Commandments engraved on each lower portion of each door.

DID YOU KNOW?
As you sit inside the courtroom, you can see the wall, right above where the Supreme Court Judges sit, a display of
The Ten Commandments

DID YOU KNOW?
There are Bible verses etched in stone all over the Federal Buildings and Monuments in Washington , D.C.

DID YOU KNOW?
James Madison, the fourth president, known as ‘The Father of Our Constitution’ made the Following Statement: ‘We have staked the whole of all Our political Institutions upon the capacity of mankind for Self-government, upon the capacity of each and all of us to govern ourselves, to control ourselves, to sustain ourselves according to The Ten Commandments of God.’

DID YOU KNOW?
Every session of Congress begins with a prayer by a paid preacher, whose salary has been paid by the taxpayer since 1777.

image006DID YOU KNOW?
Fifty-two of the 55 founders of the Constitution were members of the established Orthodox churches in the colonies..

DID YOU KNOW?
Thomas Jefferson worried that the Courts would overstep their authority and instead of Interpreting the law would begin making law an Oligarchy: the rule of few over many.

 

Posted in Politics, Thoughts | Leave a comment

Using WonderWare Script to Check for Correct Number Format

Here is how I used a WonderWare window script to check to make sure the batch number entered by the operator meets the following requirements:

  • must be 9 digits
  • first digit is a 8
  • 2nd and 3rd digit are the 2-digit year number
  • 4th to 9th digits are numbers

Screenshot from 2014-04-22 15:50:21 Continue reading

Posted in Industrial Automation | Tagged , | Leave a comment

Wood Repair Using Plastic Filler (bondo)

The house we just bought had damage to several of the stair trim pieces of wood from a dog.  Here are some pictures I took of my fix.  I started with a dowel glued in a hole I drilled, then added fiberglass bondo.  I used a rasp and double cut file to shape the bondo after it hardened.  Once I had the basic shape, I switched to an all-purpose bondo that went on much thinner.  More filing and finally sanding and painting.

 

Posted in How-To, Projects | Tagged , | 1 Comment

Use cron, grep, ps to monitor and restart a program (x11vnc)

As a band-aid to check if a program stopped running, and then restart it if it did stop, here is what I came up with.  x11vnc is the program that gave me trouble, seems like every once in a while, usually while I’m logging in as a user and the X11 screen changes, the VNC server loses its mind and quits.  Being lazy, I don’t want to remember the command to type in to restart it correctly, so this does it for me:

Step 1:

create a shell script (/root/check-x11vnc-running)(and chmod +x to make executable):

#!/bin/bash
 # Check to see if x11vnc is running
 if ps cax | grep x11vnc | grep -v check >; /dev/null
 then
      echo "x11vnc running when checked at $(date)" >> /var/log/x11vnc-checker.log
 else
      x11vnc -usepw -nap -wait 50 -noxdamage -display :0 -forever -o /var/log/x11vnc.log -bg
      echo "Restarted x11vnc at $(date)" >> /var/log/x11vnc-checker.log
 fi
  • ps cax lists all the processes running, grep finds all the lines that mention x11vnc, and the second grep command removes the instance of this script running.
  • if the statement was > 0, we think the program is running, make an entry to a log file (have to create the file to start with —  use ‘touch /var/log/xxxxx’)
  • if the statement was false (a zero), issue the command to restart the vnc server, and make a log entry

Step 2:

add a entry to crontab to run the script above once every minute

 > crontab -e
*/1 * * * * /root/check-x11vnc-running  

I had fits getting this to work, and finally figured it out.  The first entry represents the minute, so I figured ‘run every minute’ would be a ‘*’.  But, it won’t run with all *’s, the ‘*/1′ makes it run once per minute.  ‘*/2′ is every two minutes.  ’2′ would be at H:02 of every hour.

Posted in Uncategorized | Leave a comment