Key Conundrum

2013-12-05 10:23:06

Image of keys

"Permission denied (publickey). fatal: Could not read from remote repository." error while pushing to heroku via git.

I ran into this error lately while trying to push an app up to heroku. The error wasn't very descriptive of what was going on. Even though the error seemed to point to heroku really the error was saying "Heroku can't get to the git repository". I swore I had the same keys on all the servers because I created it and uploaded it to one after the other at the same time.

After spending almost a day on this I realized that because git was only showing me the fingerprint and not the actual key. I couldn't verify that it's key matched the one on my HD or heroku. I looked in the known hosts file and guess what... it shows the keys for each server and I was able to clearly see that the git and heroku public keys did not match.

  1. I deleted all the files in my key folder, the key from github using their website, and the key from heroku using git bash and the command heroku keys:clear
  2. Followed github's instructions here to generate a new key pair and upload the public key to git
  3. using git bash- heroku keys:add to upload the same key to heroku.
    1. Now git push heroku master works.

Simple jQuery selector trick

2013-11-18 15:02:45

Image showing a hand picking something

Here's a great tip for figuring out that perfect jQuery selector.

Open up your browser's console (I use chrome) and try different selectors in the console. The browser will show you what it selects.

Using Google Chrome:

"Inspect element" In the element inspector select the Console tab

You can type commands right into this console. Try a few selectors only and see what you get. If you type $('p') and hit enter it will list out all the p elements. If you enter $('ul.nav li) it will show you if that selector works (returns anything). If the command does not result in a valid selector it will return [].

On Passwords

2013-09-17 14:16:35

Spy Icon

After watching this video by tinkernut I decided to change all my passwords. The video is worth watching. It's an eye opener and entertaining to boot. If you don't have the time, here's some simple steps you can follow to make a great password:

  1. Think up an imaginary word that has at least 8 characters. Computer password crackers will use the dictionary so make up a word that only you know.
  2. Replace at least three of the letters in your imaginary word with a number, a capital letter and a symbol. Don't put the capital letter at the front. If you need help remembering how to spell your word, use a symbol and number that replaces a letter that looks similar. IE, use an @ or 4 for an 'A' or an 8 for a 'B', 3 for 'E' etc.
  3. Use different passwords for different levels of security. Perhaps do one for pages you just have a profile on, another for anything you want extra security on like your email and social sites, and a third that is only used for your bank's website.
  4. If you are forced to change your password periodically and you don't don't want to start over, try using the same one but adding to the end, like a number that represents the year.
The goal with all this is to force a password hacking program to use the brute force approach which is just trying random letters, numbers and symbols. According to the video, using 8 characters and a mix of letters, number and symbols will make 7.2 Quadrillon possible passwords which would take even a fast computer 23 years to crack.

Under Construction

2013-08-30 07:41:31

Hi everyone! I've started sending resumes out and now some of you are starting to see my site and it's not quite ready for prime time. I was planning on spending all day on this yesterday but my computer developed some drive issues and scanning/fixing it took 13 hours! Feel free to poke around and just know that this was started when I was only two weeks into my 9 week bootcamp and it has a long way to go because after starting it I had almost no time to update it. Cool! Now to push up a couple of small updates. Now that my computer is happy again this should be more fleshed by the end of the weekend.


2013-07-23 20:32:17

OOP! I've been hearing a lot about this for years and am now finally learning it myself. So far on small projects it doesn't make much sense but I can see the power of it on large projects. Contained variables that have less chance of eating each other up, build something once, use it many times. Edit one thing used many times etc. Procedural code is what everything else is. Procedural reads like a set of instructions from top to bottom. At some level OOP is the same way but blocks of code can be called from the top to bottom instruction set many times so it's less linear.

Instant Search and Pagination

2013-07-22 19:45:47

Been at this nearly a month now with no less than 12 hours days at the keyboard. We're now making jokes in code, dreaming in code, and seeing code. Still building things things that at first glance seems impossibly elite is awesome. This project is the last in the Ajax series. With a database of over 300 entries I used Ajax to create a table as you type in your search field. It also paginates the results in real time. No more typing and hitting "submit" then seeing nothing and trying again. The feedback from the database is instant.

Note Board Project

2013-07-18 19:21:01

Ajax is an interesting beast that allows partial page refreshes that happen seamlessly. If you've used Google search recently and saw how the search field repopulates as you type then you've seen ajax in action. It's a huge departure from the past where a page was requested, generated on the server, and sent to the client browser. The notes project we did for Coding Dojo is a fun way to play around with fluid elements on the page, supported by the database on the back end.

Coming soon to the code examples

2013-07-16 10:47:54

image of the wall

Timing is everything. Had I come out with something like this before facebook I would soon be a billionaire. I guess my rewards for completing it will have to be limited to completing a Coding Dojo exercise and getting a lot of query and, $_SESSION, validation and $_POST practice. I also had some fun populating it with somewhat random lyrics from Pink Floyd's "The Wall" (no I'm not demented enough to come up with that on my own).

Foreach hour of the day....

2013-07-13 00:12:21

image of a sleeping baby

Well here we go. I'm sitting here in bed after midnight coding away with my 2 year old Mikala asleep in her crib just feet away. Even though I have gotten no more than 5 hours of sleep each night this week due to the coding dojo, a long commute and my kids, I'm unable to put my laptop down. I'm super excited to see my new blog working for the first time. I'm creating this blog post just so that I have two and can work on the foreach loop =)

Testing 1....2... hey is this thing on?!?

2013-07-06 21:33:45

Picture of a microphone

Having done one of these in 2000 from scratch and not needing anything super fancy like Wordpress I chose to simply create another blog. Crazy huh? Not really... and a great way to get a PHP refresher.

Photo of Bryan Myers