Skip to content

Instantly share code, notes, and snippets.

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

Rabii Luena rluena

🏠
Working from home
View GitHub Profile
@rluena
rluena / redux-form.js
Last active December 24, 2019 17:13
redux-form multiple component using similar name
// Link to the issue addressed
https://github.com/redux-form/redux-form/issues/603#issuecomment-295043224
// FormContainer
import Form from './Form';
....
class FormContainer extends Component
{
onSubmit (data, dispatch) {...}
@rluena
rluena / chaser.js
Created March 31, 2018 10:23
Interview question.
// Order by rank function
function orderByRank(arr) {
return arr.sort(function(a, b) {
return a.rank > b.rank;
});
}
//Average ranking function
function avgRanking(arr) {
var total = arr.reduce(function(total, next) {
@rluena
rluena / chai-http.js
Last active February 21, 2019 20:53
Sending form data using chai-http
// Sending form data
chai = require('chai');
chaiHttp = require('chai-http')
chai.use(chaiHttp);
stripe_request = chai.request('https://api.stripe.com');
stripe_request.post('/v1/tokens')
.set('content-type', 'application/x-www-form-urlencoded')
.send({
## Multi authentication
http://stackoverflow.com/questions/34614753/can-anyone-explain-laravel-5-2-multi-auth-with-example
## Repository Patterns
https://bosnadev.com/2015/03/07/using-repository-pattern-in-laravel-5/