Skip to content

Instantly share code, notes, and snippets.

View rtvalluri's full-sized avatar

Raviteja Valluri rtvalluri

View GitHub Profile
@kudinovfedor
kudinovfedor / selector.js
Created April 7, 2019 19:36
Returns the first element that is a descendant of node that matches selectors.
/**
* Selector
*
* @description
* Returns the first element that is a descendant of node that matches selectors.
*
* @example
* selector('div');
* selector('div', document);
*
@peduarte
peduarte / esnextbin.md
Last active August 25, 2022 14:55
Vanilla Debounce
@jhafner
jhafner / jquery-to-vanilla-js.md
Created December 16, 2013 17:52 — forked from harmstyler/moving_from_jquery.md
jQuery methods in vanilla JavaScript.

Moving from jQuery

Events

// jQuery
$(document).ready(function() {
  // code
})
@dylancwood
dylancwood / tree.css
Last active August 2, 2024 04:06
CSS to create a simple tree structure with connecting lines. No images or JS required.
ul.tree, ul.tree ul {
list-style: none;
margin: 0;
padding: 0;
}
ul.tree ul {
margin-left: 10px;
}
ul.tree li {
margin: 0;
@aheckmann
aheckmann / storeImgInMongoWithMongoose.js
Created April 17, 2012 19:14
store/display an image in mongodb using mongoose/express
/**
* Module dependencies
*/
var express = require('express');
var fs = require('fs');
var mongoose = require('mongoose');
var Schema = mongoose.Schema;
// img path