Skip to content

Instantly share code, notes, and snippets.

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

Eduardo Júnior goldblade

🏠
Working from home
View GitHub Profile
@goldblade
goldblade / copy_multiple_index_es.sh
Created January 6, 2020 15:11
Multiplie copy elastic search
#!/bin/sh
QA_INDEX=
QA_OLD_HOST=
QA_NEW_HOST=
if ! type elasticdump > /dev/null; then
echo "Installing elasticdump"
yarn global add elasticdump
echo "asdf reshim"
@goldblade
goldblade / copy_index_es.sh
Created January 6, 2020 15:10
Elasticdump
#!/bin/sh
QA_INDEX=
QA_OLD_HOST=
QA_NEW_HOST=
if ! type elasticdump > /dev/null; then
echo "Installing elasticdump"
yarn global add elasticdump
echo "asdf reshim"
@goldblade
goldblade / sendmessage.js
Created April 1, 2019 11:18
Rabbit send message
#!/usr/bin/env node
const rabbit = {
uuid: "229aaca7-51f3-43bd-a306-95e13d190bc4",
fullname: "Ikki de Fênix",
email: "ikki@gmail.com",
network_email: "ikki@impulso.network",
cpf: "111.111.111-11",
gender: "male",
languages: {
spanish: "basic",
@goldblade
goldblade / pure.js
Created March 25, 2019 16:54
purecomponent.js
import React, { PureComponent } from 'react';
import PropTypes from 'prop-types';
import classnames from 'classnames';
// styles
import styles from './highlights.scss';
/**
* Offer component
* @extends { PureComponent }
* @class
@goldblade
goldblade / functional.js
Created March 25, 2019 16:54
functional
import React from 'react';
import classnames from 'classnames';
import { getOr } from 'lodash/fp';
// styles
import styles from './highlights.scss';
const Offer = ({
highlights = [],
className,
image = 'https://s3-sa-east-1.amazonaws.com/chefs-salles/imagens/sem-foto.png',
@goldblade
goldblade / atena-tests.js
Created March 25, 2019 00:05
atena-testes.js
describe("save", () => {
describe("rocket origin", () => {
afterEach(() => jest.restoreAllMocks());
it("should returns reject promise when user not in rocket database", async () => {
const data = message;
data.origin = "rocket";
await expect(interaction.save(message)).rejects.toEqual(
"add new interaction"
);
});
@goldblade
goldblade / atena.js
Last active March 25, 2019 12:49
atena
export const save = async data => {
if (isBot(data)) {
return;
}
let valid = true;
let interaction;
// apply valid function to others integrations
if (data.origin === "rocket") {
await exportFunctions
.validInteraction(data)
@goldblade
goldblade / .vimrc
Last active September 5, 2020 16:10
My .vimrc file
set nocompatible
set clipboard=unnamed
set backspace=indent,eol,start
filetype off
set rtp+=~/.vim/bundle/Vundle.vim
:let mapleader = ","
call vundle#begin()
@goldblade
goldblade / 01-simple.test.js
Created July 7, 2018 20:38 — forked from a-h/01-simple.test.js
Testing styled Material UI components with Enzyme
import React from 'react';
import { shallow } from 'enzyme';
const Item = text => <p>Item {text}</p>;
const Composition = ({ showB }) => (
<p>
<Item text="A" />
{showB && <Item text="B" />}
</p>);

Dev List Bookmarks

Attention: the list was moved to https://github.com/vitorbritto/dev-list

This page is not maintained anymore, please update your bookmarks.


Recently, I decided to organize my bookmarks. So, like a good fellow, I am sharing with you. I hope you enjoy!