How to access the RQM (Rational Quality Manager) API with Basic Authorization

To make a GET request to an RQM server you need to set four HEADER values

Accept: application/xml
Content-Type: application/rdf+xml
OSLC-Core-Version: 2.0
Authorization: Basic BASICAUTHTOKEN

The generate the BASICAUTHTOKEN, perform the following operation [credit]

String userpass = username + ":" + password;
String basicAuth = "Basic " + javax.xml.bind.DatatypeConverter.printBase64Binary(userpass.getBytes());

The endpoint will look something like this

https://jazz.net/sandbox01-qm/process/project-areas

Here is the cURL version of my Postman

curl -X GET -H "Accept: application/xml" -H "Content-Type: application/rdf+xml" -H "OSLC-Core-Version: 2.0" -H "Authorization: Basic BASICAUTHTOKEN" -H "Cache-Control: no-cache" "https://jazz.net/sandbox01-qm/process/project-areas"

Bosch EL-51253 Power Max 30 Amp Electric Vehicle Charging station wall installation

I had a very difficult time finding installation examples for the Bosch EL-51253 Power Max, so I want to add this image to the collection for future references:

My house was pre-wired with 8 gauge wire to a 40amp breaker. The wires comes out at an electric box, so to run the flexible conduit into the charger, they had to put in a plate with some fancy connectors. This is what it looks like

bosch-el-51253-power-max-30-amp-electric-vehicle-charging-station

 

Oval clocks: realtors treat house images like online dating profile pictures

I’ve seen using Redfin and Zillow to look for houses. It seems that realtors like to lie about the size of the houses they are selling. It’s like someone taking a deceptive pictures to use in an online dating website.

This has led to a rather funny item you always see in houses: oval clocks.

The result of them stretching the pictures to make rooms look bigger.

16049029_2_0

oval-clocks

Finding doctors and dentists for medi-cal and denti-cal

One of the things that really irks me is when well to-do people say shit like: “Poor people get free healthcare, why should I work. I should just quit my job and go on welfare so I can get free shit too”.

It pisses me off because I’ve had experience looking for doctors and dentists that accepts medi-cal and denti-cal insurance.

It’s a terrible experience because the list of providers is always short and most are in the ghettos. On top of that, if you google the people on that list, half of them will be 1-star on yelp.

It’s not fun or easy to be living in poverty. Your choices are always limited, which forces you into a cycle of endless headaches and problems.

What it’s like to have a baby with acid reflux

Our newborn girl has a condition known as Gastroesophageal Reflux Disease (GERD), or simply known as “acid reflux”.

This is how our days play out.

1. We feed her
2. Hold her for 30 minutes to prevent reflux
3. Doesn’t work, she vomits
4. We clean her
5. She’s hungry because she didn’t keep her food down
6. We feed her again.
7. She vomits again.
8. We clean her again.
9. She’s hungry, but now she’s too tired to eat.
10. She sleeps for maybe 30 minutes…
11. The acid reflux wakes her up
12. She vomits yet again.
13. Go back to step 1

This hour long cycle is endless. There are many days when we are up 24-hours to play out this endless cycle.

People who don’t understand this problem thinks we are just stupid parents.

“All baby spit up” they say.
“You have to burp your baby” they say.
“Just put your baby down and let her sleep” they say.

Blah blah blah blah blah…

I will gladly accept that I am a stupid parent, and wear a dunce cap and a t-shirt that says I am stupid idiot, if it means my baby can be properly fed and can sleep more than an hour without waking up crying in pain.

How to sign aws elasticsearch service requests with elasticsearch-ruby using IAM

AWS ElasticSearch Service allows you to secure connections to your amazon elasticsearch servers in two ways:

  1. Restrict by IP
  2. Sign your request with IAM

Using the restrict by IP option is easy, but it won’t work in places like Heroku, where you don’t have control of the IP address of your app.

So you are left with option #2. However, the `elasticsearch-ruby` gem does not have any way to sign your request using IAM.

To add this functionality, we have to use a Faraday Middleware to inject aws code singing into `elasticsearch-ruby`. There is a gem `faraday_middleware-aws-signers-v4` that handles the code signing, but we have to configure `elasticsearch-ruby` to use it.

Here is how you do it

require the proper gems

gem ‘aws-sdk’,'< 2.0′
gem ‘faraday_middleware’
gem ‘faraday_middleware-aws-signers-v4’

add this to your config/initializers

What inferfility feels like

For me, it was a lot of bitterness.

I would watch the news and they would have a story about women who had their baby in a bathroom and left it there to die. It made me so, so angry.

But it doesn’t even have to be something so extreme. I hated going to the mall because you’ll always see these dipshit teenagers, who can’t keep their pants up, dragging around two, three strollers of kids.

I am sorry if I sound mean, insensitive, and judgemental. It’s the bitterness talking.

I guess infertility is not the worse thing in the world. But there is something very distressing knowing that you can’t have something that comes so easy for everyone else.

Gchat vs Hangout

I just found out that I can revert back to gchat, instead of using the new hangout. The new hangout sucks. Here is the comment I left for them in their feedback form.

 

This new Hangout replacement for Gchat is super bogus. Here is why

1) Why does hangout need to be in a popup when I am making a phone call? I love the seamlessness of the gchat and phone window.

2) In gchat phone calls, when you press a number on the dialpad, it makes a regular phone dialpad sound. In the hangout popup, pressing a button on the dialpad barely makes a noise. This is super hard to use when you are navigating complicated customer service menus. Please bring back the sound!

3) After I disconnect from a hangout phone call, there is no “redial” option. This is very necessary as hangout calls often gets dropped…

4) Hangout is not properly displaying the availability statuses of my contacts. I know of two contacts who are online, but does not turn green.

5) It is very difficult to tell who is online in Hangout. That little green bar on top of the chat window is hard to see.

Thanks!

How to get a Southwest Companion Pass

Getting a Southwest Companion Pass is an awesome bonus if you need to travel around the US. The Southwest Companion Pass allows you to fly one companion for free, whenever you fly Southwest.

This is an amazing deal, and I think a lot of my friends could benefit greatly from this deal, so I am going to detail how to get a Southwest Companion Pass here.

First off

I’ve been known to do a lot of shady things, but I promise you this is not shady. I’ve been a Southwest Companion Pass holder for about 2 years now. It’s a real product offered by Southwest, not some sort of hack. There are also tons of people who have it. If you are learning about this for the first time, you are late to the party!

What you need

Let me start off by telling you exactly what you need so you understand the commitment you are making

  1. You have to signup for 2 Southwest Credit Cards (administered by Chase)
  2. You have to spend $10K dollars on those credit cards
  3. Each card has a $99 a year fee. So you are spending $200 in fees.

Before you get lightheaded and break out in sweats, give me a chance to explain why there is nothing risky or scary about this and how it’s pretty easy to do.

The Risks

It is commonly believed that having a lot of credit cards, and using credit cards is bad you for. This is simply not true.

I myself have 20+ credit cards, yet my credit score is ~800, which means my credit rating is probably better than 90% of Americans.

Credit card are only bad when you use them and you don’t pay them. So don’t do that.

But don’t take my word for it, do a quick google search and learn: http://bit.ly/1DYadiL

How the math works

Each Southwest Credit Card gives you 50K Southwest Rapid Rewards bonus points when you spend $2K in 3 months. To get a Companion Pass, you need to earn 110K Southwest Rapid Rewards points in the same calendar year. For every dollar you spend on your Southwest Credit Card, you get 1 Southwest Rapid Reward point.

Spend $2K in 3 months = 2K points
Get 50K bonus = 50K points
Total =  52k points

Now double it. If you get TWO Southwest Credit Cards, you get

52K x 2 = 104K

That means you still have to get 6K points (spend $6K) to get to 110K. The good thing is, you have all year to do that. Most people can spend $6K within 2-3 months.

How To

To ensure that this process goes smoothly, there are a couple of recommended steps that you SHOULD MUST follow.

  1. Open a Southwest Rapid Rewards account and get a Rapid Rewards number if you don’t already have one.
  2. Apply for TWO Southwest Rapid Rewards card AND use the same Rapid Rewards number from Step 1 for BOTH cards.
  3. Spend $2K on each card within 3 months. DO NOT screw this up.
  4. Spend $6K on either card before the end of the year.

The Two Credit Cards

I been talking a lot about “two credit cards”. Let me actually link to them now.

NOTE: You HAVE to use these links. These links are promotional links that gets you the 50K bonus. If you don’t use them, you won’t get the 50K bonus.

DOUBLE NOTE: These links may expire, so be sure to double check it.

Card #1
Southwest Chase Plus

Card #2
Southwest Chase Premier

Important Notes

  1. Apply for BOTH cards in one sitting. This reduces the number of credit inquiry on your credit report. It will also ensures that you get both cards. It would be a nightmare if you got one card today, and tomorrow they no longer offer the 50K bonus. Then you have no way to get the second 50K bonus.
  2. Do not forget to spend $2K on each card within the first 3 months. If you forget, you won’t get your bonus and that’s going to be a nightmare.
  3. After you get your 110K points, cancel both credit cards. You don’t want to keep paying the fees do you?

Is all this worth it?

F*ck Yes.

Southwest Rapid Rewards is amazingly easy to spend, and is a GREAT value.

At the end of this whole process, you will have 110K Rapid Rewards points. If you want to see how many trips you can get out of that, just go to the Southwest website and test it out. Choose “points” to see how many points it will cost.

On average, I would say 110K points is worth at least $2K in southwest flights.

But the greatest thing about Southwest Rapid Rewards point is that they make booking VERY easy. You can cancel your booking at any time and get a full refund of your points. You can also easily change flights right on their website without hassle. This is so much easier than using cash and buying non-refundable tickets. You honestly don’t understand how awesome this is until you used it a couple of times, so trust me.

Now remember, you now also have a Companion Pass, which means not only do you get great flexibility in picking FREE flights, you also get to bring someone with you for free with ZERO hassle. So all the benefits you received here are basically doubled (so $4K in southwest flights). The only caveat is that you only get to choose one companion for the lifetime of your pass, so pick wisely!

Also, if you earn the Companion Pass in 2015, you to keep it until 2016. So that’s a lot of traveling that can be had!

But Vinh, $10K is a lot to spend

Yes, but you also have a lot of time to spend it. You should get in to the habit of paying for EVERYTHING with your credit card — just remember to pay off your balance when you get your statement. Using cash is so lame… When you use credit cards, you earn rewards, all cash can give you is a disease.

Conclusion

Southwest is a great airline for traveling around the United States. They have a lot of flights to many destinations around the country. You just have to make sure you pick the right airport if you want nonstop flights. For example, in the bay area, OAK is a better airport for Southwest than SFO.

Anyways, that’s all there is to it. It is very easy to do and the benefits are amazing. So don’t be a sucker and continue paying cash for air flights!

how to recover from a bad aws volume

Sometimes, for no reason at all, an AWS volume will stop responding.
To fix this you can

1) create an image of that volume
2) create a volume from that image
3) attach the new image to the original instance

I discovered this today while trying to fix an instance that stopped responding. Wasted a ton of time trying to transfer files to a new instance. Decided at the last minute to just re-image and surprisingly it worked.