Skip to content

Instantly share code, notes, and snippets.

View eshrinivasan's full-sized avatar
🏠
Working from home

Neelmeg eshrinivasan

🏠
Working from home
View GitHub Profile
[
{
"statisticsName": "Supplier by Revenue",
"statisticsType": "Financial Performance",
"chartType": "Pie",
"statisticsUnit": "Percentage",
"statisticData": [
{
"clusterName": "high",
"clusterValue": 300
1. Find > Replace
2. Click 'Regular Expression' box
3. Enter ^\s+ as your search string
4. Click 'Find' to confirm it works as anticipated
5. Use 'Replace All' to remove all leading spaces from each newline
NB. For trailing spaces replace with \s+$
Sub FetchOMDBData(row)
On Error GoTo SearchFailed
Dim xmlhttp, JSON, k, omdbURL, params
Dim col As Integer
Set xmlhttp = CreateObject("MSXML2.XMLHTTP")
params = "&t=" & WorksheetFunction.EncodeURL(Cells(row, MOVIE_NAME_COL).value)
If Not IsEmpty(Cells(row, MOVIE_YEAR_COL).value) Then
params = params & "&y=" & Cells(row, MOVIE_YEAR_COL).value
End If
omdbURL = "http://www.omdbapi.com/?apikey=" & Sheets("Info").Range("A9").value & params
Check angular version from browser
1. From Browser console:
Newer angular version:
>> getAllAngularRootElements()[0].attributes["ng-version"];
{"value":[{"ID":"671375d4-cbdd-41e1-cfdc-ff3118ccae39","boGeometry":"{\"type\": \"LineString\", \"coordinates\":[[15.23783601,37.82099586],[9.114426971,48.83383847772474]]}","geometryType":"ST_LineString","boContext":null,"metaData":"{\"business_object_id\": \"e8eeb8f1-b756-4a4c-a48f-aa6237d8dbd8\", \"business_object_type\": \"Equipment\", \"geometry_id\": \"12fee114-8777-46ee-86df-1ddf2d96d3b5\", \"app_reference_object_id\": \"543566452ADF467DAE68936DB0326EE9\"}","isMarkedForDeletion":null,"boReference_ID":"671375d4-cbdd-41e1-cfdc-ff3118ccae39"},{"ID":"ea61ef29-5f21-46bf-91ef-34a4d466ed2e","boGeometry":"{\"type\": \"LineString\", \"coordinates\":[[11.448998,46.519038],[9.114426971,48.83383847772474]]}","geometryType":"ST_LineString","boContext":null,"metaData":"{\"business_object_id\": \"e8eeb8f1-b756-4a4c-a48f-aa6237d8dbd8\", \"business_object_type\": \"Equipment\", \"geometry_id\": \"12fee114-8777-46ee-86df-1ddf2d96d3b5\", \"app_reference_object_id\": \"543566452ADF467DAE68936DB0326EE9\"}","isMarkedForDele
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@eshrinivasan
eshrinivasan / React templates 2022
Last active January 11, 2022 06:18
react component template
import React from 'react';
import {
Box,
Grid,
Typography,
makeStyles,
Button
} from '@material-ui/core';
import IconButton from '@material-ui/core/IconButton';
import CloseIcon from '@material-ui/icons/Close';
# taken from http://www.piware.de/2011/01/creating-an-https-server-in-python/
# generate server.xml with the following command:
# openssl req -new -x509 -keyout server.pem -out server.pem -days 365 -nodes
# run as follows:
# python simple-https-server.py
# then in your browser, visit:
# https://localhost:4443
import BaseHTTPServer, SimpleHTTPServer
import ssl
@eshrinivasan
eshrinivasan / README.md
Created June 11, 2019 02:05 — forked from pbojinov/README.md
Two way iframe communication- Check out working example here: http://pbojinov.github.io/iframe-communication/

Two way iframe communication

The main difference between the two pages is the method of sending messages. Recieving messages is the same in both.

Parent

Send messages to iframe using iframeEl.contentWindow.postMessage Recieve messages using window.addEventListener('message')

iframe

@eshrinivasan
eshrinivasan / gist:f1755c80bb4d5107dc99ccc55c03ca81
Last active June 4, 2019 01:49
console log wrapper, debug statement, utility
/*
Universal debug utility
*/