Skip to content

Instantly share code, notes, and snippets.

Working from home

Sivaprabu Ganesan gsivaprabu

Working from home
View GitHub Profile
gsivaprabu / embeded_markdown_in_html.html
Created Aug 14, 2020
We embeded a markdown file in html with web components loader
View embeded_markdown_in_html.html
<!DOCTYPE html>
<html lang="en">
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<!-- Lightweight client-side loader that feature-detects and load polyfills only when necessary -->
<script src=""></script>
<!-- Load the element definition -->
View uppercase.js
function siva(value){
if(!value) return '';
value = value.toString();
var a = value.charAt(0).toUpperCase()+value.slice(1)+'<br>';
siva('Sivaprabu Ganesan');
gsivaprabu / youtube_remove_like_videos.js
Last active Sep 12, 2019
How to Delete all liked YouTube Videos at once!
View youtube_remove_like_videos.js
/* For more */
/* How to delete all liked YouTube Videos at once!
IMPORTANT! You have to click on "Edit" after you click on the "Liked videos" playlist, then you open up the console and use the code! This method does not work if you don't click on "Edit"!
1. Click on "Liked videos" under "Library".
2. Click on "Edit".
3. Open the browser console.
gsivaprabu / importJSON.js
Created Feb 8, 2019
Fetching JSON using google spread sheet
View importJSON.js
* Retrieves all the rows in the active spreadsheet that contain data and logs the
* values for each row.
* For more information on using the Spreadsheet API, see
function readRows() {
var sheet = SpreadsheetApp.getActiveSheet();
var rows = sheet.getDataRange();
var numRows = rows.getNumRows();
View range.c
#include <stdio.h>
void main() {
int i = 0, recid = i = 320;
int lastRecordId = 0;
printf(" enter last record id :");
scanf("%d", & lastRecordId);
printf("lastRecordId:%d", lastRecordId);
i = recid;
while (i > 0) {
if (i <= lastRecordId && i > (lastRecordId - 300))
gsivaprabu / postman.js
Created Jul 5, 2017
Set cookie value and csrf value as global postaman value
View postman.js
tests["Status code is 200"] = responseCode.code === 200;
// getting CSRF token value from responseBody and stored in global variable
var data = JSON.parse(responseBody);"CSRF Token Value = " + data.CSRFToken);
postman.setGlobalVariable("csrftoken", data.CSRFToken);
// getting QSESSIONID value from Cookie and stored in global variable
var qsessionidValue = postman.getResponseCookie("QSESSIONID").value
gsivaprabu / Gruntfile.js
Last active Jul 1, 2017
How to remove the console logs in my minified/compresed js files using below Gruntfile.js ?
View Gruntfile.js
module.exports = function(grunt) {
"use strict";
// Wipe out previous builds and test reporting.
clean: ["dist/", "test/reports"],
// Run your source code through JSHint's defaults.
jshint: {
options: {
laxcomma: true,
'-W086': true,
gsivaprabu / parseint.html
Last active May 4, 2017
Confusing string/number with parseInt() Using JavaScript
View parseint.html
<!DOCTYPE html>
<title> Confusing string/number using JavaScript</title>
<h1 align="center"><u> Confusing string/number with parseInt() Using JavaScript</u></h1>
<script type="text/javascript">
gsivaprabu / users.json
Created Feb 10, 2017
Just call test purpose user credetial
View users.json
"firstName": "Sivaprabu",
"lastName": "Ganesan",
"userName": "gsivaprabu",
"password": "gsivaprabu",
"age": 32,
"address": {
"streetAddress": "Kamaraj Nagar",
"city": "Namakkal",
"state": "Tamil Nadu",
gsivaprabu / ipv6Validation.html
Last active Jan 12, 2017
Remove [ and ] in ipv6 address using JavaScript
View ipv6Validation.html
<!DOCTYPE html>
<title> Remove [ and ] in ipv6 address using JavaScript</title>
<h1 align="center"><u> Remove [ and ] in ipv6 address using JavaScript</u></h1>
var ipv6 = '[2001:0db8:0000:0000:0000:ff00:0042:8329]';
// var ipv6 = '';
ipv6 = ipv6.replace(/[\]\[]/g, '');