You are doing it wrong

This is a post about how much I have grown with WordPress and how I try to make it easy for people to use.

I went to WordCamp sf 2013 this past year. I love going to word camps I learn something new every time I go to one. And I love watching Matt give the state of the word. But i am actually over it now.

But anyways, while Matt was giving his speech there was a guy in front of me coding a PDF upload form in a wordpress install. There was a custom upload browse button at the bottom of the post screen. And I remembered wanting to so this myself for awhile and I looked into it. It just seemed too complicated and I never really finished it on a project. I don’t remember where or why or when or anything but I remember working one one.

Back to this guy, the PDF would be shown on a calendar if there was a PDF uploaded from this special form. The form looked awful, and it just didn’t seem intuitive. I didn’t think of it until the plane ride home, but I should have gave him an easier way to do it. Which is the wordpress way. I was just more into listening to the state of the word.

If I was asked to do something like this now, I would just have the person upload it to the post and then on the calendar if an attachment equals to PDF then show the link to the PDF. Custom upload forms are just annoying and more fields are just too complicated.

Batch Resize Images in Terminal

I Always resized images in Photoshop by creating an action and then have it run through the images, BORRRRING. It would take forever to do this and just take up time. So I wanted an app that could do it, and there isn’t any free ones or ones that I could google quickly. So I went down the smush.it way, but I didn’t want to upload every image to yahoo. I have about 36 gigs worth of images to resize. So I used the google and found mogrify which is a command line tool for using imagemagick.

So if you are on OS X:

brew install imagemagick

Which will install imagemagick for you.

Then navigate to the folder that you want to batch resize images, and this does it recursively so be careful there is no going back. Do this on a text folder just in case. This will resize all the images in the folder to a width of 980. This will only make images bigger than 980 width smaller. If there are smaller images, say a thumbnail image, it will not make them bigger.

find ./ -name "*.jpg" -exec mogrify -resize 980">" {} \;

If you have a lot of images you will need to change jpg to jpeg and then png and maybe JPG, JPEG and then PNG.

Instagram is the first thing I check in the morning.

I remember a time when I would look at email first, just after I woke up. This is the last thing I check, I sometimes go a whole day without looking at email. It is different now, because I am not working and don’t need to constantly look to see if someone has contacted me. Sidenote, I am not working because I am a stay at home dad, But that is besides the point. Facebook used to be what people checked first in the morning. And I suspect that is still the case for those who don’t have an instagram account. I used to log into facebook to only look at the pictures that people posted. Now all the pictures on facebook are of what people posted on instagram. Which makes me look at facebook less, because I have already seen the pictures. I do my best not to post the same picture to facebook as I did to instagram. And you should do the same too. Because I am looking less at facebook because of it.


One of two of My babies.


I love takeing pictures of clouds.


The last time I saw JVH #ripvjh.

How to Authenticate your Tumblr app using Twiitter’s oauth

строителство на къщиI have a bunch of pictures that I wanted to post to tumblr, I wanted to queue them up so it wouldn’t just post all the pictures in one time. I had a php version of this, but it didn’t seem to work, so I went looking for a newer version. I then found out that tumblr has v2 of there api, I don’t know if this is the reason why my first script broke. But I went looking for another script that could do the trick, and hopefully much better. So after some googling, I found Photo 2 Tumblr, which seemed really complicated at first (also because I was doing this late at night, I could not for the life of me figure it out).

So anyways, I also wanted to learn how to register via oath, that seems like something I should know how to do.

So I figure out if I can run python on my computer, Check (OS X).

Then I figure out how to run python from the command line, Check (Python auth.py).

Then I Spend a few hours trying to figure out how to auth my tumblr script. The script needs a few edits to make it understandable for tumblr since tumblr doesn’t use PIN technically. So t hese are the steps to authenticate your tumblr app via twitter’s auth.py:

1. $python auth.py
2. go to the url that it tells you to go to
3. Click on allow in tumblr
4. copy url you are returned to: ex google.com/?oauth_token=927839871293871928hikjb copy this long key
5. Back to command line, type y (yes authenticated)
6. Paste the pin number from step 4, into the command line
7. you get your oath token and secret

Now you can go back into your tumblr app, and enter in all the required information.