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.

It all started with a Picture – Or How I Gained Muscle and Lost Weight

5207_248070920611_6408194_n

I have never paid attention to my weight growing up and I always thought that I was skinny. I saw the picture above and I thought, wow, I have a belly. It wasn’t much of a belly, but I was definitely overweight. I wasn’t exercising much during this time and I was drinking a lot of soda and sugary drinks up until this point in my life. This was around the year 2010 that I first noticed it and started to do something about it.

At this time is when nike came out with the running tracker, So I thought, hey I am going to start running. So I went to the apple store and bought the thing that you put into your shoe and went out for a run. I had never ran in my life, I had never willingly exercised in my life either. This was a new world for me!

So im out running and I am not really paying attention and I step into a planter and twist my ankle. I come home two minutes later and erin asks, I thought that you were going to go for a run. That was my first running experience, And I thought it was my last, I had given up on running thinking that my ankle would never let me run.

So I started to think about it, running is good for the heart, and it is good for the lungs, and most importantly, it is good to be able to run away from zombies (for the record I don’t think that there is going to be a zombie apocalypse, but it is a fun reason to exercise). I have always had weak ankles and I left it at that, never thinking that I could fix my body. But that kept on my mind for a while, And I googled how to strengthen your ankles. One of the two exercises that I saw was to just stand on one ankle when you brush your teeth, And the other was lifting dumbbells with one foot. I started doing both of these things religiously.

This was the start of me working out. This is the first part of me.