Skip to content

Instantly share code, notes, and snippets.

View var23rav's full-sized avatar

Vaisakh Rajagopal var23rav

  • Developer
  • Kerala, India
View GitHub Profile
@var23rav
var23rav / proto_folder\car\car_info.proto
Last active May 4, 2022 07:49
Generate Go file for protos with import dependencies using Protoc, a Reader service added to the proto
syntax = "proto3";
package car;
import "common/vehicle_info.proto";
message Car {
vehicle.Vehicle info = 1;
string carType = 2;
}
@var23rav
var23rav / READEME.md
Last active July 4, 2019 08:59
Goalang Http Test Server with routing features
  • Golang Simple HTTP Server

    • getHTTPServer Base function Allows you to create a simple Http test server. It accepts response as a string and response code as int.

    • You can get the URL of test server from getTestHTTPServerWithURLPath

    • For HTTP use getTestHTTPServer and for HTTPS use getTestHTTPSServer. Both are wrapper over getTestHTTPServerWithURLPath.

    • You will be able to get test server url using getTestHTTPServer(`{'result':'test result'}`, 200) for Http server and getTestHTTPSServer(`{'result':'test result'}`, 200) for Https server.

@var23rav
var23rav / MoveFile.go
Last active October 21, 2023 15:34
GoLang: os.Rename() give error "invalid cross-device link" for Docker container with Volumes. MoveFile(source, destination) will work moving file between folders
import (
"fmt"
"io"
"os"
)
/*
GoLang: os.Rename() give error "invalid cross-device link" for Docker container with Volumes.
MoveFile(source, destination) will work moving file between folders
*/
@var23rav
var23rav / JmeterResult.jtl
Last active April 19, 2020 16:33
Jmeter Test Result (jtl or csv extension) to Prometheus Metrics converter
timeStamp,elapsed,label,responseCode,responseMessage,threadName,dataType,success,failureMessage,bytes,sentBytes,grpThreads,allThreads,Latency,IdleTime,Connect
2018/07/13 12:48:03,262,359 /login,200,OK,Thread Group 1-1,text,true,,1356,411,1,1,261,0,244
2018/07/13 12:48:03,19,360 /bundle.css,200,OK,Thread Group 1-1,text,true,,53006,435,1,1,12,0,0
2018/07/13 12:48:03,2,361 /bundle.js,200,OK,Thread Group 1-1,text,true,,1998,419,1,1,2,0,0
2018/07/13 12:48:03,3,368 /assets/config.json,200,OK,Thread Group 1-1,text,true,,451,462,1,1,3,0,0
2018/07/13 12:48:03,286,359 /login,200,OK,"Number of samples in transaction : 4, number of failing samples : 0",Thread Group 1-1,TRUE,,56811,1727,1,1,278,0,244
@var23rav
var23rav / windows-libcouchbase-couchbase.md
Last active October 28, 2018 19:05
Workaround for installing couchbase in windows

Workaround for python couchbase library installation in Windows

If you are facing the libcouchbase issues, while installing couchbase library using

    pip install couchbase

Follow the below step to install couchbase.

  1. clone python coucbase source file from
@var23rav
var23rav / multiple_ssh_setting.md
Created April 14, 2017 09:56 — forked from jexchan/multiple_ssh_setting.md
Multiple SSH keys for different github accounts

Multiple SSH Keys settings for different github account

create different public key

create different ssh key according the article Mac Set-Up Git

$ ssh-keygen -t rsa -C "your_email@youremail.com"
@var23rav
var23rav / session_timout.js
Created October 28, 2015 09:56
Session time out popup js file
<script>
var sec=60,min=14,runTimer,idleTimeCounter;
$(document).ready(function(){
idleTimeCheck();
value = 'com.odr.core.domain.LoggedInUsers@1aea2956';
console.log("Session1 ="+value);
});
function idleTimeCheck()
{
@var23rav
var23rav / Get cookie in Javascript
Created June 17, 2015 07:21
Get Cookie suing javascript