Skip to content

Instantly share code, notes, and snippets.

View teswar's full-sized avatar

Thirueswaran Rajagopalan teswar

View GitHub Profile
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>IMDb Listings</title>
<link href="https://fonts.googleapis.com/css2?family=DM+Sans:wght@300;400;500;700&display=swap" rel="stylesheet" />
<style>
:root {
--gold: #F5C518;
@teswar
teswar / clone.and.append.element.into.XmlDocument.js
Last active April 11, 2018 12:06
Deserializing and Serializing with XMLDocument | Parsing and XMLDocument from its string representation, cloning its inner element and appending to its parent ..
class XMLHelper {
static isValid(xmlDocument) {
return (xmlDocument && !xmlDocument.getElementsByTagName('parsererror').length);
}
static deserialize(xmlString) {
return (new DOMParser()).parseFromString(xmlString, "application/xml");
}
static serialize(xmlDocument) {
return (new XMLSerializer()).serializeToString(xmlDocument);
@teswar
teswar / fetch.all.pages.of.jsonmock.searchresult.js
Last active April 11, 2018 12:05
Node JS Tryouts | Fetching all search result page result, sorting by ascending and dumping to console. Node JS
/****
* fetching all pages of search result ...
* Node JS tryouts....
* https://repl.it/@teswar/fetchallpagesofjsonmocksearchresult
************/
const https = require('https');
/*
* compose url with query params appended...