Skip to content

Instantly share code, notes, and snippets.

Dineshprabu S dineshsprabu

Block or report user

Report or block dineshsprabu

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
dineshsprabu /
Created Jul 19, 2018
Node Profiling and Inspecting


Below command would create a log.

node --prof app.js

To understand the log you would need to pass it to --prof-process.

dineshsprabu /
Last active Jun 8, 2018
Setting up VSCode Golang

VSCode Download

Install Go extension

On VSCode, Goto Extension -> Search Go -> Install.

dineshsprabu / sticky_thread_pool.rb
Last active Feb 27, 2018
[Ruby] Sticky Thread Pool
View sticky_thread_pool.rb
# Sticky Thread Pool would help to execute your block
# by sticking to a particular executor on the pool by
# by index.
require "concurrent"
class StickyThreadPool
attr_accessor :pool
dineshsprabu /
Last active Dec 30, 2017
[Mining] Mining Zcash with minergate
printf yyy | sudo apt-get install cmake build-essential libboost-all-dev
git clone
cd nheqminer/nheqminer
mkdir build
cd build
cmake ..
dineshsprabu /
Last active Dec 29, 2017 — forked from balinux/gist:af5465cc4078f2022844be6509b21fff
Minergate-cli ubuntu installation

Run this command to install MG-CLI:

sudo apt-get update && wget -O minergate-cli.deb && sudo dpkg -i minergate-cli.deb

start miner (4 cores for BCN) use this command:

minergate-cli -user <> -bcn 4
dineshsprabu /
Created Dec 21, 2017
[Postgres] Time based queries

Add interval to timestamp value

select (<column-name>::timestamp::date + interval '1 week') as inter from <table-name> limit 1;
dineshsprabu / dynamic_page_downloader.js
Last active Dec 10, 2017
[PhantomJS] Load and save dynamic webpage
View dynamic_page_downloader.js
// This script will load a dynamic page and gives you the content.
// Args: url -> URL to be downloaded.
var system = require('system');
if(system.args.length == 1){
system.stderr.write("Pass URL as argument to the script");
dineshsprabu /
Created Nov 24, 2017
[Postgres] Useful Management Queries

Size of the DB

SELECT pg_size_pretty(pg_database_size('postgres'));

Size of the table with indexes

select pg_size_pretty(pg_total_relation_size('tablename'));
dineshsprabu /
Created Oct 25, 2017
[HBase] HBase commands

HBase Commands

List of row keys.

count 'pio_event:events_1', { INTERVAL => 1 }

List tables.

dineshsprabu /
Created Oct 24, 2017
[Screen] Useful screen commands

Screen commands

Create screen session detached and log on local file. A local file named screenlog.0 will be created on the local dir.

screen -dms -L <any-name> bash -c <command>
You can’t perform that action at this time.