Skip to content

Instantly share code, notes, and snippets.

View aaronmcadam's full-sized avatar
🎉
Having fun!

Aaron McAdam aaronmcadam

🎉
Having fun!
View GitHub Profile
const requestAddMessage = (sources) => {
const message$ = sources.ACTION
.filter((action) => action.type === 'ADD_MESSAGE')
.map((action) => action.payload);
const request$ = message$.map((payload) => {
return {
url: `/api/conversations/${payload.conversationId}/messages`,
category: 'addMessage',
method: 'POST',
module Kokoro
class ErrorsController < ApplicationController
skip_before_action :guards_for_user
def not_found
Rails.logger.info(not_found_message)
path = env["ORIGINAL_FULLPATH"]
render(
template: "kokoro/errors/not_found",
// <Button disabled>Button</Button>
import styled from 'styled-components';
import { ifProp } from 'styled-tools';
import { baseTheme, getFont } from '../../../themes/src';
import {
getBackgroundColour,
getDarkerColour,
getFloated,
getTextColour,
// Use this like <Icon name="bell" />
/* eslint import/no-dynamic-require: "off" */
import React from 'react';
import PropTypes from 'prop-types';
import styled, { css } from 'styled-components';
import { ifProp } from 'styled-tools';
import { sizes } from '../constants/';
import colours from '../colours';
import React from 'react';
import PropTypes from 'prop-types';
import styled from 'styled-components';
import { baseTheme } from '../../../themes/src';
import { sizes, userRoles } from '../constants';
import Image from '../Image';
import Icon from '../Icon';
const getSize = ({ size }) => sizes.values[size];
// Wrapper pattern
const Wrapper = styled(Image)`
border-radius: 50%;
border: 2px solid ${colours.fuchsiaBlue};
box-sizing: border-box;
height: ${avatarSize}rem;
width: ${avatarSize}rem;
`;
const Avatar = ({ src }) => (
import React from 'react';
import styled, { css } from 'styled-components';
import { baseTheme, getFont } from '../../../themes/src/index';
import { getFontSize } from './helpers';
const styles = css`
font-family: ${getFont('bold')};
font-weight: 500;
font-size: ${getFontSize};
margin: 0;
import { div, h2, p } from '@cycle/dom';
import xs from 'xstream';
export function App(sources) {
const request$ = xs.of({
url: 'http://localhost:3000/ping',
category: 'api',
// progress: true,
});
export function App (sources) {
const request$ = xs.periodic(3000)
.mapTo({
url: 'http://localhost:3000',
category: 'api',
});
const vtree$ = sources.HTTP.select('api')
.flatten()
.map(res => res.body)
@aaronmcadam
aaronmcadam / vscodevim-settings.json
Created May 3, 2017 16:55
Example of mapping vim commands in vscode
"vim.leader": "<space>",
"vim.otherModesKeyBindingsNonRecursive": [
{
"before": [
"<leader>",
"g",
"w"
],
"commands": [
{