Categories
Samuel Technology

Hosting wordpress on multiple Amazon EC2 instances

I just wanted to do a quick tutorial on a solution to a problem that I recently had.  We are hosting a wordpress site on 3 amazon EC2 instances, this was causing an issue where the local files of each server were getting out of sync when someone made an edit in the wordpress admin (installed a new plugin, uploaded an image ect….). This article is as much of a resource for future use for myself so please pardon the lack of polish.

 

Programs used:

cgwyn: http://cygwin.com/install.html

wamp server: http://www.wampserver.com/en/

I started by hosting the wordpress site locally on my wamp server.  I’m going to leave out how to setup wamp server, a great resource for that is (setting up wamp server).  Any changes/updates to the site are first made on the local dev environment and then with rsync are pushed to the 3 EC2 instances.  So lets get into the rsync setup and commands:

1.) Install cywyn (note make sure to install rsync and ssh packages)  Use the search bar in the top right and search rsync and ssh when installing, then make sure to click the + sign and click the actual package name so that the words “skip” are removed.

2.) create a sync file and save it as a shell file in C:\cygwin64\home\your-username\  The sync file I used is shown below, you will need to replace with your local computer info and remote server info:

rsync -avz /cygdrive/c/wamp/www/youre-file-name/ your-user-name@SERVER-IP:/path-to-your-public-html

3.) open up cgwyn and run the following commands:

    chmod +x your-file-name.sh

and then you can run

./your-file-name.sh

Thats it, if successful you will get asked if you trust the remote server (only on first login) and you will also need the remote server password

Categories
Fixing Stuff Samuel

Re: Color Blind

I starting replying as a comment to the great article Julia wrote about affirmative action, if you haven’t read it you can find it here . Julia has such a great perspective on life, and I loved her article. I also love the ending line (sharing a strong opinion is liberating). 

Seeing as I am neither black, nor grew up in a poor family with only 1 parental figure I am confident that I’m woefully unqualified to pass judgment on affirmative action, however I feel that both affirmative action & the bit on female rights that Julia touched on fall under the bigger umbrella of “fairness” which I would like to share my perspective on.

Julia touches on a very sensitive subject with her paragraph on female sexual abuse. I agree with her 100% that blaming the victim is the exact opposite way to go. Women should feel comfortable wearing whatever clothing they want too, and no one should ever make a sexual comment or advance towards a women that is unwanted.  That being said I would like to see women (and men) everywhere take their personal protection into their own hands. This is one of the biggest reasons that if I ever have a daughter I will be teaching her martial arts.  The world is a hard, unfair place.  People everywhere will take advantage of you if you let them. Women especially need to empower themselves to defend themselves if/when necessary.  This does not nessisaraly mean physical conflict, but the confidence to assert yourself verbally starts with the knowledge that you can physically defend yourself.  The best way I can explain my point is to use the words of my Kempo instructor in.

“You need to define your personal line of comfort for all social interactions.  The line is completely your choice. It does not have to be related to the law, or any external view point what so ever. Its your line, and your line alone.  If your line is someone putting their hands on you without your consent, then when that line is crossed you execute your game plan and that’s all there is too it. No hesitations, no guess work. No should I do x,y,z. Your line is crossed, and there is a consequence for whoever crossed it.  Which brings us to the next point, you have a simple “go to” game plan for any situation where your line has been crossed.  Again there is no guess work on what you will do, you have a simple plan, you execute it and the conflict is brought to a conclusion.  But the biggest thing I want to stress is that our own personal safety is OUR RESPONSIBILITY, no one else’s.  Of course we strive to live in a society where bad things like female sexual harassment don’t happen.  But the facts of life are you control whether someone takes advantage of you.  If you don’t stand up for yourself, no one else can.

 

Affirmative action for college entrance is an extremely complicated situation.  Ultimately I think something needs to be done to help even “the playing field of life” for kids.  Many people are born into basically impossible situations. 1 or no parent, no social support system or extended family, not enough money to live adequately. For someone like that to prosper they need to have some advantages pointed their way.  In lew of college entrance I think we would be a lot better served a society if we tried to help kids sooner. I think once they hit college age that its too late. I’d love to see something done much earlier, but again I’m not sure what this would be exactly…. I think I will give it more thought and maybe discuss with Julia to try and form an idea for something better than the current system we have in place.

Categories
Twenty Somethings

2 great songs to set as your morning alarm

If your like me and waking up in the morning is a real struggle, you may find one or both of these wake up songs helpful. I know I enjoy starting my day with them:

https://www.youtube.com/watch?v=qu5q_awytxU (as an alarm)

https://www.youtube.com/watch?v=nNCSxqcOOTQ (as my snooze alarm)

Categories
hockey

Blues vs hawks

It has been a hell of a series so far between the Blues and hawsks.  Even though the series is tied 2-2 I cant help but be somewhat down about the way the series has gone thus far (blowing a 2-0 series lead, our captain getting injured on a cheap hit, us loosing game 3 even though we outplayed the hawks).  I still really like our chances of winning the series, I’m just starting to have the normal “doubts” creep into my head, any Blues fan knows what I’m talking about.  It has been our MO to play well during the regular season, and then “find a way to loose” in the playoffs as far back and I can remember.  I have thought long and hard about this, and I think the historically poor playoff performance can be tied back to the way we structure out teams.

Our teams are always built around “4 productive lines” contributing and chipping in to win games.  This works really well in the regular season for a lot of reasons. The biggest of these reasons is probably that injuries do not effect your team as much if you are rolling 4 lines and have everyone on the team “pulling on the rope”.  In the playoffs however, during crunch time with the game on the line your bench shortens and  your team is effectively reduced to 6 forwards, 4 defensemen & 1 goalie.  With that in mind lets look at the the Blues top 10 players and compare how we stack up:

Blues

Backes (out)
Steen
Sobotka
Oshie
Tarasenko
Schwartz
Pietrangelo
Bouwmeester
Shattenkirk
Jackman (or polak)

The question you have to ask yourself is can that group win a game in crunch time.  Anyone who follows the game would tell you that is an excellent group of players, but can they win with the game on the line…… I personally think this is one of the best “core” groups we have ever had.  If Backes is out for any extended period of time it REALLY hurts our chances.  Its possible Ott, or Morrow could step up short term and fill some of the void he leaves but its not sustainable to rely on them for a long period of time to do that…. Looking forward to game 5 Friday night, and hopefully the Blues go up 3-2.

 

 

Categories
Samuel Technology

How To Get Rid Of Internet Ads (Including Ads on Youtube)

One thing that I really despise is when people or services interrupt me.  Some of the biggest offenders in this category are online ads.  A great little tool that does a really good job of fixing this is Ad Block Plus.  This browser extension is available for all major browsers including chrome and firefox…. you shouldn’t be using IE anyway unless you are forced too.

Once you install it you can use this powerful extension to completely remove ads on facebook and  youtube (or any site you want too).  You can also tweak the settings to help prevent websites from tracking your browser sessions and your overall internet history in general.  Another great feature is you can allow certain types of ads, or ads from certain websites… gasps why would you want to do that?  Simple, your favorite blog/news/entertainment site is only around because it sells ad space.  If you like a website enough to support it, you should then add it to the Ad Block white list so you will see their ads.

Categories
Samuel Twenty Somethings

Making Life Easier (aka lowering your overhead)

I get asked quite often how I’m able to go through life just doing things my own way and seemingly not paying much attention to authority, or the normal “rules of the road”.  I work for myself, I do not pay much attention to time or schedules, and to most people I don’t seem to be taking life all that seriously (which is true, I work very hard and I’m very competitive but I do not get worked up about things that most people do).

My answer to everyone is always very simple, and I fear very over-looked. I tell them to  Lower your overhead. So what do I mean by that, I’ll explain.  Everyone has expenses that you cant avoid (food, shelter, clothes, entertainment ect…).  Where a lot of young 20 somethings fall short (and in turn make their life much harder) is that they don’t focus on lowering the “re-occurring fees”.  Personally I try to limit my recurring fees, while getting other people to pay me as many re-curing fees as possible.  I’ll give a few helpful examples below, but I want to make sure and stress this point.  Not having enough money to live is the root of many of our life problems.  The key is not to make more money, the key is to lower the bar you need to hit every month while still keeping your quality of life high and giving yourself enough money to enjoy your life (aka pay for entertainment).

-Housing: Using the FHA (first time home buyer) program I purchased a home with 3.5% down.  I bought a fixer upper so this 3.5% payment equated to just under 5k.  Now when you put so little money down you are forced to buy what is called PMI insurance until the value in equity that you have equals or exceeds 20% of the value on your home.  This is not a problem at all if you buy a home that needs updating.  For the next 8 months I fixed up the house, and then got the home re-appraised.  The house appraised for 40k higher than my purchase price, PMI insurance dropped, happy day.  From there I rented the home out, and took what was a 900/month mortgage payment and turned that into a positive cash flow of 150/month through rental income.  Net effect I make 150/month to live in my house.

-Transportation: I’m luckier than most in this category due to help from my father. Most young 20 somethings go out and purchase a somewhat fancy/not needed vehicle after graduation from college.  This is such a silly idea for 2 reasons. 1 they get saddled with a car payment, and 2 they pay high insurance rates to ensure the car until they turn 26.  I drive an 1995 dodge Dakota.  Insurance cost 500/year and there is no vehicle loan payment. Net effect: I pay 100/moth for gas and 38/month for insurance.

-Food: One of the best things you can do is make your own food.  Its often healthier and way cheaper.  A few keys that I have found help me are that I find 3-4 meals that I really “love” and would be happy to eat all the time.  Those are reserved for dinners, and I always have the ingredients to make these meals on hand.  Examples:

-Frozen turky burger, mixed greens salad, home made salsa, tofu ice cream bar.

-chicken breast with brown rice, sweet potato, mixed greens salad

-solid white albacore tuna mixed with yogert ranch and white vinegar sauce, steamed broccoli

-Clothing: A lot of people my age spend all kinds of money on fancy clothes.  Now I’m all for having a couple nice outfits that you can wear if you are going out, or going to a business meeting and need to look presentable.  But beyond that, I do absolutely zero clothes shopping.  I wear hand me downs from roommates, I wear old clothes from growing up, and that’s about it.  It helps that generally I’m working from home so the dress code is pretty lax, but most people spend so much time/energy/money worrying about the clothes they wear… a much better strategy is to spend that time on exercise/eating right.

 

Overall takeaway: If you just take some time and focus on lowing  your cost for housing, transportation and food you will be amazed what kind of positive impact it will have on your life.  When its all said and done I only “need” about 600 dollars per month to live on.  Now I spend more than that, especially when you factor in services that I purchase to save the most valuable asset we have, our time.  But when push comes to shove it is so liberating to know that you don’t need to come up with a ton of money to live.  It gives you the freedom to really pursue the life that you want.