Thursday, June 30, 2016

How to embed google maps street view PHP based on latitude longitude programmatic

If you want to embed custom made google map street view based on programmatic dynamic PHP code first you must make a separate page for the map, like so THIS based on the google documentation at the time of this writing.

Second you can embed the code in your site like this:
$lat = $result['lat'];
$lng = $result['lng'];
echo '<iframe width="400" height="300" frameborder="0" scrolling="no" marginheight="0" marginwidth="0" src="ADDRESS/TO/YOUR/streetmap&lat='.$lat.'&lng='.$lng.'"></iframe>';

The iframe will show the map in the size you indicate with the lat and lng given.

If you want to know how to get the lat and lng based on read address read google maps api.

Let me know in the comments below if anything is unclear or any feedback, or if you would like more tutorials/how-to on those or other topics.

Wednesday, June 29, 2016

George town and Penang Island Malaysia

After a great time in Koh Phangan I head to Penang leaving Thailand for the second time as the visa came to an end.

The boat ride was fun, and inspiring to get the wheels in motion again after such a relaxing time on that magical island.

Here I had some health troubles which led me down an interesting path. My motorbike injury in Pai has reopened yet again and infection persisted. Several days after arriving I went on some basic treks that could have been partially responsible for the worsted condition and I had a fever. I was admitted to Gleneagles hospital and two fellow travelers I met in Phangan as well as the hostel owner had been extremely kind and helpful for the situation.

The travelers brought me little sweets peanuts and even mango that brought up my emotion instantly. as well as their presence and finally when I got my laptop it helped a lot. The hostel owner had forgave one day and organized my stuff (which I was too weak to do myself before leaving for the hospital) and stored it under the stairs in a safe location.

The time alone and in the clean environment was great for my healing physically, mentally and even emotional disturbancce that helped push further my well being once I left the hospital. I spent more time at Love Lane Inn and eventually felt healthy enough to get to the national park in the north west side of the island with a girl I met from couchsurfing site that I decided to use when in the hospital. after the trek we did, I met a french guy that is raw and mostly fruitarian and showed me the guesthouse where i spent 3 nights. treked the second day and road trip on motor bike third day.

Finally returning to Love Lane Inn where I write this now, and this being my last night here, which makes for a good conclusive post. Next I will head to KL capital.

The lessons learned here, and collective wisdom: raw eating is the optimal human (or any animal) nutrition. Humans will do what they feel or like or want without always considering the best option for reasons of health or otherwise. The diversity of humans is large and so is the opinion.

The journey continues.

Friday, June 24, 2016

git push, pull, clone not working without error

I have a bitbucket repo, on rackspace centOS linux (redhat) server and the git push, pull and clone don't work without any error messages.

The version of git 1.7.x which I updated to 2.9.x and the issue remains the same.

I have tried cloning from other machines, servers with similar setup and it worked. something individually wrong here.

I will update when I find a solution.

UPDATE:

This error is due to a bug in the last update of the NSS packages on CentOS/RHEL 6.8.

Here a few links that discuss the issue:
https://access.redhat.com/solutions/2313911
https://bugs.centos.org/view.php?id=10930#c26705
https://www.centos.org/forums/viewtopic.php?t=58002

We have reported it to RedHat and we're waiting for them to release a fix for both CentOS and RHEL 6.8. Until then we have rolled back to the previous working versions of the NSS packages and marked the ones you had as bad so that yum will skip them and update only after newer versions of the packages are released.

Bad versions:
[root@econoline-perf]# yum versionlock list
Loaded plugins: fastestmirror, versionlock
!0:nss-3.21.0-8.el6.*
!0:nss-util-3.21.0-2.el6.*
!0:nss-tools-3.21.0-8.el6.*
!0:nss-sysinit-3.21.0-8.el6.*
versionlock list done

Good Versions (now installed):
[root@econoline-perf]# rpm -qa | grep nss.*3.21 | sort
nss-3.21.0-0.3.el6_7.x86_64
nss-sysinit-3.21.0-0.3.el6_7.x86_64
nss-tools-3.21.0-0.3.el6_7.x86_64
nss-util-3.21.0-0.3.el6_7.x86_64

I assume git has been using libraries from this package and so this should resolve the problem.