This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/sh | |
| # git prepare-commit-msg hook for automatically prepending an issue key | |
| # from the start of the current branch name to commit messages. | |
| # check if commit is merge commit or a commit ammend | |
| if [ $2 = "merge" ] || [ $2 = "commit" ]; then | |
| exit | |
| fi | |
| ISSUE_KEY=`git branch | grep -o "\* \(.*/\)*[A-Z]\{2,\}-[0-9]\+" | grep -o "[A-Z]\{2,\}-[0-9]\+"` |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import React from 'react'; | |
| import { useAddonState } from '@storybook/api'; | |
| import { ADDON_ID, INITIAL_STATE, MOSSIO_THEME } from './shared'; | |
| import { ThemeProvider } from 'emotion-theming'; | |
| const Branding = ({ story }) => { | |
| const [{ brandPrimary, brandSecondary }] = useAddonState(ADDON_ID, INITIAL_STATE); | |
| const branding = ancestorTheme => ({ | |
| ...ancestorTheme, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import React from 'react'; | |
| import { useAddonState } from '@storybook/api'; | |
| import { ADDON_ID, INITIAL_STATE, MOSSIO_THEME } from './shared'; | |
| import { ThemeProvider } from 'emotion-theming'; | |
| const withBranding = storyFn => { | |
| const [{ brandPrimary, brandSecondary }] = useAddonState(ADDON_ID, INITIAL_STATE); | |
| const branding = ancestorTheme => ({ | |
| ...ancestorTheme, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| {code} | |
| var now = new Date(); | |
| var days = new Array('Sunday','Monday','Tuesday','Wednesday','Thursday','Friday','Saturday'); | |
| var months = new Array('January','February','March','April','May','June','July','August','September','October','November','December'); | |
| var date = ((now.getDate()<10) ? "0" : "")+ now.getDate(); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| function fizzbuzz(number) { | |
| if( number%15 == 0 ) return "fizzbuzz"; | |
| if( number%3 == 0 ) return "fizz"; | |
| if( number%5 == 0 ) return "buzz"; | |
| return number; | |
| } | |
| for (let i = 0; i <= 100; i++) { | |
| return fizzbuzz(i); | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import { Module } from 'reductor'; | |
| import { | |
| InitSessionAction, | |
| InitSessionReducer, | |
| InitSessionPayloadCreator, | |
| } from './actions/InitSession'; | |
| import { | |
| UserLoginAction, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // Framework Imports | |
| import 'babel-polyfill'; | |
| import { Application } from 'reductor'; | |
| import React from 'react'; | |
| import { Route, IndexRedirect } from 'react-router'; | |
| // Constants for Developmen purposes | |
| const ENV = process.env.NODE_ENV || 'development'; | |
| const DevTools = window.devToolsExtension ? window.devToolsExtension() : f => f; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| const myActionCreator = (actionType, payloadCreator) => { | |
| return { | |
| type: actionType, | |
| payload: payloadCreator | |
| }; | |
| } | |
| const myPayloadCreator = (input) => { | |
| return API.makeApiCall(input); | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| export default () => next => action => { | |
| const callAPI = action[CALL_API]; | |
| if (typeof callAPI === 'undefined') { | |
| return next(action); | |
| } | |
| const { url, types } = callAPI; | |
| // const url = action.url; | |
| // const types = action.types; | |
| const [requestType, successType, failureType] = types; |
NewerOlder