Skip to content

Instantly share code, notes, and snippets.

View duduindo's full-sized avatar
🏊‍♀️
beach ❤️

Eduardo Paixão duduindo

🏊‍♀️
beach ❤️
View GitHub Profile
@duduindo
duduindo / Cargo.toml
Last active July 3, 2022 01:49
Example Rust + WebAssembly + localStorage.getItem
[package]
name = "hello_world_storage"
version = "0.1.0"
edition = "2021"
[lib]
crate-type = ["cdylib"]
[dependencies]
wasm-bindgen = "0.2.81"
@duduindo
duduindo / Web-API-Não-Sabia-Zeno Rocha.md
Last active March 19, 2021 04:43
Web APIs que você provavelmente não sabia que existiam - Zeno Rocha - https://youtu.be/851mizGnr_Y
@duduindo
duduindo / redux-book-chapter-one.html
Last active July 24, 2018 12:09
Example of book Redux Book - Chapter 1 https://github.com/redux-book
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Document</title>
<style> body { background: silver; } </style>
</head>
<body>
<main>
<h1 id="counter"></h1>
@duduindo
duduindo / containsNode-polyfill.js
Created February 21, 2018 19:06
Simple polyfill of Selection.prototype.containsNode
import $ from 'jquery';
/**
* {Element} Elemento que o browser tentará encontrar dentro da seleção
*
* @return bool
*/
let containsNode = node => {
const selection = document.getSelection();
@duduindo
duduindo / Funcionalidades - ES6.md
Last active November 23, 2017 01:45
Funcionalidades novas ES6
@duduindo
duduindo / gulpfile.js
Created October 12, 2017 19:43
Eslint files from commit git
const gulp = require('gulp');
const { spawnSync } = require('child_process');
/**
* Get files from commit
* {String} Hash commit
* {Regex} Regex filter extensions
*/
const getGitCommit = (hash, regex) => {
const spawn = spawnSync('git', ['diff-tree', '--no-commit-id', '--name-only', '-r', hash]);
{
"files.exclude": {
"**/.git": true,
"**/.svn": true,
"**/.hg": true,
"**/.DS_Store": true,
"**/node_modules": true
},
"editor.fontFamily": "'Ubuntu Mono', 'Droid Sans Mono', 'Courier New', 'Droid Sans Fallback'",
"editor.fontSize": 18,
@duduindo
duduindo / package.js
Last active April 22, 2017 22:26
Developing quick and simple. Babel, Browserify, Stylus and Server simple only with package.json
{
"name": "public_app",
"version": "2.0.0",
"description": "",
"author": "Eduardo Paixão (@duduindo)",
"license": "MIT",
"watch": {
"js": {
"patterns": [
"./assets/js/"
/**
* Multiples extends Javascript ES6
* @About: Clone method's class
**/
class SuperExtends {
constructor(ar) {
ar.forEach((item) => {
const news = new item;
document.body.textContent = ""
var json = {
"tabela": {
"thead": [{
"tr":[
{"td": "TD head 1"},
{"td": "TD head 2"},
{"td": "TD head 3"}
]