Skip to content

Instantly share code, notes, and snippets.

Sivaprabu Ganesan gsivaprabu

Block or report user

Report or block gsivaprabu

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View uppercase.js
function siva(value){
if(!value) return '';
value = value.toString();
var a = value.charAt(0).toUpperCase()+value.slice(1)+'<br>';
document.write(a);
}
siva('Sivaprabu Ganesan');
siva('<br>');
siva('@$@$@$');
siva('a$lert');
@gsivaprabu
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
<?php
/*
max_execution_time = 30000
extension=php_imap.dll
*/
/* connect to gmail */
$hostname = '{imap.gmail.com:993/imap/ssl}INBOX';
@gsivaprabu
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 https://www.youtube.com/watch?v=wg3ubtxyfyQ */
/* 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
gsivaprabu / tblcitylist.sql
Created Apr 8, 2013
MySQL database of Indian Cities and states,latitude and longitude..
View tblcitylist.sql
-- phpMyAdmin SQL Dump
-- version 3.5.2.2
-- http://www.phpmyadmin.net
--
-- Host: 127.0.0.1
-- Generation Time: Apr 08, 2013 at 02:48 PM
-- Server version: 5.5.27
-- PHP Version: 5.4.7
SET SQL_MODE="NO_AUTO_VALUE_ON_ZERO";
@gsivaprabu
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);
console.info("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
console.log(qsessionidValue);
@gsivaprabu
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
* https://developers.google.com/apps-script/service_spreadsheet
*/
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
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";
grunt.initConfig({
// 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
gsivaprabu / parseint.html
Last active May 4, 2017
Confusing string/number with parseInt() Using JavaScript
View parseint.html
<!DOCTYPE html>
<html>
<head>
<title> Confusing string/number using JavaScript</title>
<h1 align="center"><u> Confusing string/number with parseInt() Using JavaScript</u></h1>
</head>
<body>
<script type="text/javascript">
@gsivaprabu
gsivaprabu / Tickets.md
Last active Feb 24, 2017
Train Ticket
View Tickets.md

#TATKAL

11064 - Salem Chennai Express

June 26 2017 Monday

ATU (Attur) to TBM (Tambaram)

Sivaprabu G 32 Naveena G 27

You can’t perform that action at this time.