Skip to content

Instantly share code, notes, and snippets.

View pekkis's full-sized avatar

Mikko Forsström pekkis

View GitHub Profile
@pekkis
pekkis / lus.js
Last active March 13, 2018 12:56
import schema from "./schema";
import { graphqlExpress, graphiqlExpress } from "apollo-server-express";
app.use(
"/graphql",
graphqlExpress(req => {
return {
schema
};
})
import React from "react";
import personService from "../services/person";
import { Form, Field } from "react-final-form";
import { DateTime } from "luxon";
const required = value => (value ? undefined : "Required");
const mustBeDate = value => {
const dt = DateTime.fromISO(value);
return dt.invalid && "Must be a date";
};
module.exports = {
plugins: {
precss: {},
autoprefixer: {
browsers: ['last 2 versions'],
},
},
};
import React from 'react';
import { Router } from 'react-router-dom';
import createBrowserHistory from 'history/createBrowserHistory';
const LOCATION_CHANGE = '@@router/LOCATION_CHANGE';
export const history = createBrowserHistory();
class ReduxRouter extends React.Component {
static propTypes = {
import React from 'react';
import { storiesOf, action } from '@kadira/storybook';
import Button from './Button';
storiesOf('Button', module)
.add('Primary button', () => (
<Button
role="primary"
onClick={action('clixuti')}
>
@pekkis
pekkis / tussi.js
Created November 11, 2016 08:31
TUSSI
import personService from 'services/person';
import uuid from 'node-uuid';
const defaultState = {
persons: [],
};
export function getPersons() {
return {
type: 'PERSON_GET_PERSONS',
import React from 'react';
import cx from 'classnames';
import { icons } from '../services/assets';
import styles from './Icon.pcss';
const Icon = props => {
const { name, size, flip, className } = props;
const classes = cx(
styles.icon,
styles.className,
/**
* @ORM\Id
* @ORM\Column(type="integer")
* @ORM\generatedValue(strategy="AUTO")
*/
@pekkis
pekkis / koulutus.txt
Last active September 13, 2016 10:19
Kalenterisofta autokorjaamolle
-------------------------------
- Varaus
- Tekijä
- Auto
https://github.com/breerly/factory-girl-php
import { default as React, PropTypes } from 'react';
class Measurement extends React.Component {
static propTypes = {
value: PropTypes.number.isRequired,
unit: PropTypes.string.isRequired
};
render() {