Skip to content

Instantly share code, notes, and snippets.

View ramakay's full-sized avatar

Rama Annaswamy ramakay

View GitHub Profile
@ramakay
ramakay / styleCounter.js
Created February 24, 2022 13:11
Count stylesheet rules per document
var
styleSheets = document.styleSheets,
totalStyleSheets = styleSheets.length,
overAllDocumentRules =0;
try {
for (var j = 0; j < totalStyleSheets; j++){
try{
var
styleSheet = styleSheets[j],
(function(f){if(typeof exports==="object"&&typeof module!=="undefined"){module.exports=f()}else if(typeof define==="function"&&define.amd){define([],f)}else{var g;if(typeof window!=="undefined"){g=window}else if(typeof global!=="undefined"){g=global}else if(typeof self!=="undefined"){g=self}else{g=this}g.sanitizeHtml=f()}})(function(){var define,module,exports;return function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o<r.length;o++)s(r[o]);return s}({1:[function(require,module,exports){var htmlparser=require("htmlparser2");var extend=require("xtend");var quoteRegexp=require("regexp-quote");function each(obj,cb){if(obj)Object.keys(obj).forEach(function(key){cb
/**
* Translation in the current system uses both "Translate" vs "No-Translate" configuration.
* Important that markup emitted is also in sync if you are declaring some portions of the state here.
/*
provide Path to the higher level object.
Smartling documentation:
`/#` : Wildcard to match everything
`notranslate object`: Items that need to be stripped.
/**
* [ comma separated xPath consumed by `server.jsx` ]
@ramakay
ramakay / React-Router-Redux-Pattern.js
Created September 29, 2016 18:29
An Example of how to Seed a Redux store and then push a route.
/** Usecase: Fetch a NLC ( Natural Language Classification ) Respopnse
Assumes: ReactGo Boilerplate.
inclusion of IBM Cognitive API
Axios promise library
React-Middleware-Thunk
-----
Focus on: Pushing a Store dispatch and then creating a route.
**/
startup, version: 3103 osx x64 channel: stable
executable: /Applications/Sublime Text.app/Contents/MacOS/Sublime Text
working dir: /
packages path: /Users/rannas/Library/Application Support/Sublime Text 3/Packages
state path: /Users/rannas/Library/Application Support/Sublime Text 3/Local
zip path: /Applications/Sublime Text.app/Contents/MacOS/Packages
zip path: /Users/rannas/Library/Application Support/Sublime Text 3/Installed Packages
ignored_packages: ["Vintage"]
Unable to decode Packages/Theme - Dark Material/assets/commons/overlay_bar_vertical.png
pre session restore time: 0.524751
@ramakay
ramakay / gist:5309765
Last active December 15, 2015 19:10
This question was initially posed to the @IEDevchat team as I wanted to get a browser manufacturer's view. Is there value in organizing CSS that targets vendor prefixes based on capabilities say via Modernizr ? - e.g: .text-shadow throw all vendor prefixes vs throwing all vendor prefixes regardless and let browser ignore? I am assuming the valu…
/*
Following example assumes scss and ability to target parents selectors.
Credits : http://goo.gl/ubE2A & http://goo.gl/AQPpY and
*/
.mydeclaration {
.nocssanimation & {
/* old crappy browser */
border: 1px solid #ccc;