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

Profiling

Below command would create a log.

node --prof app.js

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

@dineshsprabu
dineshsprabu / vscode_golang.md
Last active Jun 8, 2018
Setting up VSCode Golang
View vscode_golang.md

VSCode Download

https://code.visualstudio.com/download

Install Go extension

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

@dineshsprabu
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
dineshsprabu / setup_ubuntu_14_04.sh
Last active Dec 30, 2017
[Mining] Mining Zcash with minergate
View setup_ubuntu_14_04.sh
#!/bin/bash
printf yyy | sudo apt-get install cmake build-essential libboost-all-dev
git clone https://github.com/feeleep75/nheqminer.git
cd nheqminer/nheqminer
mkdir build
cd build
cmake ..
make
@dineshsprabu
dineshsprabu / minergate_cli.md
Last active Dec 29, 2017 — forked from balinux/gist:af5465cc4078f2022844be6509b21fff
Minergate-cli ubuntu installation
View minergate_cli.md

Run this command to install MG-CLI:

sudo apt-get update && wget https://minergate.com/download/deb-cli -O minergate-cli.deb && sudo dpkg -i minergate-cli.deb

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

minergate-cli -user <YOUR@EMAIL.com> -bcn 4
@dineshsprabu
dineshsprabu / time_based_queries.md
Created Dec 21, 2017
[Postgres] Time based queries
View time_based_queries.md

Add interval to timestamp value

select (<column-name>::timestamp::date + interval '1 week') as inter from <table-name> limit 1;
@dineshsprabu
dineshsprabu / dynamic_page_downloader.js
Last active Dec 10, 2017
[PhantomJS] Load and save dynamic webpage
View dynamic_page_downloader.js
#!/usr/bin/phantomjs
// 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");
phantom.exit(1)
@dineshsprabu
dineshsprabu / postgres_management.md
Created Nov 24, 2017
[Postgres] Useful Management Queries
View postgres_management.md

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
dineshsprabu / hbase.md
Created Oct 25, 2017
[HBase] HBase commands
View hbase.md

HBase Commands

List of row keys.

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

List tables.

list
@dineshsprabu
dineshsprabu / screen.md
Created Oct 24, 2017
[Screen] Useful screen commands
View screen.md

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.