heroku npm install not updating because of cache

Wasted a frustrating hour trying to figure out why `npm install` and `npm install foobar` would not update my package.

Finally found this:

https://devcenter.heroku.com/articles/nodejs-support#cache-behavior

Their caching is very rigid. Even if `npm install` runs and it tells you the package is updated, it won’t update. The cache will just replace itself. Even deleting the entire node_modules directory via `heroku run bash` did not work

“`
heroku config:set NODE_MODULES_CACHE=false
$ git commit -am ‘disable node_modules cache’ –allow-empty
$ git push heroku master
“`

Running the above finally did the trick.

How to run angular 4 karma tests on circleci

Here is what I had to add to my circle.yml

machine:
node:
version: 6.10.1

test:
override:
- npm run-script test:once

1) Setting node version is important on CircleCI otherwise you’ll get a bunch of peer dependencies errors.
2) Karma is set up to run tests continuously, which is not good on CircleCI.

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!