Posts

Embedding Gist in Blogger

I tried to embed Gist into my blogger post. Everything looked fine except the overflow:scroll is not working. Interestingly, without setting fixed height (eg. height:100px) both x and y scrolls are not working.  I tried the following override in blogger template and it somehow broke the overall scroll.  .gist .blob-wrapper {     height: 100vh !important;     height:500px !important;     overflow-y: auto !important; } Finally I settled down to the following, which wrapped the text decently.  .gist .blob-code-inner { white-space:pre-wrap !important; }

SPOnline Search REST API POST request

There is one thing about Sharepoint. It doesn't let you pass even if there is a slight formatting error in your request. And, most of the time error is not so appropriate or no error.  I faced the same situation when i tried to compose a POST request for SPOnline Search REST API. The query text was quite complex as I was trying to retrieve search results based on a managed property which is in turn is generated from managed metadata column. The key here is not introduce  + symbol in place of space as we would generally do in GET request.  Code Snippet

ng-click doesn't work with ion-slides

Issue:   Clicks doesn't work for elements inside ion-slides. Or you may experience slow clicks in the initial load, but eventually click event doesn't work. I tried to place ion-checkbox inside ion-slides. It used to work fine when the chrome is lightly loaded. Once the browser gets heavier, ion-checkbox doesn't respond.  Resolution: This relates to a bug in Swiper component which is used to build ion-slides. It relates to the bug file in their git repo.  https://github.com/nolimits4web/Swiper/issues/1152 The resolutions is as follows: I've found the issue... This two options:  preventClicks  and  preventClicksPropagation , are by default set to  true . Setting them to  false  will solve the issue.

Upgrading Salesforce SDK App to Android Studio

As some of you would have noticed, there is no easy way to integrate the project created/upgraded using "forcedroid" into Android Studio. After some struggle, I followed below steps to acheive this.  1. Make sure you are on the right Cordova version. As of Salesforce Mobile SDK 3.3, Cordova 3.6.4 is supported. If you have Cordova 4, you have target your platform  Cordova platform add android@3.6.4 To check the current version use - cordova platform  2. If you have made earlier attempts, please remove all references to gradle and studio project settings.   rm -r .idea find . -name "*.gradle" -type f -delete find . -name "*.iml" -type f -delete 3. Also, remove any intermediate builds generated. I cleared the build folder using  rm -r build 4. Now to make sure all the references correctly placed, open the project in Ecclipse and check if the build is working properly.  5. Now open import the project into android studio Open...

HTTP to HTTPS redirect on IIS

Image
The requirement was simple. To redirect all HTTP traffic to HTTPS traffic. First thought that crossed my mind is - "Can't we do it with HTTP redirect ?". After trying the approach, the site went into a infinite redirect loop. Pretty obvious! Right? After some googling, this is what I have done.  Install URL Rewrite module from   http://www.iis.net/downloads/microsoft/url-rewrite Add the following rule to your web.config. For more details about, doing the same from UI is explained @  http://www.jppinto.com/2010/03/automatically-redirect-http-requests-to-https-on-iis7-using-url-rewrite-2-0/ < rule name = "Redirect to HTTPS" stopProcessing = "true" > < match url = "(.*)" /> < conditions >< add input = "{HTTPS}" pattern = "^OFF$" /> </ conditions > < action type = "Redirect" url = " https:// {HTTP_HOST}/{R:1}" redirectType = "SeeOther" ...

HockeyApp Cordova Plugin

I have improved the HockeyApp plugin for iOS and Android.  You can find all the code and documentation @ https://github.com/pradeepkumargali/cordova-plugin-hockeyapp  My Additions: Latest Hockey API Easier installation via command line New Feedback feature Please report any issues on github. Happy Coding!

Disable telephone detectors in Safari/Hybrid app (x-apple-data=detectors)

Image
Problem:  You see an unexpected hyperlink against numbers in your text.  Solution: Include the following in your landing html page at the top. <meta name="format-detection" content="telephone=no">  Reference: http://stackoverflow.com/questions/2106102/disabling-data-detectors-for-a-specific-html-element-in-a-uiwebview http://stackoverflow.com/questions/10655815/disable-telephone-anchor