Skip to content

Instantly share code, notes, and snippets.

View kumarmj's full-sized avatar
😁
there is no finishing line, longer the run, wider should be the smile

Manoj Kumar kumarmj

😁
there is no finishing line, longer the run, wider should be the smile
View GitHub Profile
@kumarmj
kumarmj / psql-with-gzip-cheatsheet.sh
Created April 5, 2019 10:58 — forked from brock/psql-with-gzip-cheatsheet.sh
Exporting and Importing Postgres Databases using gzip
# This is just a cheat sheet:
# On production
sudo -u postgres pg_dump database | gzip -9 > database.sql.gz
# On local
scp -C production:~/database.sql.gz
dropdb database && createdb database
gunzip < database.sql.gz | psql database
@kumarmj
kumarmj / gist:89e9b213360cce1eade7b0b9bddddd71
Created August 3, 2018 05:48
cromwell log AWS backend behind proxy
Manoj
```[2018-08-03 15:41:02,73] [error] Credentials are invalid: Unable to execute HTTP request: Connect to sts.amazonaws.com:443 [sts.amazonaws.com/54.239.29.25] failed: connect timed out
java.lang.RuntimeException: Credentials are invalid: Unable to execute HTTP request: Connect to sts.amazonaws.com:443 [sts.amazonaws.com/54.239.29.25] failed: connect timed out
at cromwell.cloudsupport.aws.auth.AwsAuthMode.validateCredential(AwsAuthMode.scala:87)
at cromwell.cloudsupport.aws.auth.AwsAuthMode.validateCredential$(AwsAuthMode.scala:85)
at cromwell.cloudsupport.aws.auth.DefaultMode.validateCredential(AwsAuthMode.scala:118)
at cromwell.cloudsupport.aws.auth.DefaultMode._credential$lzycompute(AwsAuthMode.scala:129)
at cromwell.cloudsupport.aws.auth.DefaultMode._credential(AwsAuthMode.scala:119)
at cromwell.cloudsupport.aws.auth.DefaultMode.credential(AwsAuthMode.scala:132)
#include <iostream>
#include <vector>
#include <queue>
#include <functional>
#include <utility>
using namespace std;
const int MAX = 1e4 + 5;
typedef pair<long long, int> PII;
bool marked[MAX];
#include <iostream>
#include <vector>
#include <utility>
#include <algorithm>
using namespace std;
const int MAX = 1e4 + 5;
int id[MAX], nodes, edges;
pair <long long, pair<int, int> > p[MAX];
@kumarmj
kumarmj / Binary Search Tree.cpp
Last active April 3, 2017 10:23 — forked from harish-r/Binary Search Tree.cpp
Binary Search Tree Implementation in C++
#include<iostream>
using namespace std;
class BST
{
struct node
{
int data;
node* left;
(function(){
// Initialize firebase
const config = {
}
firebase.initializeApp(config);
// Get Elements
const preObject = document.getElementById("object");
(function(){
// Initialize firebase
const config = {
}
firebase.initializeApp(config);
// Get Elements
const preObject = document.getElementById("object");
/* eslint-env node */
var path = require( "path" );
var fs = require( "fs-extra" );
var instrumentedDir = "build/instrumented";
var reportDir = "build/report";
// Support: Node.js <4
var oldNode = /^v0\./.test( process.version );