Fix ‘Access-Control-Allow-Origin’ missing

Scenario:  I was trying to setup amazon origin push cdn cache using s3 and cloudfront via w3 total cache plugin. Things went well except for a font file not being properly delivered by the cdn, instead giving the error: Cross-Origin Request Blocked: The Same Origin Policy disallows reading the remote resource at https://–domain–.cloudfront.net/wp-content/themes/Extra/fonts/ET-Extra.ttf. (Reason: CORS […]

SlideUp & SlideDown an Element using CSS

As time progresses, CSS is becoming more and more powerful with features which once required extensive javascript coding or jquery plugins. One such feature is the slide up or slide down of any element on your page. For a simple slideup or slidedown (while making the element visible or hidden), we can use a simple […]

How to use CommonCrypto for HMAC in Swift 4

After numerous hours trying to understand how CommonCrypto works with xCode and how to use it to generate a hmac hash, I finally made it work! In this tutorial you will see how to: What is CommonCrypto library and why to use it How to include CommonCrypto (and CommonHMAC) in your xcode project How to […]

hmac_sha512 to jsSHA

A quick conversion of hmac_sha512 of php to a javascript library based jsSHA. e.g. if we had the php code: <?php $sign = hash_hmac(‘sha512’, $post_data, $secret); echo $sign; This can be converted to the jsSHA based javascript code like this: var shaObj = new jsSHA(“SHA-512”, “TEXT”); shaObj.setHMACKey(secret, “TEXT”); shaObj.update(post_data); var hmac = shaObj.getHMAC(“HEX”); I hope […]

WhatsApp not working

Today WhatsApp is down almost all over the world. There are complains from various countries and regions that whatsapp isn’t working for them. Why is WhatsApp Down? There is no announcement on whatsapp official blog or twitter account as to why whatsapp server is down. Nor did they mention and prior notice for downtime or […]

Godaddy domain renewal discount 25%

I just renewed by 3 domains that were expirion this week on Godaddy and got 25% discount on them. Two of them were .com and one was .co.uk How did I get it? Well it’s quite simple, I opened the chat now at shopping cart page and asked the support guy to add a discount […]

Viber adds last seen

Finally, the ultimate breakup feature of whatsapp is now available on viber too. Today viber updated its app for iOS for iPhone (on android too probably and desktop). This new update shows this message on app store (image): It says: Watch YouTube videos in-chat – Play videos right in your chats or in minimized view […]

Google Maps API error: MissingKeyMapError [Solved]

While working on a clients website, I came through this error saying: Google Maps API warning: NoApiKeys https://developers.google.com/maps/documentation/javascript/error-messages#no-api-keys NA.j @ util.js:210 (anonymous) @ js?ver=4.7.3:133 (anonymous) @ js?ver=4.7.3:41 (anonymous) @ js?ver=4.7.3:37 (anonymous) @ js?ver=4.7.3:41 (anonymous) @ js?ver=4.7.3:105 (anonymous) @ js?ver=4.7.3:37 (anonymous) @ js?ver=4.7.3:105 (anonymous) @ js?ver=4.7.3:37 (anonymous) @ js?ver=4.7.3:105 (anonymous) @ js?ver=4.7.3:37 (anonymous) @ js?ver=4.7.3:105 Wb […]

Filter posts on Facebook – Browser plugins

Facebook doesn’t allow its users to filter the content of the newsfeed. Rather it chooses on its own what it wants us to be brainwashed with. You remember about the much criticized news of facebook feeding users with depressive content intentionally and called it a “study”. Anyhow, there are some great browser extensions to achieve this […]

Electron – Getting Started

Electron is a beautiful opensource framework, developed by GitHub. This was originally named Atom Shell, as it was developed to develop the atom editor by github. It’s based on node.js and chromium browser. In this tutorial, we will cover how to get started with electron framework to create a hello world desktop app. Steps for […]