Home Networking Raspberry Pi “Pi-hole” Project Part 2

Part 2:  Filter Content

Now that ads are blocked (for the most part) lets filter content to keep the interwebs family friendly.

I used OpenDNS.  Very simple.  I used the free, preconfigured family set up.

On my router, since I couldn’t use the pi-hole there directly, I added OpenDNS nameserver ips.  On the router, I changed the DNS settings to the following:

  • 208.67.222.123
  • 208.67.220.123

That’s all fine and good for anything not running through the pi-hole.  But the devices that do use the pi-hole have no content filtering.  The pi-hole is set up to use Google DNS.  So, let’s change that.

First, log into the pi.  Then run the command:

sudo nano /etc/dnsmasq.conf (I like nano, but use whatever editor you like)

In this file change “server=” lines to use the ip’s from OpenDNS above.

Reboot for good measure and you’re all set.  Good clean content on your whole next work.

Next up, the hard part – VPN.

Stay frosty.

Home Networking Raspberry Pi “Pi-hole” Project Part 1

The following posts will be on how to set up your own ‘Pi-hole’.

What I wanted to do was set up my Pi to block ads, filter content, and serve as a secure VPN for when I’m connecting out in the real world where the bad hackers live.

I started with a base of Jessie flavored Raspbian.

Part 1 – block ads

This part was easy.  Check this out:

http://jacobsalmela.com/block-millions-ads-network-wide-with-a-raspberry-pi-hole-2-0/#install

Not much to it.  Start with your base of Raspbian.  Make sure its up to date:

sudo apt-get update

sudo apt-get upgrade

Then go get your pi-hole.

curl -L install.pi-hole.net | bash

Then configure your devices (or router) to use your Pi as its DNS server.

I’m being lazy so you can check out the link above for links on how to do that.

My router would not support it at the router level, so I configured devices individually.  You will need to know your Pi’s ip address.  It should probably be static.  A later post will cover how I handle static ip’s for all my devices.

Now when I browse the web I get empty space where once ads stood.

Next time I’ll go over content filtering.  Until then, stay frosty.

Matt 2: The Winter Coder

Another year in the books.  2015 was an interesting one.  I changed jobs and stepped down from the fire service.  I put on a few pounds and stopped coding in WordPress.

As I write this I realize that maybe it sounds like 2015 wasn’t a great year.  That’s not so.  Stepping away from the fire department gave me time with my family.  Something I felt I really needed.  Instead of WordPress, the new job required me to learn Joomla.  I enjoy learning new things so that was ok too.  Putting on a few pounds I could have done without though.

So, now its 2016.  It’s time to improve.  Matt 2.0.  Better code, better me.

I’ll be attending my first hackathon in a couple weeks, I’m catching back up with WordPress, and I’m working out again.

I’m also going to be blogging more.  Working on a couple Raspberry Pi projects that I’ll be posting about, and a database project with my daughter.

Stay tuned and stay frosty.

WordPress Web Application Development Review

I recently read WordPress Web Application Development by Rakhitha Nimesh Ratnayake.  You can get your copy here:

http://bit.ly/1e3ioxG

As the title implies it covers using WordPress as your application framework.  I highly recommend this book even if you are not building a web app.  The author does a great job of breaking down complex development techniques that are useful regardless of how you plan to use WordPress.  I found learning about how to use built in functions the most helpful.  Did not realize how much WordPress provides for you as far as development goes.

WordCamp Grand Rapids 2013

I recently presented at this year’s WordCamp Grand Rapids.  I would like to take a minute to write about my experience.

For starters, I was thrilled to be selected.  I found out while spending a day in Peoria with the family while our new car got detailed.  Little ‘ol me selected to present to other WordPress developers.  Who would want to hear what I had to say about web development?  So extremely humbled.

It was a long trip from Pontiac, IL to Grand Rapids, MI.  Made more difficult by construction.  I left before sunrise so that wasn’t as big of a deal.  It was bad timing because of other family events so I could not stay.  Had to drive up, present, catch some other presenters, do a couple of tours of duty at the Happyness Bar and drive back.  Made for a long day, but did not want to miss the opportunity.  Wish I could have stayed for the after party and following days events.  Next year.

I had the first developer spot of the day.  I was super nervous to talk in front of so many people and still struggling to get over the fact that I was selected.  All these people here to se me?  I noticed some people from Automattic in the front row which didn’t help calm my nerves either.

IMG_0822
Presenting at WordCamp Grand Rapids

I was speaking on making the admin more user friendly.  Using Custom Post Types, custom database tables, and Meta Boxes to eliminate user confusing for novice authors.

The presentation went by really quickly.  I was given forty minutes, but finished somewhere around 20.  I speak quickly when nervous apparently.  The Q+A afterwards went well.  Lots of good questions and discussion.  Felt more at ease doing the Q+A.  Had several attendees approach me afterwards for more questions or just to say they liked it.

Afterwards I worked at the Happyness Bar.  For those that don’t know, it’s just an area to go and ask presenters or other experts questions.  Meet someone there who had my same model Chromebook and a similar problem I have been working on.  It was awesome to connect with someone in real life that had worked on something I had been working on instead of a Gravatar on a forum.

The highlight was probably Brad Parbs session on Sass.  I’m a believe in Sass now and will be using it moving forward.

Next year I’m hoping to attend Chicago and Grand Rapids again.  Hopefully speaking at one or both of them.  I would like to make it a family event and stay the weekend with the wife and kids.

If you develop/design/author a WordPress site/blog I suggest going to a WordCamp.  Very informative, fun, and you get to meet great people.

He’s on the Roof

The title of this post is a reference to my college days.  We played a lot of counter strike and my roommate would often call out ‘he’s on the roof’.

I have been absent from the keyboard for some time attempting to put a new roof on my house.  Doing it with just the help of my father in law and uncle it took over a week, and technically still not done.  Need to put the ridge vent/cap on this week, but at least it no longer leaks.  The house remodel is coming along nicely.  First we did the bathroom, not the roof, I think the kitchen may be next.

Anyway, that is why there has not been a post as of late with WordPress/coding goodness.

Exciting news however.  I did learn that I will be speaking at WordCamp Grand Rapids!  More on that to come.

2013 wordcamp Chicago June 30th Slides

This is the follow up to yesterday’s post.  Again if you know the links to any of the missing presentations please contact me.

ACCESSIBILITY & WORDPRESS: DEVELOPING FOR THE WHOLE WORLD
http://www.slideshare.net/joedolson/wordpress-accessibility-wordcamp-chicago

LAND BIGGER CLIENTS WHILE WORKING FROM AN ISLAND
missing

PLUGIN UNIT TESTING FOR WORDPRESS
http://www.slideshare.net/techguytom/unit-testing-plugins

WHY YOUR WEBSITE ISN’T “SET IT AND FORGET IT”
https://speakerdeck.com/ipstenu/why-wordpress-is-not-set-it-and-forget-it/

HI WORDPRESS, MEET VAGRANT
http://jeremyfelt.com/code/2013/04/08/hi-wordpress-meet-vagrant/

RUNNING A WORDPRESS THEME SHOP
missing

ENHANCING DEVELOPER CREATIVITY WITH GIT
http://tollmanz.com/wp-content/uploads/2013/06/WCCHI.pdf

WORDPRESS GOES TO COLLEGE: A CASE STUDY
missing

SCOPING PROJECTS TO REDUCE STRESS, HEADACHES AND ANGRY MOBS
missing

JAVASCRIPT PERFORMANCE TECHNIQUES
http://slides.carldanley.com/wc-chicago-2013/#1

HIRING AND WORKING WITH A DEVELOPER
http://www.slideshare.net/ericandrewlewis/working-with-a-developer

BUILDING APPS WITH BACKBONE.JS AND WORDPRESS
http://kadamwhite.github.io/talks/2013/wcchi/#/

FREE SPEECH, FREE PRESS, FREE SOFTWARE
missing

DESIGNERS AND DEVELOPERS: CREATING NEW REVENUE STREAMS USING WORDPRESS
missing

BUDDYPRESS RULES – THE ROAD TO REWRITES IS PAVED WITH PRETTY PERMALINKS
missing

2013 wordcamp Chicago June 29th Slides

I decided to gather the presentations from all the speakers at wordcamp to have them in one place. If you know where any of the missing ones are please send me the link.

STOP MAKING THINGS PRETTY & START DESIGNING
https://speakerdeck.com/marktimemedia/stop-making-things-pretty-and-start-designing

NO ONE CARES ABOUT YOUR CONTENT (YET)
http://logoscreative.co/wcchi/

WRITING HIGH-QUALITY WORDPRESS PLUGINS
http://bradg.net/wordcamp-2013-plugin-quality/#/

CREATING AN AGILE WORDPRESS DESIGN PROCESS
https://speakerdeck.com/ci_chrisford/agile-design

PUTTING WORDPRESS IN A SUIT & TIE: WORDPRESS IN CORPORATE AMERICA
https://speakerdeck.com/rachelbaker/putting-wordpress-in-a-suit-and-tie-wordpress-in-corporate-america

GROW YOUR BUSINESS NOW: MAXIMIZE MARKETING EFFICIENCIES WITH WORDPRESS
http://orbtr.net/lp/wcchi/

ROCKING THE RESPONSIVE WEB
http://www.joshbroton.com/sessions/rocking-the-responsive-web-wordcamp-chicago/#/

LINK BUILDING TECHNIQUES THAT WORK!
http://www.slideshare.net/SeanMcGinnis/link-building-that-works

FROM PIXEL TO USER – CREATING THEMES THAT SATISFY THE DESIGN AND ARE USABLE
http://www.slideshare.net/bdgardengirl/pixel-to-user

CONTENT STRATEGY FOR WORDPRESS
http://www.slideshare.net/mobile/stephanieleary/content-strategy-22808244

INTERACTING WITH EXTERNAL APIS
http://ben.lobaugh.net/blog/wp-content/uploads/Interacting-with-External-APIs-wcchi-2013.pdf

THE OVERLAP OF EMOTION AND USABILITY
http://es.slideshare.net/3pointross/overlap-of-emotion-and-usability

A REAL WORLD DESIGN PROCESS
missing

OPTIMIZING YOUR SITE FOR (BUSINESS) PERFORMANCE
missing

A WEB SITE IS NOT ENOUGH: HOW TO BUILD AN ONLINE MARKETING STRATEGY AND MEASURE RESULTS
missing

DESIGN AND DEVELOPMENT TRENDS IN WORDPRESS
http://www.slideshare.net/photoflame42/wordcamp-chicago

YOU’RE A PROFESSIONAL: HOW TO AVOID OVERSHOOT & LOST PROFITS
https://speakerdeck.com/chrislema/the-clients-not-always-right-how-to-protect-yourself-from-overshoot-and-dwindling-profits-with-wordpress

TALES OF A PLUGIN DEVELOPER (DON’T REPEAT MY MISTAKES!)
http://www.slideshare.net/TobiasBg/wcchi-2013

Return vs Echo

I recently made a mistake that I wanted to share. It might save you a headache.

When making a short code make sure to return a value and not just echo it out.

The echo will display content, but it’s placement will be off, which is what gave me my headache.

Instead, put your echo’s in a string then return it.

//incorrect
function foobar_func( $atts ){
 echo "foo and bar";
}
add_shortcode( 'foobar', 'foobar_func' );
//correct
function foobar_func( $atts ){
 return "foo and bar";
}
add_shortcode( 'foobar', 'foobar_func' );