Skip to content

Instantly share code, notes, and snippets.

View tb's full-sized avatar
🚀
Building High-Performing Software Engineering Teams

Tomasz Bak tb

🚀
Building High-Performing Software Engineering Teams
View GitHub Profile
@tb
tb / test.js
Created October 11, 2017 21:53 — forked from jbaxleyiii/test.js
react-apollo testing
import { Component } from "react";
import { print } from "graphql-tag/printer";
import { graphql } from "react-apollo";
import { MockedProvider } from "react-apollo/test-utils";
import { addTypenameToDocument } from "apollo-client/queries/queryTransform";
import { mount } from "enzyme";
import { withSavedPayments, SAVED_ACCTS_QUERY } from "../";
@tb
tb / formikApollo.js
Created August 1, 2017 14:43 — forked from mwickett/formikApollo.js
Formik + Apollo
import React from 'react'
import { withRouter, Link } from 'react-router-dom'
import { graphql, compose } from 'react-apollo'
import { Formik } from 'formik'
import Yup from 'yup'
import FormWideError from '../elements/form/FormWideError'
import TextInput from '../elements/form/TextInput'
import Button from '../elements/form/Button'
import { H2 } from '../elements/text/Headings'

Make it real

Ideas are cheap. Make a prototype, sketch a CLI session, draw a wireframe. Discuss around concrete examples, not hand-waving abstractions. Don't say you did something, provide a URL that proves it.

Ship it

Nothing is real until it's being used by a real user. This doesn't mean you make a prototype in the morning and blog about it in the evening. It means you find one person you believe your product will help and try to get them to use it.

Do it with style

@tb
tb / SCSS.md
Created November 11, 2016 08:51 — forked from jareware/SCSS.md
Advanced SCSS, or, 16 cool things you may not have known your stylesheets could do

⇐ back to the gist-blog at jrw.fi

Advanced SCSS

Or, 16 cool things you may not have known your stylesheets could do. I'd rather have kept it to a nice round number like 10, but they just kept coming. Sorry.

I've been using SCSS/SASS for most of my styling work since 2009, and I'm a huge fan of Compass (by the great @chriseppstein). It really helped many of us through the darkest cross-browser crap. Even though browsers are increasingly playing nice with CSS, another problem has become very topical: managing the complexity in stylesheets as our in-browser apps get larger and larger. SCSS is an indispensable tool for dealing with this.

This isn't an introduction to the language by a long shot; many things probably won't make sense unless you have some SCSS under your belt already. That said, if you're not yet comfy with the basics, check out the aweso

@tb
tb / _form_validation.scss
Created August 24, 2016 12:55 — forked from isidroamv/_form_validation.scss
SASS input validation for materializecss & Angular2
// Text inputs
input:not([type]),
input[type=text],
input[type=password],
input[type=email],
input[type=url],
input[type=time],
input[type=date],
input[type=datetime-local],
input[type=tel],
@tb
tb / MultiSelect.jsx
Created July 4, 2016 14:52 — forked from kkoch986/MultiSelect.jsx
A MultiSelect prototype for Material UI (v.0.14.4)
/**
* Material UI multi select
*
* Use with:
* <MultiSelect fullWidth={true} value={this.state.values} onChange={(e,v) => this.setState({values: v})}>
* <ListItem primaryText={"Option 1"} value={1} />
* <ListItem primaryText={"Option 2"} value={2} />
* <ListItem primaryText={"Option 3"} value={3} />
* <ListItem primaryText={"Option 4"} value={4} />
* </MultiSelect>
@tb
tb / ALTERNATIVES.adoc
Created January 15, 2016 09:48 — forked from mbbx6spp/ALTERNATIVES.adoc
Super quick list of alternatives to Jira and/or Confluence, Stash, Crucible, etc.
@tb
tb / errorize.js
Last active November 28, 2015 17:44 — forked from ryrych/errorize.js
After refactoring #2 - modified
import Ember from 'ember';
var errorize = Ember.Object.extend({
init() {
this._super();
this.set('errorsList', {});
},
// test should check various inputs and verify addToErrorsList is called with proper arguments
processError(error) {
@tb
tb / errorize-test.js
Last active November 27, 2015 13:41 — forked from ryrych/errorize-test.js
After refactoring
```javascript
import errorize from '../../../utils/errorize';
import { module, test } from 'qunit';
module('Unit | Utility | errorize');
test('errorize', function(assert) {
var errors = {
responseJSON: {
errors:[
@tb
tb / gist:220b40d1e03c3dcaa237
Created October 28, 2015 15:29 — forked from trodrigues/gist:7414091
Angular.js directive test example with service mocking
describe('Directive test', function () {
var container, scope;
var aStub;
beforeEach(function () {
aStub = sinon.stub();
module('testmodule', function ($provide) {
$provide.value('someService', aStub);
});