Skip to content

Instantly share code, notes, and snippets.

View guilhermebruzzi's full-sized avatar
😃
Developer @ Coinbase

Guilherme Dantas Heynemann Bruzzi guilhermebruzzi

😃
Developer @ Coinbase
View GitHub Profile
<html>
<head>
<title>
Este é o título
</title>
</head>
<body>
Este é o corpo
</body>
</html>
@guilhermebruzzi
guilhermebruzzi / remove-immutable.md
Last active April 16, 2024 17:46
Remove Immutable JS from your source code

I decided to remove all Immutable code on our big project because it wasn't causing our React to render less (using selectors on our redux layer was actually better).

Since our project has tests to check if everything is still working, I was able to achieve that with the following steps:

Search on all files on vscode or any editor with Use Regular Expression option (command+alt+r on vscode):

(Immutable|\.(size|count\(|toJS(?!\w)|fromJS(?!\w)|first[\(\)]|get\(|set\(|findEntry\(|getIn\(|setIn\(|contains\(|delete\(|asImmutable|add\())

Then on each find that was actually from a Immutable code:

  • Remove Immutable imports
@guilhermebruzzi
guilhermebruzzi / github-net-config.md
Last active May 22, 2023 17:02
NET não libera a porta 22 e impede de acessar o github por ssh

Usar ssh do github com wifi do netcombo

A NET parece que só libera o uso de qualquer porta, como a porta 22 de ssh, para pessoa jurídica em seus novos planos (desde 2016).

Para conseguir usar o github por ssh com plano de internet da NET para pessoa física, é necessário:

Criar o arquivo ~/.ssh/config e adicionar:

Host github.com
@guilhermebruzzi
guilhermebruzzi / barbearia.go
Last active December 16, 2015 08:39
Vários elevadores consumindo pessoas
// Copyright 2013 Francisco Souza. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
package main
import (
"fmt"
"time"
"flag"
@guilhermebruzzi
guilhermebruzzi / robot.js
Created December 2, 2012 17:58 — forked from heynemann/robot.js
Merry Go round
//FightCode can only understand your robot
//if its class is called Robot
var Robot = function(robot){
//robot.clone();
this.robotOptions = {
clone: {
canStartFight: false,
goBackOnCollision: false
//FightCode can only understand your robot
//if its class is called Robot
var Robot = function(robot) {
robot.turn(270 - robot.angle);
robot.rotateCannon(90 - robot.cannonAbsoluteAngle);
robot.clone();
this.options = {
cloneInCorrectAngle: false,
firing: false
@guilhermebruzzi
guilhermebruzzi / robot.js
Created December 2, 2012 15:59 — forked from heynemann/robot.js
Merry Go round
//FightCode can only understand your robot
//if its class is called Robot
var Robot = function(robot){
//robot.clone();
this.robotOptions = {
clone: {
canStartFight: false,
goBackOnCollision: false
@guilhermebruzzi
guilhermebruzzi / robot.js
Created December 2, 2012 15:03 — forked from cezarsa/robot.js
Simple Wall Robot
var Robot = function(robot){
robot.turnLeft(robot.angle % 90);
robot.turnGunRight(90);
robot.clone();
this.direction = 1;
};
Robot.prototype.onIdle = function(ev) {
var robot = ev.robot;
robot.ahead(1);
if (robot.parentId) {
@guilhermebruzzi
guilhermebruzzi / robot.js
Created December 2, 2012 14:58 — forked from heynemann/robot.js
Merry Go round
//FightCode can only understand your robot
//if its class is called Robot
var Robot = function(robot){
//robot.clone();
this.robotOptions = {
clone: {
canStartFight: false,
goBackOnCollision: false