While working on html/css/js, it’s convenient to view those pages from http server. However, I don’t want to use MAMP or Virtual machine to set up nginx/apache.
I found this pro tip from this.
So I ended up with adding an alias to my .bash_profile file as follows:
## in .bash_profile
alias http="python -m SimpleHTTPServer"
## run it like this
Note that port number below 1024 cannot be bound as a normal user. This is meant to simply run a http server for development purpose. Do not use it to run your web application.
With maven 3.3.3, I’ve run into an issue “-Dmaven.multiModuleProjectDirectoy system property is not set”.
Stackoverflow is here to save my day.
Settings -> Maven -> Runner
To VM options
#TIL that i could use the Apple wireless keyboard on my iPad, which will change how I use my iPad dramatically, I believe.
Anyhow I haven’t blogged much lately (since last year) ’cause I was very busy with projects at my work place. I’ve been doing something related to private cloud infrastructure for the organization. What I can say is it involves OpenStack, Netflix’s Asgard.
BTW there was a news article about Walmart going with OpenStack that powers around 100,000 nodes.
I feel so old… it used to be all flash in the past. Now it’s all CSS. I stumbled on the site and css effects are great!
At my work, we have been using build pipeline jenkins plugin. However, there was a bug with it in our use case, which I have filed a bug for it.
There’s reproduce steps in the bug, but the issue is that parameter values from a wrong upstream job are passed to manually triggered downstream job if the downstream job is shared by a few/many different upstream jobs. Auto deploy downstream jobs do not have the same issue. It’s affected by only manual downstream job.
So I made an update to build pipeline plugin and made a pull request for the first time in my github history. This is the actual difference.
Very nice improvement on usability.
However, as of Chrome 32 for Android, which is currently in beta, this delay is gone for mobile-optimised sites, without removing pinch-zooming!
var elementsInArray = Array.prototype.slice.call(document.getElementsByTagName('li'));
So what is going on with the above statement? Here’s what’s going on:
- getElementsByTagName does not return Array object. Instead it returns NodeList (You can easily test it out on the developer tools. i.e. document.getElementsByTagName(‘li’).constructor)
- NodeList does not have array methods. Prototype type chain is not connecting to array prototype at all. (NodeList.prototype.__proto__.constructor == Object)
- slice returns a new array object so using slice against NodeList converts NodeList into Array