Skip to content

Instantly share code, notes, and snippets.

🎯
Focusing

Brandon Sueur brandonsueur

🎯
Focusing
Block or report user

Report or block brandonsueur

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
View banner.js
import React from "react";
import { StyleSheet, Text, View } from "react-native";
const Banner = () => {
return (
<View style={styles.banner}>
<Text style={styles.bannerTitle}>
Bonsoir <Text style={{ fontWeight: "bold" }}>Elisa</Text>, 👋
</Text>
<Text style={styles.bannerParagraph}>
View gist:0d7eae71717712cf10af2a07b7c9ad36
class LastFixation extends React.Component {
componentDidMount() {
this.props.getLastFixation()
}
render() {
const { hasContracts, t, isContractsLoaded, lastFixation } = this.props
return (
hasContracts &&
View managefixation.js
import React from 'react'
import { connect } from 'react-redux'
import { withTranslation } from 'react-i18next'
import { Modal, Form, DatePicker, Select, Button, Row, Col, Alert } from 'antd'
import { Formik, Field as FormikField } from 'formik'
import { ExclamationCircleOutlined } from '@ant-design/icons'
import {
fixations,
View .json
{"type":"CONTRACT/CREATE","data":{"contract_name":"okkoefezoe","contract_energy":"gas","contract_country":"IT","contract_supplier":"okkkkk","contract_granularity":"month","contract_delivery_start":"2020-03-16","contract_delivery_end":"2022-06-17","fixations_already":"true","fixations":[{"index":1,"date":"2020-04-01","months":1,"value":80},{"index":2,"date":"2020-05-01","months":1,"value":30}],"strategy_risk":"low","notifications_email":"","notifications_sms":true,"notifications_phone":"0300330"}}
View gist:809ceb8b042816d764fe108ad95a1f77
const moment = require('moment')
const GRANULARITY_MONTH = 'month'
const GRANULARITY_QUARTER = 'quarter'
const GRANULARITY_YEAR = 'year'
/**
* getContractYearTabs
*
* @param contractStart moment
View uuid.js
const replacer = c => {
const r = Math.random() * 16|0
const v = c === 'x' ? r : (r&0x3|0x8)
return v.toString(16)
}
export default uuid = () => 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(/[xy]/g, replacer)
View .eslintrc
{
"extends": ["airbnb", "prettier", "plugin:flowtype/recommended"],
"rules": {
"no-underscore-dangle": "off",
"no-param-reassign": "off",
"class-methods-use-this": "warn",
"import/no-unresolved": "off",
"import/no-extraneous-dependencies": 0,
"import/prefer-default-export": 0,
"react/jsx-filename-extension": [1, { "extensions": [".js", ".jsx"] }],
View gist:54061978031d39bcda18ffe40462e538
import React from "react";
import { ApolloProvider } from "@apollo/react-hooks";
import ApolloClient from "apollo-boost";
import { InMemoryCache, NormalizedCacheObject } from "apollo-cache-inmemory";
import { CachePersistor } from "apollo-cache-persist";
import localforage from "localforage";
import { BrowserRouter, Switch, Route } from "react-router-dom";
import { PersistentStorage, PersistedData } from "apollo-cache-persist/types";
import {
CssBaseline,
View UsersController.php
r->email = $request->email;
if(Auth::user()->role === 'super-admin'){
$user->user_type = $request->user_type;
} elseif(Auth::user()->user_type === 'hospital'){
$user->user_type = 'hospital';
$user->service_id = $request->service ?? null;
} elseif(Auth::user()->user_type === 'carrier'){
$user->user_type = 'carrier';
} elseif(Auth::user()->user_type === 'gesnord') {
View keybase.md

Keybase proof

I hereby claim:

  • I am brandonsueur on github.
  • I am brandonsueur (https://keybase.io/brandonsueur) on keybase.
  • I have a public key ASAe02DV9hBFmtgH78QHF0V_gxKBuj4cmAJk3hz8M_Ozjwo

To claim this, I am signing this object:

You can’t perform that action at this time.