Skip to content

Instantly share code, notes, and snippets.

View raghunandangupta1992's full-sized avatar
👨‍💻

raghunandan raghunandangupta1992

👨‍💻
View GitHub Profile
@raghunandangupta1992
raghunandangupta1992 / index.js
Created August 31, 2017 04:43
requirebin sketch
// Welcome! require() some modules from npm (like you were using browserify)
// and then hit Run Code to run your code on the right side.
// Modules get downloaded from browserify-cdn and bundled in your browser.
var util = require('util'),
twitter = require('twitter');
var twit = new twitter({
consumer_key: 'ht0SGPbwWzA0SB4qxndNTcBZZ',
consumer_secret: 'Zx7PeBRebQSjMnA2GmOJWH1ylnBZn9J4ATjnmeGkD7cPD77dYd',
access_token_key: '120410501-4gcebUBRFOhidX3kFMditXvcqGwTUrl4i44KNah6',
@raghunandangupta1992
raghunandangupta1992 / index.js
Last active August 24, 2017 20:08
requirebin sketch
// Welcome! require() some modules from npm (like you were using browserify)
// and then hit Run Code to run your code on the right side.
// Modules get downloaded from browserify-cdn and bundled in your browser.
var text = "initial text <b>tag 1 ka text</b> bwala word ka text <b>tag 2 ka text</b> left off text";
var HtmlParser = function(textToParse, tagToPick) {
var openTag = tagToPick;
@raghunandangupta1992
raghunandangupta1992 / index.js
Created August 23, 2017 15:57
requirebin sketch
// Welcome! require() some modules from npm (like you were using browserify)
// and then hit Run Code to run your code on the right side.
// Modules get downloaded from browserify-cdn and bundled in your browser.
var htmlparser = require("htmlparser2");
var mystring = '';
var withTagObj = {};
var finalObject = {};
var isTagOpen = false;
var count = 0;
@raghunandangupta1992
raghunandangupta1992 / index.js
Created August 23, 2017 15:46
requirebin sketch
// Welcome! require() some modules from npm (like you were using browserify)
// and then hit Run Code to run your code on the right side.
// Modules get downloaded from browserify-cdn and bundled in your browser.
var htmlparser = require("htmlparser2");
var mystring = '';
var parser = new htmlparser.Parser({
onopentag: function(name, attribs){
if(name === "b"){
mystring += ">>>";
@raghunandangupta1992
raghunandangupta1992 / index.js
Created August 23, 2017 15:44
requirebin sketch
// Welcome! require() some modules from npm (like you were using browserify)
// and then hit Run Code to run your code on the right side.
// Modules get downloaded from browserify-cdn and bundled in your browser.
var htmlparser = require("htmlparser2");
var mystring = '';
var parser = new htmlparser.Parser({
onopentag: function(name, attribs){
if(name === "b"){
mystring += ">>>";
@raghunandangupta1992
raghunandangupta1992 / index.js
Created August 22, 2017 13:43
requirebin sketch
// Welcome! require() some modules from npm (like you were using browserify)
// and then hit Run Code to run your code on the right side.
// Modules get downloaded from browserify-cdn and bundled in your browser.
var htmlparser = require("htmlparser2");
var mystring = '';
var parser = new htmlparser.Parser({
onopentag: function(name, attribs){
if(name === "b"){
mystring += ">>>";