Skip to content

Instantly share code, notes, and snippets.

View wingtonrbrito's full-sized avatar

Wington Brito wingtonrbrito

View GitHub Profile
@wingtonrbrito
wingtonrbrito / create-react-redux-asp-net-core.sh
Last active October 26, 2017 14:18
Create a react-redux app with asp.net core
//* Install netcoreapp2.0 in Linux https://www.microsoft.com/net/download/linux
//* Open terminal and create project as
//* dotnet new reactredux -o helloworld
cd helloworld
npm install
dotnet run
@wingtonrbrito
wingtonrbrito / compareAnyNumberOfObjects.js
Last active October 11, 2017 15:55
compare Any Number Of Objects
import {fromJS} from 'immutable';
public compareObjects(...compareArguments): boolean {
//For now just two arguments
if (!compareArguments)
return false;
if (compareArguments.length < 2)
return false;
compareArguments.forEach((curr, index) => {
if ((fromJS(curr).equals(fromJS(compareArguments[index + 1]))) == false){
@wingtonrbrito
wingtonrbrito / working-react-router.js
Created September 22, 2017 00:17
working-react-router.js
import {
BrowserRouter as Router,
Link,
Route,
Switch,
} from 'react-router-dom';
import * as React from 'react';
import * as ReactDOM from 'react-dom';
//import { Provider } from 'react-redux';
//import { createStore, applyMiddleware } from 'redux';
import {
BrowserRouter as Router,
Link,
Route,
Switch,
} from 'react-router-dom';
import React from 'react';
import ReactDOM from 'react-dom';
import { Provider } from 'react-redux';
import { createStore, applyMiddleware } from 'redux';
@wingtonrbrito
wingtonrbrito / basic-react-redux-router.js
Last active September 21, 2017 21:51
Simple example of React, Redux, and Router
import {
BrowserRouter as Router,
Link,
Route,
Switch,
} from 'react-router-dom';
import React from 'react';
import ReactDOM from 'react-dom';
import { Provider } from 'react-redux';
import { createStore, applyMiddleware } from 'redux';
@wingtonrbrito
wingtonrbrito / jsbasicclass.txt
Created June 8, 2017 23:29
Class definition with methods
class Fraction{
constructor(top, bottom){
this.num = top;
this.den = bottom;
}
show() {
console.log('${this.num}/${this.den}');
}