Skip to content

Instantly share code, notes, and snippets.

View bhargavkonkathi's full-sized avatar
🏠
Working from home

Bhargav Konkathi bhargavkonkathi

🏠
Working from home
View GitHub Profile
@bhargavkonkathi
bhargavkonkathi / query.txt
Created April 3, 2017 13:03
Mongodb Query
db.users.aggregate(
// Pipeline
[
// Stage 1
{
$match: {
"email": "bhargavksdn@gmail.com"
}
},
{
"waitedMS" : NumberLong(0),
"result" : [
{
"_id" : ObjectId("58b80a5f922a9656b78e86a7"),
"email" : "bhargavksdn@gmail.com",
"access" : [
{
"roleId" : ObjectId("58e35fea31d05f0e95e0c8fd"),
"name" : "brgv k",
@bhargavkonkathi
bhargavkonkathi / parsecookie.js
Created November 20, 2018 11:34 — forked from rendro/parsecookie.js
Parse document.cookie into object
document.cookie.split(';').map(function(c) {
return c.trim().split('=').map(decodeURIComponent);
}).reduce(function(a, b) {
try {
a[b[0]] = JSON.parse(b[1]);
} catch (e) {
a[b[0]] = b[1];
}
return a;
}, {});
@bhargavkonkathi
bhargavkonkathi / quill-editor.js
Created December 10, 2018 05:36
Quill editor integration with lit-element
import { LitElement, html } from "@polymer/lit-element";
import 'quill/';
class QuillEditor extends LitElement {
render(){
return html`
<link rel='stylesheet' href='http://cdn.quilljs.com/1.3.6/quill.snow.css'>
<style>
#editor-container {