Skip to content

Instantly share code, notes, and snippets.

Landry Soules landrysoules

Block or report user

Report or block landrysoules

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@landrysoules
landrysoules / FormValidationHelper.js
Last active Sep 30, 2019
Example of using dynamic function call via map + reduce for adding boolean values
View FormValidationHelper.js
const validate = (value, allValues, meta, validationTypes) => {
const ret = validationTypes.reduce((sum, next) => {
console.debug({ sum, next });
return sum && next(value, allValues, meta);
}, true);
console.debug('V_A_L_I_D_AT_I_O_N_', ret);
return ret;
};
const required = value => {
@landrysoules
landrysoules / AuditModelBuilder.js
Last active Sep 6, 2019
Simplifier le code sur des closures :
View AuditModelBuilder.js
<FieldArray name="sections" subscription={{}}>
{({ fields }) => {
return (
<SortableContainer onSortEnd={fields.move} useDragHandle>
{fields.map((name, index) => (
<AuditModelSection
key={name}
sectionIndex={index}
index={index}
moveSection={fields.move}
View Contact.js
import React from 'react';
import { Row, Col, Title, Tabs, Loader } from '../../../../ui/base';
import { FormattedMessage, injectIntl, intlShape } from 'react-intl';
import ContactForm from './ContactForm';
import PropTypes from 'prop-types';
import { pick, isEmpty } from 'ramda';
const TabPane = Tabs.TabPane;
const Contact = ({ form, intl, brands, selectedDealer }) => {
@landrysoules
landrysoules / Config.js
Created May 22, 2019
Example of functionnal connected component
View Config.js
import React, { useEffect } from 'react';
import ActionBar from '../../../ui/layout/ActionBar';
import {
getDealersSelect,
getSelectedDealer,
getSelectedDealerId,
getDealersIsFetching,
getDealersLinks,
getDealersApiError
} from '../../../../selectors/dealerSelectors';
@landrysoules
landrysoules / cloudSettings
Last active Jul 12, 2019
Visual Studio Code Settings Sync Gist
View cloudSettings
{"lastUpload":"2019-07-12T20:28:04.779Z","extensionVersion":"v3.3.1"}
@landrysoules
landrysoules / 17.06.sh
Created Nov 3, 2017
Edited docker install script for fedora
View 17.06.sh
#!/bin/sh
set -e
CHANNEL="stable"
docker_version=17.06.2
apt_url="https://apt.dockerproject.org"
yum_url="https://yum.dockerproject.org"
gpg_fingerprint="9DC858229FC7DD38854AE2D88D81803C0EBFCD88"
View navbar.html
<form class="navbar-form navbar-right" id="user_form" name="user_form"
novalidate>
<div>
<div class="form-group">
<label for="email_field">email</label> <input class=
"form-control" id="email_field" name="username" required=""
type="email"> <span class=
"glyphicon glyphicon-remove form-control-feedback"></span>
</div>
You can’t perform that action at this time.