Skip to content

Instantly share code, notes, and snippets.

@RodrigoTomeES
RodrigoTomeES / dom-parser+1.1.5.patch
Created July 1, 2025 09:22
Patch dom-parser issue #34
diff --git a/node_modules/dom-parser/dist/lib/Dom.js b/node_modules/dom-parser/dist/lib/Dom.js
index e94dd0d..4f29243 100644
--- a/node_modules/dom-parser/dist/lib/Dom.js
+++ b/node_modules/dom-parser/dist/lib/Dom.js
@@ -71,7 +71,7 @@ function* domGenerator(html) {
}
}
function isElementComposed(element, tag) {
- if (!tag) {
+ if (!tag || !element) {
@RodrigoTomeES
RodrigoTomeES / text-underline-offset-negative.css
Created May 5, 2022 12:56
Example of use text-underline-offset negative
/**
* Title: text-underline-offset with negative value
* Preview: https://codepen.io/RodrigoTomeES/pen/RwQWwML
* More info:
* - https://github.com/w3c/csswg-drafts/issues/4059
* - https://developer.mozilla.org/en-US/docs/Web/CSS/text-decoration-skip-ink
* - https://developer.mozilla.org/en-US/docs/Web/CSS/text-decoration-skip
*/
a {
@RodrigoTomeES
RodrigoTomeES / FF_HTMLbookmarks_toCSV.js
Created March 8, 2022 22:40 — forked from ruucm/FF_HTMLbookmarks_toCSV.js
JavaScript bookmarklet for converting HTML-formatted Firefox bookmarks into a downloadable CSV file
javascript:(function(){
/* escape quotes and commas in contents to be comma-separated */
function wrapCsvContents(content) {
if (typeof(content) === 'string') {
if (content.replace(/ /g, '').match(/[\s,"]/)) {
return '"' + content.replace(/"/g, '""') + '"';
}
}
return content;
}
@RodrigoTomeES
RodrigoTomeES / index.js
Last active June 10, 2020 10:54
FileUpload.js usage example
import React from 'react'
const index = (props) => {
state = {
files: [
'nice.pdf',
'verycool.jpg',
'amazing.png',
'goodstuff.mp3',
'thankyou.doc'
@RodrigoTomeES
RodrigoTomeES / FileUpload.js
Created June 10, 2020 09:06
Simple drag and drop file upload in React
import React, { Component } from 'react'
class FileUpload extends Component {
state = {
drag: false
}
dragCounter = 0
handleDrag = (e) => {