Fast win pattern, you might query several urls for the same info, which one return first , that one will be the winner.
Send in parallel and join together.
long running and cancellable task, if get canceld, try compensate it
My Note on Solutions.
Friday, March 27, 2015
Thursday, March 12, 2015
Vagrant is a good VM automation tool for both developers and devops, here are some basic tips that I found useful
if you are stand behind a proxy, you can install one vagran proxy module. the module will setup the proxy on guest machines, like yum.conf, http_proxy variable etc.
here is the plugin https://github.com/tmatilai/vagrant-proxyconf
when you boot up the vm, you can see the proxy setting applied depends on your OS type
you might have one local repo in the company, you can either build all boxes internally which already assign the repo url to local. or just copy one repo to override the system one by using the provisioning scripts.
and in your local file, change the ip to internal one
Provision scripts to check whether package installed or not. using rpm to query package or use command to determine whether a command exists
Thursday, February 19, 2015
it turns that this should be a common feature for opencart admins, basically the operation team would like to see orders with priority shipping method and process those orders first. on 1.5, no way you can see this at once. basically the orders page looks like this by default
they actually want to see the UI like this, with shipping method on the overview
even more, they want a filter to see all orders with priority shipping selected.
To fix this, pretty straight forward. change the orders module/controller/template file, to include shippingmethod in the data query back. and add a filter logic to narrow down records.
I have a patch file, email me if you are interested. click about me on the page to get my email
Wednesday, February 11, 2015
Quick test for a 50K random double array with random order, to soft it using the system libarry and my own insert sorting/ merge sorting, the time takes to do the soring is quite different.
given a array with size 50K of double values,
if increase to 100K, more time for insertion sorting
Friday, February 6, 2015
Wednesday, January 7, 2015
if you are on Windows, dig is not there, you can do most DNS query through nslookup.
to see the DNS cache on your local server, run “ipconfig /displayDNS”
same thing, ipconfig /flushDNS to purge the cache.
to see name server of a giving domain
to see all infomration like root server, try nslookup , set all
to see mx record of amazon.
to see the spf record?
what about debug information
to see all information
to see all the ips of a domain or even this history.
To see top level Name Servers, dig –t ns com
If we want to see what’s are the name server of Google by asking any top level com servers.
now we can ask any nameserver of google, what’s are the ip of www.google.com
we can also using host command to get the ip or alias information
we can see the alias gmail.google.com
if we want to see some debug information. we can put debug there
[~]dig +trace -t mx dropbox.com
; <<>> DiG 9.8.3-P1 <<>> +trace -t mx dropbox.com
com. 172800 IN NS a.gtld-servers.net.
dropbox.com. 172800 IN NS ns-564.awsdns-06.net.
dropbox.com. 3600 IN MX 1 aspmx.l.google.com.