Skip to content

Instantly share code, notes, and snippets.

Working from home

Sivaprabu Ganesan gsivaprabu

Working from home
View GitHub Profile
gsivaprabu / tblcitylist.sql
Created Apr 8, 2013
MySQL database of Indian Cities and states,latitude and longitude..
View tblcitylist.sql
-- phpMyAdmin SQL Dump
-- version
-- Host:
-- Generation Time: Apr 08, 2013 at 02:48 PM
-- Server version: 5.5.27
-- PHP Version: 5.4.7
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 / index.php
Last active Oct 1, 2019
Retrieve gmail inbox using PHP scriptplease modify settings in php.inimax_execution_time = 30000extension=php_imap.dll
View index.php
max_execution_time = 30000
/* connect to gmail */
$hostname = '{}INBOX';
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 / 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 / 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 / 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">