Setting up git for deploying website updates (Dreamhost and other hosts)

For this site and the blog I built for my company, I use WP Engine, a WordPress host (which I can definitely recommend).  WP Engine has a built in staging environment as well as the option to deploy to staging or production via Git.  If you don’t know what Git is, you can probably stop reading now.  If you are still here and want to know about Git, lmgtfy.

I’m currently working on a new website for my church, as the current site looks like this:

Since WP Engine can be costly, and Dreamhost offers free hosting for non-profits, we are going to save some money and go that route.  Since I’ve come to enjoy the ease of deployments with Git on WP Engine, I immediately started looking for a way to do the same thing with Dreamhost.

I don’t have a staging environment (nor do I need one for this project presently), but otherwise the end result is nearly the same.  Thanks to Brandon Evans for the bulk of the setup, and Etel Sverdlov on Digital Ocean for the SSH setup instructions.

SSH into your server and init the repo

  1. Make sure you have shell access to the server, in my case, Dreamhost has a wiki article on how to enable.  Other hosts, if they give this access, likely have a similar setting.
  2. ssh into your server:
    ssh user@yourdomain-or-server.com
    and enter your password.
  3. Make sure git is installed on your server.  If it is not, there are a number of ways to do this.  Here is how Dreamhost suggests…if you have terminal access, just use apt-get.  I didn’t have to do any of this, since git was already present on my server.
  4. Create the directory that you want to house the repository:
    mkdir website.git && cd website.git
    git init --bare

    Notice that we are creating a bare repository.   Per Jon Saints, bare repositories are for sharing, as opposed to the standard git init repos that are for working.

  5. The bare repository is now created, but we aren’t done. We need to have the files we push to the new repository automatically moved to the folder we need them in.  In my case, it was the website (WordPress theme) directory.
    cat > hooks/post-receive
    
    #!/bin/sh
    git --work-tree=path_to_folder --git-dir=git_repo.git checkout -f
  6. When you’re done typing everything from #! (hash-bang) to checkout -f, type control-d to save the file.
  7. Next run
    chmod +x hooks/post-receive

    to allow that file to be executed by the system.

  8. Next we need to exit SSH

Add the new repository locally as a git remote

This is pretty standard git and I don’t think I need to outline this for you.  One thing to note is the location of your remote:

git remote add web ssh://user@yourdomain.com/home/user/yourRepo.git

Copy your ssh key to the remote

cat ~/.ssh/id_rsa.pub | ssh user@123.45.56.78 "mkdir -p ~/.ssh && cat >> ~/.ssh/authorized_keys"

This lets you not have to enter your password every time, similar to an ssh setup in github.

You’re done!

Now you can git push to your new remote repo.  You’ll get a message like this if you are successful:

Counting objects: 30, done.
Delta compression using up to 4 threads.
Compressing objects: 100% (17/17), done.
Writing objects: 100% (17/17), 5.16 KiB, done.
Total 17 (delta 11), reused 0 (delta 0)

I don’t consider myself an expert, but wanted to share since it took me a bit to get a grasp on all the steps needed.   Thanks again to Brandon Evans for the bulk of the setup, and Etel Sverdlov on Digital Ocean for the SSH setup instructions.

Share on FacebookTweet about this on TwitterShare on RedditShare on Google+Share on LinkedInEmail this to someonePrint this page

Composting: I do it and you can too!

There’s nothing quite like the smell of decay.  Actually, if you are composting properly, it doesn’t smell much at all.   Plus, when you compost, you get free natural fertilizer for your garden or other plants AND reduce the amount of waste you are sending to the landfill.  (And no, that waste doesn’t compost the same way at the landfill.  It decays without enough oxygen or carbon, and produces a foul methane gas mixture.)

“But compost bins are pricey.”

Sure you could spend $100+ on a compost bin from Home Depot or somewhere else, or you could make your own for under $15.   This is what I did (I actually made three of them) and the compost is flowing.  My bins are made from standard 32 gallon plastic trash cans, with a bunch of 3/4 inch holes drilled in them. DSC00830 This design has a few advantages and a couple disadvantages.

Pros:

  • Cheap
  • Easy to start
  • Doesn’t take up much space
  • Keeps out small animals looking for a snack
  • Small enough to move, even when full

Cons:

  • Difficult to create hot compost (it is possible, and I have done it, but even if you do get it hot, it doesn’t stay hot for long)
  • Requires drilling some holes

Collecting kitchen scraps

DSC00838One we started composting we had to change our process.  Alyssa does most of the cooking, so she had to stop throwing away fruit/vegi scraps, coffee grounds, and other compostable things, and start saving them.  At first we just used an ice cream pail. It worked well, but wasn’t the nicest looking thing.  Then after it got colder and we didn’t want to go into the garage to get it (we didn’t want a dirty ice cream pail in the kitchen), I bought a nice looking one that can stay on the counter.  It has a cover with a carbon filter so it vents, but doesn’t smell.  It matches our kitchen and works great.

Letting it breathe

DSC00837The most important thing needed to maintain a smallish DIY trash can compost bin, besides the correct mixture of Carbon and Nitrogen, is turning it.   If you don’t turn your compost, it really starts to smell.  They make specialized compost tools, but I just use a garden fork.  At first I tried a garden shovel, but I quickly realized that it wasn’t going to cut it due to the weight and compactness of compost, so I picked up my pitch garden fork from Menards.

Ramping it up

This is working fine for me at the moment, but if I ever want to speed up my compost efforts there are two ways I’m looking to go: 1) Start vermicomposting (worm bin) and 2) get a bigger compost bin/pile.

Worm bins

Worms actually create even richer compost, and some consider vermicompost as “black gold”.  I plan on doing a DIY flow through style bin based on this design.  I’d also need some “red wigglers“, which according to /u/GrandmaGos are dirt cheap at a bait shops. (Thanks for the tip!)

Larger bin/pile

If we ever decide to ramp up our efforts even more, I’d consider building a larger bin out of wood or just buying a cheap larger one.  A larger bin would be able to accommodate more leaves in the fall, but would also require more “green” materials than we’re currently creating.  We’d maybe look at getting used coffee grounds from a local coffee shop and/or growing some comfrey (though we might do this anyway).

Other resources

How to compost: http://eartheasy.com/grow_compost.html
Worm composting: http://compost.css.cornell.edu/worms/basics.html
Compost bin designs (Cornell): designscompostingsystems (pdf)
Great gardening Youtube channel: One Yard Revolution
Me (I’ve done a bunch of research, if you have questions ask me in the comments…)

My bins:

 Happy Composting!

Share on FacebookTweet about this on TwitterShare on RedditShare on Google+Share on LinkedInEmail this to someonePrint this page

I like birds…. (and my bird feeder)

As I mentioned in my post about becoming a homeowner, I got weirdly into bird watching.  Sometimes I feel like I should be retired, because I remember my Grandma and Grandpa Pautz always watching the birds at the bird feeder by their camper.

When we first moved in, the previous owner of our house left her plastic tube feeder and the shepherd’s hook that held it.  Once it warmed up a little, I bought some cheap seed from Menard’s and decided to give it a go.  I was very fascinated by the birds that came, and was impressed that such a cheap feeder could attract a variety of birds.  Unfortunately the feeder met its match at the less-than-perfect frisbee throwing ability of my younger brother Joe.  The frisbee hit it and it completely shattered.  It was quite an explosion of seed and plastic.

By this point I was committed to the birds, so the next time I went to Menard’s I picked up the Wild Wings Cedar Bird Feeder, which is made by Nature’s Way and branded as such elsewhere.Nature's Way Bird Feeder

It is designed to attract larger birds as well as smaller birds.  I noticed with the old tube feeder, that cardinals and blue jays and other larger birds only ate what fell, because the feeder wasn’t large enough for them to safely land.  The Nature’s Way feeder solves this by combining the feeding ports with a larger bird hopper style.   It attracts such a variety of birds, I really don’t need more than one feeder, unless someday I want to see some hummingbirds or orioles.

The other problem I had with the tube feeder was difficulty in cleaning it out.  The Nature’s Way feeder has removable acrylic windows and a removable grate on the bottom.  This makes it really easy to clean.  The grate is great (see what I did there) because it keeps water from sitting in the seed after it rains, which prevents bacteria/mold.

Finally, this feeder looks nice. Much better than the cheap plastic tube feeder.  It also comes in a bamboo version, a wavy style, or a wavy style bamboo version on Amazon.  I can whole-heartedly recommend this feeder based on about 6 months of use.  (I’ll give future updates on how it does over time.)

Happy bird watching!

Share on FacebookTweet about this on TwitterShare on RedditShare on Google+Share on LinkedInEmail this to someonePrint this page

Binge this: The Newsroom

A couple weeks ago, my dad asked me and Alyssa if we had seen any of HBO’s The Newsroom.  Neither of us had, so my dad told us to at least watch the opening scene.  We watched it right then and there.

After seeing those 8 minutes of excellent cinematography and even better writing, both of us were hooked.  Fortunately the first two seasons were streaming on Amazon Prime Video, and the third season we watched during our 30 day trial of HBO Now.  We finished the series (25 episodes) in two weeks, which says something, since we have two small children.

The first season was excellent, though I read critics who thought it was a bit preachy.  I didn’t think so, I thought it was really honest.

Here’s one good example about RINOs and the Tea Party.

The 2nd and 3rd seasons focus on broader season arcs and less on the actual news that is reported.

Overall, this is an addicting series, with excellent writing and acting.  It gets a bit political and there is a lot of adult language, but it is a great show.  It also made me look at Jeff Daniels much differently than this:

harry dunn

Share on FacebookTweet about this on TwitterShare on RedditShare on Google+Share on LinkedInEmail this to someonePrint this page

Reflections on being a homeowner, 6 months in

Alyssa and I have been homeowners since April and I figured it would a good time to reflect about what I’ve learned and my likes and dislikes.

I enjoy yard-work

When we first moved in the middle of April, the first thing I focused on was the leaves that weren’t raked last fall.  I had to buy my first rake!  It gave me a nice sense of accomplishment to both complete this task as well as to see how much better the yard looked upon completion.

After the grass in the yard started growing I had to mow the lawn.  At first I used an old mower that my uncle gave me, and after some struggles, decided to just buy a new one.  (Let me know if you are in the market for a new mower, I could pass on the research I did when I bought mine.)  The new mower is a variable self-propelled mower with bagging, mulching, and regular discharge options.  It is a joy to cut my lawn and the results are more than worth the effort.

There are a number of other things that I do around the yard, all of which I really hated to do a part of my chores growing up.  The years of not doing them, and the fact that someone (my dad) isn’t telling me to do it, makes these things more enjoyable.

Conservation is fun

I’ve always been pro-recycling and pro-environment, since I have a deep ingrained love of the outdoors, stemmed from my lifetime of camping/hiking/outdoor sports as well as my duty to protect  God’s creation.

Since owning our home, I made two cheap garbage cans into compost bins (drilled some holes in it) and we have been composting all our kitchen scraps and appropriate yard waste.  It is impressive how much less garbage we generate when composting.  Plus, pitchforks are fun.

We also bought a couple rain barrels and have been using rainwater to water our plants outside.  Next spring when we plant a garden instead of just using a bunch of planter boxes, I want to rig up an irrigation system with the rain barrels.  We’ll see if that happens.

You think differently about things

When we rented, we didn’t want to spend much time, effort, or money improving things, unless it came to cleaning.  We knew we weren’t going to be living there for very long, so it just didn’t make any sense.  Since we’ve been homeowners, we’re frequently making small improvements here and we appreciate the control and learning as we go.

I hate painting

Shortly after we moved in we re-painted 4 rooms.  Paint is relatively cheap and we couldn’t justify paying someone else to do it, so Alyssa and I bit the bullet and did the paint ourselves.  We learned some things as we went, and one of the things I learned was how much I dislike painting. I also learned that swatches aren’t enough for Alyssa to be happy with the color.  We needed to get samples.  (Repainting the kitchen right after we painted it the first time told us this.)

There is always something more I could do

…but that doesn’t mean I have to be constantly busy.  I could work on my house full time, but that’s not the point.  It will never be perfect.  Sure there are things I prioritize, but some things aren’t worth my time or money right now.  Maybe they will be down the road and that’s fine, but I’ve quickly come to the realization that I can’t do it all now.  I also don’t want to.

Am I happy?

I don’t have any regrets thus far.  When we made the offer, I was definitely hesitant.  Committing to paying that amount of money will do that to a person.  What if something went wrong?  What if the inspector missed something crucial?  I got over my fears and since the house checked almost all the boxes in our search, we went for it.  Alyssa and I are both really happy with the decision.

Share on FacebookTweet about this on TwitterShare on RedditShare on Google+Share on LinkedInEmail this to someonePrint this page

Breakfast Cereals, Ranked

I eat breakfast every single day, and most days I eat cereal.  When I say cereal, I don’t mean that dog food stuff that some people eat or the cardboard that others eat.  I eat cereal that tastes great, and may or may not be that great for me, though mostly the fact that I’m eating breakfast is what is really important.

The rules for this list are simple.  First, every cereal on this list is still manufactured and sold in stores.  Someday I may do a tribute to great cereals that are no more.  Second, every cereal on this list I have personally tasted.  While you’d think this would severely shorten my list, you’d be wrong.  I’m a cereal lover and connoisseur.  Finally, I’ll add there are not many cereals on this list one would consider healthy.  I usually steer clear.  Cereals like Special K, Total, Kashi, etc. are not on this list because I don’t eat them.  And I probably won’t in the future, unless you convince me otherwise in the comments.

Without further ado, here is my list of breakfast cereals, ranked: Continue reading

Share on FacebookTweet about this on TwitterShare on RedditShare on Google+Share on LinkedInEmail this to someonePrint this page

Life of Pi and the Problem with Relative Truth

Back at the end of 2012, I previewed Life of Pi via a sponsored post.  Part of the sponsorship was a free copy of the novel (movie tie-in paperback).  In summer of 2013 I got around to reading it and Summer 2014 I was able to view the film, on my parents’ DVR.

The book is well written, with an good storytelling and interesting plot.  The film is just an abbreviated version of the film, with brilliant visuals.

I won’t spoil any major plot points, but the themes and some of the logic of the main character Pi to me seems flawed.  The major theme of the story, solidified by the ending, is that you can choose your own truth and choose what to believe as truth.

For example, the story starts off with Pi as a Hindu, and very early on it progresses with him becoming Christian and Muslim, all while staying Hindu.  He sees no problems with being all three at once.

I don’t claim to be an expert on Hinduism or Islam, and I have a lot more to learn about and from my Christian God, but I do know that Jesus clearly says “I am the way, the truth, and the life. No one comes to the Father except through me.”  There is one and only one way to know God in heaven, and that is through Jesus.  Faith in what he has done: he lived the sinless life we could not live and he died the death we deserve.  Then he conquered death and the devil by coming back to life from the dead.

Pi’s problem was that he was more interested in following rituals and being part of the different religious communities.  He cared more about how religion made him feel.  It enhanced his earthly life.  He really didn’t get the eternal point of Christianity or accept the Truth.  Author Yann Martel doesn’t get the point either.  The truth is without Jesus, mankind meets eternal suffering in hell.  With Jesus is paradise. You see, “For God so loved the world that he gave his one and only Son, that whoever believes in him shall not perish but have eternal life.” (John 3:16)

I’m going to end with a quote from my lovely wife Alyssa.  I couldn’t say it any better, so I’m going to just let her say it.

That’s the beauty and the pitfall of relative truth – sure you can decide what you want to believe and that’s all fine for the here and now, but what about later?  How can believing what you want in this life have any bearing or control over an eternity that you can’t be certain about?  Of course one might choose to believe there is no eternity and then just forget the whole thing- but I don’t really think that even someone who believes in relative truth would be really comfortable with that. “He has also set eternity in the hearts of men; yet no one can fathom what God has done from beginning to end.”(Ecclesiastes 3:11) We know innately that there has to be something more than this life, but I think people think they can ignore that inkling because they can’t control what happens in eternity. Ultimately, that’s folly. It’s foolish to believe whatever you want, to just be concerned about this life, because just because you believe in some arbitrary thing does not actually make it real (“what does it profit a man to gain the whole world but forfeit his soul…” or something like that).

Share on FacebookTweet about this on TwitterShare on RedditShare on Google+Share on LinkedInEmail this to someonePrint this page

Appreciate the things we don’t get anymore

Last week my company held its second annual User Group conference, where we invited all of our clients and to come to Milwaukee for sessions, networking, and to meet our team.  This year it was held at the Pfister Hotel, a luxury hotel built in 1893.

Being in such an old building and experiencing the awesome architecture reminded me of my time in Europe with my college choir, seeing cathedrals, opera houses, and old churches.

Sitting at lunch last Tuesday, talking with one of my coworkers and a couple clients, I commented on how cool the ceiling was in the Imperial Ballroom.  Interestingly, my coworker really didn’t care about it at all.  I love the level of detail, the work involved, and the fact that most of it was likely hand-carved.  I appreciate it because this level of decor and detail is pretty much extinct.  Everything nowadays is more function over form, mostly because of cost.

I appreciate functionality as much as the next guy, but late 1800s architecture really is special.

The Imperial Ballroom at the Pfister Hotel, Milwaukee, WI

Share on FacebookTweet about this on TwitterShare on RedditShare on Google+Share on LinkedInEmail this to someonePrint this page

LOST is 10 years old…and I remember it like it was yesterday

I‘ve read a bunch of articles about LOST, but The Verge posted a great one about how with all its flaws and craziness, the thing that keeps you watching is the characters and their relationships.  I’ll buy that.

Maybe a binge of LOST is in order….

Also, what are your thoughts on the show?

Share on FacebookTweet about this on TwitterShare on RedditShare on Google+Share on LinkedInEmail this to someonePrint this page

Raised by Penguins? Bat nipples? George Clooney?

I wasn’t fan of its predecessor, but this sequel gets a couple of things right where Batman failed.  It certainly isn’t a great film, and I’m rather impressed these films made enough money that they made four of them.  In any case, I think Batman Returns may be the best film in this series.

First things first, Tim Burton really toned down the “iconic shots” in this film and majorly increased the plot (i.e. it had a plot this time).  There are 2.5 villains: the Penguin…a monster played by Danny DeVito, Christopher Walken plays himself (actually he plays Max Shreck, a power monger business man), and waffling Catwoman…played with a lot of crazy by Michelle Pfeiffer.

Overall, I liked this one better than the first one, but the whole raised by penguins thing still bothers me. 7 ramheads out of 10.

7of10

The 3rd film, Batman Forever, has Val Kilmer, and he plays a weird, but not terrible Batman.  This has a very cartoon or video game feel, with a very enclosed world.  There are a handful of villains, all of them pretty boring.  3 ramheads out of 10.

3of10

TBaneJShe 4th film, Batman and Robin, is bad.  George Clooney is a terrible Batman.  He has no presence on the screen at all.  You don’t care about him or even realize he’s there most of the time.  This film has the worst, cheapest, feel to it.  There are a new handful of villains, including a pretty lame Bane. The only this that is interesting is the Batgirl story line, played strongly by Alicia Silverstone. 2 ramheads out of 10.

2of10

Interestingly, I liked the 2nd one best, but it is less memorable than the first one and the last one.  The 3rd is totally forgettable and also bad.

Here ends my blast from the past to the Batman films of my childhood.

Share on FacebookTweet about this on TwitterShare on RedditShare on Google+Share on LinkedInEmail this to someonePrint this page
« Older posts

© 2016 Jimmy's Sweet Blog

Theme by Anders NorenUp ↑