Skip to content

Instantly share code, notes, and snippets.

View walteribeiro's full-sized avatar
🏠
Working at home

Walter Ribeiro walteribeiro

🏠
Working at home
View GitHub Profile

1. Clone your fork:

git clone [email protected]:YOUR-USERNAME/YOUR-FORKED-REPO.git

2. Add remote from original repository in your forked repository:

cd into/cloned/fork-repo
git remote add upstream git://github.com/ORIGINAL-DEV-USERNAME/REPO-YOU-FORKED-FROM.git
git fetch upstream
@walteribeiro
walteribeiro / ContactForm.js
Last active November 16, 2018 17:59
React Router V4 - Redirect
import React, { Component } from 'react';
import { withRouter } from 'react-router-dom';
class ContactForm extends Component {
submitForm = e => {
e.preventDefault()
this.props.history.push('/thank-you');
}
@walteribeiro
walteribeiro / socket-cheatsheet.js
Created June 7, 2018 11:41 — forked from alexpchin/socket-cheatsheet.js
A quick cheatsheet for socket.io
// sending to sender-client only
socket.emit('message', "this is a test");
// sending to all clients, include sender
io.emit('message', "this is a test");
// sending to all clients except sender
socket.broadcast.emit('message', "this is a test");
// sending to all clients in 'game' room(channel) except sender
@walteribeiro
walteribeiro / designer.html
Last active January 6, 2016 16:24
designer
<link rel="import" href="../paper-button/paper-button.html">
<link rel="import" href="../core-tooltip/core-tooltip.html">
<link rel="import" href="../paper-input/paper-input.html">
<polymer-element name="cadastro-basico">
<template>
<style>
:host {
position: absolute;