Skip to content

Instantly share code, notes, and snippets.

View vigneshshanmugam's full-sized avatar
🏠
remote

Vignesh Shanmugam vigneshshanmugam

🏠
remote
View GitHub Profile
@vigneshshanmugam
vigneshshanmugam / index.html
Last active June 2, 2016 15:15
Check if its Desktop/Mobile without using window.innerWidth
<html>
<style>
@media screen and (max-width: 1024px){
.agent {
opacity: 1 !important;
}
}
.agent {
opacity: 0;
}
@vigneshshanmugam
vigneshshanmugam / Loading.md
Last active June 18, 2017 01:53
Loading CSS from Multiple endpoints

To site a working example, we have built a streaming layout service which composes the page from multiple endpoints(microservices).

<html>
<head>
    <fragment src="http://assets.domain.com" inline>
</head>
<body>
    <fragment src="http://header.domain.com">
    <fragment src="http://content.domain.com" primary>
@vigneshshanmugam
vigneshshanmugam / test.js
Created November 26, 2015 10:55
Hashcode test
'use strict';
const domain = 's3-eu-west-1.amazonaws.com';
const crypto = require('crypto');
function getMd5(str) {
return crypto.createHash('md5').update(str).digest('hex');
}
function getSha1(str) {
@vigneshshanmugam
vigneshshanmugam / List.md
Last active January 19, 2016 15:16
Enabling/Disabling Msite on Browsers

List of API's we should be checking

  • Service Worker
  • Push Notification
  • Fetch/ Promises Compatible Browsers
  • Background Sync
  • Different Browsers
@vigneshshanmugam
vigneshshanmugam / oldvNew.md
Created July 29, 2015 12:09
Old Orders v New orders page

Old Orders v New Orders

First Load - No cache

Page First Paint Dom Load On Load
Old- Php 4.10 4.08 5.55
New - pJS 1.22 2.34 4.24
  • First paint is delayed in php orders. Check below