30.1.15

Raspberry Pi Day 2

Found out something interesting today.

When you reboot the Raspberry Pi is automatically changes the nameservers to be the ones your router provides. So, you need to have the secondary DNS set at the router level to ensure that you get a Google DNS server in the /etc/resolv.conf file, you have to edit that file after every reboot.

Also, I made the box into a case. I used the chipboard scraps from the power cable packaging to wrap a protective barrier around 4 bent paper clips. I marked and made holes in the box for the paper clips to go through. I bent one end to stop them from failing through. I then rolled up the chipboard bits and put them through the 4 mount holes in the Pi. I put the Pi into the original box, with the chipboard spacers/protectors in place.

Then, I pushed the paperclips through the box holes, and the chipboard. Next I bent the protruding paperclip bits back toward the box. I kept one end open, and used an Exact-O knife to cut a hole for the power cable. Next, I switched which end was open, and cut off one flap, and then made a hole for the Ethernet cable. Then I closed up the box, and cut a box-size piece of the foam padding from the tablet case packaging out to rest the box on. Next, I just plugged back in the two cables, and was good to go.

29.1.15

RaspberryPi Night 1

Went to Microcenter to get a table cover for my $40 Azpen 7" tablet, that was prerooted, and after a quick use of Kingo Root to install SuperSU, as well as an Unistaller, I was able to remove the bloatware/adware preinstalled, and move apps to the SD Card freeing up enough space.

While there saw the RaspberryPi kits with SD Card, Charger, Case, and B+ for ~$70. However, the B+ was only $25, charger $5, SD card $7 and optional case $9. So, I went separate.

Going to work on the step-by-by to install DNSMasq and make a local Ad-blocking DNS server.


  1. Install Win32DiskImager from Source Forge on my Windows box
  2. Downloaded the Raspbian "wheezy" latest and greatest using the torrent from the RaspberryPi website
  3. Extracted the zip file from the torrent
  4. Used Win32DiskImager to Write the .img file to the MicroSD card
  5. Remove MicroSD card from PC, and put into RaspberyPi
  6. Plugged in Ethernet cable to router
  7. Plugged in power supply
  8. Booted up Ubuntu box on same network
  9. Determined Raspberry Pi IP address using router page
  10. Set a static IP for the Raspberry Pi on the router (192.168.0.128)
  11. ssh into Raspberry Pi from Ubuntu box using the defaults (ssh pi@192.168.0.128 and then password raspberry)
  12. Entered suggested command prompt sudo raspi-config
  13. Chose Expand File System
  14. Chose Change User Password
  15. Chose to setup the timezone
  16. Chose Finish
  17. Prompted to reboot, and kicked off SSH as a result
  18. Waited a bit, and then SSH'd back in
  19. Ran sudo su
  20. Ran apt-get update && apt-get --yes --force-yes upgrade
  21. Ran apt-get --yes --force-yes install dnsutils dnsmasq
  22. Ran vi /etc/resolv.conf and added the nameserver 127.0.0.1 at the top using the O command on the top line to insert above
  23. Ran vi /usr/local/bin/adblocks.sh
  24. Saved the following commands in that file with paste ESC and ZZ to save, but did have to use ESC j to get to the top and then reinsert the wget-O using the i command first
wget -O /etc/dnsmasq.conf  "http://www.needtoknowdesigns.com/hosts.txt"
# delete lines that start with a comment line
sed -i 's/#.*//g' /etc/dnsmasq.conf
# removes windows oddities?
sed -i 's/\t//g' /etc/dnsmasq.conf
sed -i 's/\r//g' /etc/dnsmasq.conf
# removes the localhost line
sed -i '/localhost/d' /etc/dnsmasq.conf
# change 127.0.0.1 to dnsmasq format
sed -i 's/^127.0.0.1\s/address=\//g' /etc/dnsmasq.conf
#remove blank lines
sed -i '/address/!d' /etc/dnsmasq.conf
# line below failed before
#sed -i 's_$_\1/0.0.0.0_' /etc/dnsmasq.conf
# alternate line that puts in the 0.0.0.0 at the end, but on a new line
sed -i 's/$/\/0.0.0.0/' /etc/dnsmasq.conf
# removes everything...
#sed -i 's/[^ -~]//g' /etc/dnsmasq.conf
#no idea but it didn't break it
#sed -i '/address/!d' /etc/dnsmasq.conf
service dnsmasq restart

  1. Ran export EDITOR=vi
  2. Ran crontab -e
  3. Added @weekly /usr/local/bin/adblocks.sh  to the bottom of the file and saved (ESC G o type, ESC ZZ)
  4. Hopped on the router and changed it's DNS server to be the RaspberryPi 

                                            16.1.15

                                            Delay of game again

                                            It seems that the only deadline that will be met is the one that requires the Ombudsman to respond to the Senator.

                                            The only response I get from them is another delay while they continue to "investigate."

                                            Now, they are delaying until January 23, 2015. Which is, if memory serves, almost their last date to respond to the Senator's office.

                                            What a worthless waste of tax money.