Skip to content

Instantly share code, notes, and snippets.

View dbarjs's full-sized avatar
🏡
Working from home

Eduardo Barros dbarjs

🏡
Working from home
View GitHub Profile
var data = JSON.stringify({
"From": "mailman@elbit.com.br",
"To": "eduardo@elbit.com.br, rafael@elbit.com.br, cristiano@elbit.com.br",
"Subject": "Test",
"Tag": "Invitation",
"HtmlBody": "<b>Olá</b>, tudo bem? haha",
"TextBody": "Olá, tudo bem?",
"ReplyTo": "mailman@elbit.com.br"
});
var data = JSON.stringify({
"personalizations": [
{
"to": [
{
"email": "joseeduardobarros@gmail.com"
}
],
"subject": "Hello, World!"
}
@dbarjs
dbarjs / buttonCreator.js
Created November 9, 2016 14:33
Criar botões em javascript
// essa função constrói e retorna o botão baseado no paramentro 'properties'
function buildButton( properties ) {
var button = document.createElement('button');
button.textContent = properties.title;
button.className = properties.className;
button.addEventListener('click', function() {
// adiciona a action aqui
@dbarjs
dbarjs / dalia-tonovaso-filtro.js
Created March 3, 2017 21:53
Filtro para mostrar pedidos não retirados
// filtro para mostrar todos pedidos com ingressos no retirados
// este filtro só exibe pedidos aprovados e com pelo menos um item de ingresso
var notShippedList = list.filter(function(item) {
if (item.ticketList.list.length > 0 && item.status == 'Aprovada') {
for (var i = item.ticketList.list.length; i--; ) {
if (!item.ticketList.list[i].shipping)
return item.clientName;
}
}
@dbarjs
dbarjs / index.js
Last active May 19, 2020 16:31
Fetch data from wcota/covid19br to Vuex
import parse from 'csv-parse/lib/sync'
import autoParse from 'auto-parse'
export const mutations = {
SET_KEYS: (state, keys) => (state.keys = keys),
SET_ENTRIES: (state, entries) => (state.entries = entries),
SET_LAST_DATE: (state, lastDate) => (state.lastDate = lastDate)
}
export const state = () => ({

Install with snap

sudo snap install docker

Add ZSH plugin:

Add this to your ~/zshrc:

plugins=(... docker)

Install Postgres

@dbarjs
dbarjs / index.js
Last active February 16, 2021 19:22
kill_btb21
// BIG TRETA BRASIL ELEMENT FINDER
let GHOST_PROPERTIES = [
{ property: 'overflow', value: 'hidden' },
{ property: 'left', value: '-9999px' },
{ property: 'display', value: 'none' },
];
let ANCESTOR_MAX_CHILD = 4;
@dbarjs
dbarjs / hello.js
Last active September 22, 2022 17:38
temp.js
setTimeout(() => {
console.log('hello from remote!');
}, 1000)