Skip to content

Instantly share code, notes, and snippets.

View brunoguerra's full-sized avatar
🌌
Growing online businesses 🥇

Bruno Guerra brunoguerra

🌌
Growing online businesses 🥇
  • Blumenau, SC
View GitHub Profile
@brunoguerra
brunoguerra / Html cardboard fase 1.html
Last active November 17, 2019 20:30
Cardboard Plain Js
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>title</title>
<link rel="stylesheet" href="style.css">
<style>
* {
padding: 0px;
margin: 0px;
@brunoguerra
brunoguerra / funcional.js
Last active May 2, 2019 15:13
Javascript Select path string from object using modern ecma
export const selectIt = (path, obj) => path &&
path.split('.').reduce((mem, property) => mem && mem[property], obj)
@brunoguerra
brunoguerra / understanding-word-vectors.ipynb
Created October 12, 2018 18:54 — forked from aparrish/understanding-word-vectors.ipynb
Understanding word vectors: A tutorial for "Reading and Writing Electronic Text," a class I teach at ITP. (Python 2.7) Code examples released under CC0 https://creativecommons.org/choose/zero/, other text released under CC BY 4.0 https://creativecommons.org/licenses/by/4.0/
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@brunoguerra
brunoguerra / docker-compose.yml
Created June 1, 2018 13:24
Mongo replica-set with docker
version: '2'
services:
replica1:
image: mongo:3.0
container_name: mongo1
ports:
- "27017:27017"
volumes:
- ./mongodata/replica1:/data/db
command: mongod --smallfiles --replSet "mrmtx"
@brunoguerra
brunoguerra / console-script-twitter-unfollow-script.js
Last active May 2, 2018 18:23
Unfollow people for free on Twitter with Dev tools console
var count = 0;
function autoScrolling() {
var interval = 200;
window.scrollTo(0, document.body.scrollHeight);
$('.ProfileCard-content').each(function() {
var status = $(this)
.find('.FollowStatus')
.text();
var unfollowButton = $(this).find('.user-actions-follow-button');
if (status != 'Follows you') {
@brunoguerra
brunoguerra / app.build.gradle
Created November 1, 2017 17:48
Force android tu build submodules with right buildTools and Sdk versions
subprojects {
afterEvaluate {project ->
if (project.hasProperty("android")) {
android {
compileSdkVersion 25
buildToolsVersion '25.0.0'
}
}
}
}
@brunoguerra
brunoguerra / GridContainerFactory-test.js
Last active September 22, 2017 16:20
Jest - Testing Redux with Mocking Store and Factory
import React from 'react'
import 'prop-types'
import GridFactory, { GridContainerFactory } from '../GridContainer'
import { mount } from 'enzyme'
const mockRequestAction = { type: 'REQUEST_ACTION_TEST' }
const List = ({ records }) => <ul records={records}></ul>
const props = {
addFormUniqueName: 'form1',
reducerName: 'form-test-x',
@brunoguerra
brunoguerra / gen.config.js
Last active November 1, 2017 17:49
Declarative Backend
export default {
'users': 'User'
}
@brunoguerra
brunoguerra / README.md
Last active March 26, 2021 00:03
GIT FETCH SPECIFIC COMMIT

make a new blank repository in the current directory

git init

add a remote

git remote add origin url://to/source/repository

fetch a commit (or branch or tag) of interest

Note: the full history of this commit will be retrieved

git fetch origin # SHA #

import React from 'react'
import FormValidate, { ErrorComponent, identity, ruleValidate, validator } from '../Form_HOC'
import { mount } from 'enzyme'
import { withHandlers } from 'recompose'
import { Stateful } from 'react-mock'
describe('FormValidate', () => {
let Form
let wrapper
let stateful