Skip to content

Instantly share code, notes, and snippets.

View matheusmurta's full-sized avatar
👨‍💻
Focusing

Matheus Gonçalves Murta matheusmurta

👨‍💻
Focusing
View GitHub Profile
@matheusmurta
matheusmurta / gist:34eb28e003b953e17a937c6c9dcb6852
Created October 5, 2021 17:01
angular 2+ currency pipe programmatically
//angular 2+ currency pipe programmatically
getFormattedPrice(price: number) {
return new Intl.NumberFormat('pt-BR', { style: 'currency', currency: 'BRL' }).format(price);
}
@matheusmurta
matheusmurta / gist:c50d3001664e2353f0bf9908eb8c9298
Last active September 1, 2021 17:06
Directive to detec end of scroll angular material
import { Directive, HostListener, Output, EventEmitter } from '@angular/core';
@Directive({
selector: '[scrollTracker]',
})
export class ScrollTrackerDirective {
@Output() scrolled = new EventEmitter<any>();
@HostListener('scroll', ['$event'])
onScroll(event) {
@matheusmurta
matheusmurta / gist:5324db8631e9c4f7dcf9070e87fb5577
Created November 7, 2020 22:14
Tinder Auto Like Javascript
var confirmBox = confirm('Start swiping right?');
var count = 1;
var like = function(){
if (confirmBox){
document.querySelector('[aria-label="Gosto"]').click(); //translate you country inspect the button
console.log('Liked ' + count); count++; };
setTimeout(like, 100);
};
setTimeout(like, 100);
@matheusmurta
matheusmurta / Popover Inspiration
Created August 4, 2020 14:23
Popover Inspiration
https://scripts-cdn.softpedia.com/screenshots/WebUI-Popover_1.png
https://developer.apple.com/design/human-interface-guidelines/macos/images/popover_2x.png
https://i.pinimg.com/originals/c8/9d/26/c89d26693202223e22a296a4cc32cb3e.png
https://cdn.dribbble.com/users/5477/screenshots/1867310/helpscout-conversation-popover.png
@matheusmurta
matheusmurta / Padrão de estrutura SCSS DICAS
Created July 30, 2020 16:46
Padrão de estrutura SCSS DICAS
Padrão com Atomic Design
https://webdesign.tutsplus.com/articles/structuring-sass-saying-goodbye-to-atomic-design-ambiguity--cms-26679
https://blog.prototypr.io/organized-scss-folder-structures-for-design-systems-ecb861f1522c
Padrão 7-1 recomendado pelo proprio site do sass
https://sass-guidelin.es/#the-7-1-pattern => exemplo https://gist.github.com/rveitch/84cea9650092119527bc
@matheusmurta
matheusmurta / ES6 Destructuring
Created July 15, 2020 04:32
ES6 Destructuring
const student = {
name: 'John Doe',
age: 16,
scores: {
maths: 74,
english: 63
}
};
// We define 3 local variables: name, maths, science
@matheusmurta
matheusmurta / Filtrar itens de um array baseado no conteudo da key
Created July 15, 2020 03:36
Filtrar itens de um array baseado no conteudo da key
Filtrar itens de um array baseado no conteudo da key
var PATTERN = 'bedroom',
filtered = myArray.filter(function (str) { return str.includes(PATTERN); });
ou
var PATTERN = 'La';
const filtered = users.results.filter((obj) =>
obj.name.first.includes(PATTERN) || obj.name.last.includes(PATTERN)
);
@matheusmurta
matheusmurta / Get all href of specif div
Created July 2, 2020 02:33
Get all href of specif div
Array.prototype.map.call(document.querySelectorAll("body > div.container-fluid.falco-custom-fluid-container > div > div > div > div:nth-child(1) > a"), function (e) {
return e.getAttribute('href');
});
Array.prototype.map.call(document.querySelectorAll(".myselectorAreaofLinks"), function (e) {
return e.getAttribute('href');
});
@matheusmurta
matheusmurta / icones icones
Created June 24, 2020 23:02
Icons / Icones
icones icones / icons
https://icomoon.io/
https://feathericons.com/
https://icons8.com.br/
@matheusmurta
matheusmurta / gist:934e56749a34d8ce79bfbccab05cc890
Created June 23, 2020 19:12 — forked from Mikodes/gist:be9b9ce42e46c3d4ccb6
All Media queries for resolutions
/* (320x480) iPhone (Original, 3G, 3GS) */
@media only screen and (min-device-width: 320px) and (max-device-width: 480px) {
/* insert styles here */
}
/* (320x480) Smartphone, Portrait */
@media only screen and (device-width: 320px) and (orientation: portrait) {
/* insert styles here */
}