Skip to content

Instantly share code, notes, and snippets.

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

luiz tanure letanure

🏠
Working from home
View GitHub Profile
// Menu: Text / String transformations
// Description: spaces, accents, cases, variables names
// Author: Luiz Tanure
// Twitter: @tanure
let { getSelectedText, setSelectedText } = await kit("text")
// let userString = await arg("Type or paste the text to transform:")
String.prototype.upperCaseFirstLetter = function () {
@letanure
letanure / lastpass-export.js
Created July 24, 2020 09:30
My company uses lastpass and dont allow export passwords and usernames. open the web interface and run on console
var edits = document.querySelectorAll('.itemButton.edit')
var count = 0
var interval = setInterval(async function(){
count++
edits[count].click()
setTimeout(() => {
var url = document.getElementById('siteDialogURL').value
var name = document.getElementById('siteDialogName').value
var username = document.getElementById('siteDialogUsername').value
var password = document.getElementById('siteDialogPassword').value
#!/usr/bin/env bash
# Caution is a virtue.
set -o nounset
set -o errtrace
set -o errexit
set -o pipefail
# ## Global Variables
@letanure
letanure / fun.js
Last active July 24, 2019 17:19
create array months in any language 😛
[...Array(12)].map((item, index) => ( new Date(Date.UTC(0, ++index, 0, 0, 0, 0)).toLocaleDateString('de-DE', { month: 'long' }) ))
Object.assign(...[...Array(12)].map((item, index) => new Date(Date.UTC(0, ++index, 0, 0, 0, 0)).toLocaleDateString('pt-BR', { month: 'long' })).map((month, index) => ({[index]: month})))
@letanure
letanure / ai-for-humans.md
Created May 17, 2018 16:05 — forked from codepo8/ai-for-humans.md
Link collection for the "AI for humans" talk

Slides

Intro and history of ML on the web

  • Autodraw by Google is a tool that allows you to doodle what you want to paint and turns it into a proper icon by detecting the outline and making an ML based assumption what it could be.
  • Quickdraw by Google is a game they created a few years before Autodraw to train the model.
  • ReCaptcha is a CAPTCHA engine that feeds the data back into Google's ML systems. For example, currently being asked to detect street signs or cars is a good indicator that this data will go into the self-driving cars project.
  • Amazon's Mechanical Turk is a service by Amazon to get humans to do things for you. A lot of the data accumulated with that one could be used to train models. One very famous examples back then was to ask people to [p
@letanure
letanure / buttons.styl
Created March 24, 2018 19:12
demo stylus
/*
# Core/Buttons
Basic definitions of how use the grid and its containers
.button - Main container
Markup:
<button class="button {{modifier_class}}">
Button
@letanure
letanure / markdown-demo.md
Created March 16, 2018 15:09
markdown -demo.md

This a test of all markdown possibilities:


Headings

h1 Heading 1

h2 Heading 2

h3 Heading 3

h4 Heading 4

@letanure
letanure / css_regression_testing.md
Created March 8, 2018 10:08 — forked from cvrebert/css_regression_testing.md
Survey of screenshot-based CSS testing tools

Currently considering https://github.com/webdriverio/webdrivercss


Core Goals:

  • Can test in up-to-date versions of all major browsers
  • Can test on up-to-date versions of all major OSes
  • Can test in IE9 (because Bootstrap v4 will support IE9+)
  • Don't want to have to setup/maintain our own cluster of VMs running all the necessary OSes (and all the versions of Windows)
  • Workflow for management of reference/baseline/norm screenshots
@letanure
letanure / string_html_list_to_array.js
Last active January 31, 2018 13:31
string_html_list_to_array.js
const myHtml = '<p>Atesto para os devidos fins que o paciente este internado por três principais motivos:</p> <ol><li> Esta com fome</li><li>Esta com Sede</li><li>Esta com Frio</li></ol>'
const arrayItems = myHtml
.replace('</ol>', '')
.replace(/<\/li>/gi, '')
.split('<ol>')[1]
.split('<li>')
.map(item => item.replace('</li>', '').trim())
.filter(item => item !== '')
@letanure
letanure / README.md
Created January 3, 2018 16:13 — forked from kerryboyko/README.md
VueJS Best Practices Guide

Deverus Vue.js Style Guide

Guide for developing Vue.js applications.

v. 0.0.1

Vue.js is an amazing framework, which can be as powerful as Angular or React, the two big heavy hitters in the world of front-end frameworks.

However, most of Vue's ease-of-use is due to the use of Observables - a pattern that triggers re-renders and other function calls with the reassignment of a variable.