This file contains 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
class ImmutableClass { | |
constructor() { | |
// return value from class constructor | |
return createInstance() | |
} | |
} | |
let instance = null; | |
function createInstance() { |
This file contains 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 { PureComponent, Component } from 'react' | |
import SVGInline from 'react-svg-inline' | |
import PropTypes from 'prop-types' | |
import styled from 'styled-components' | |
import AppIcons from '../../../static/icons/app-icons.json' | |
const IconSVGContainer = styled.span` | |
display: inline-flex; | |
` | |
const IconSVG = styled(SVGInline)` |
This file contains 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 monitoredScope(fn: Function, ...args: any[]) { | |
const startTime = performance.now(); | |
const result = fn.call(this, ...args); | |
const endTime = performance.now(); | |
const elapsedTime = Math.round((endTime - startTime) * 1000) / 1000; | |
return { data: result, infos: { startTime, endTime, elapsedTime } }; | |
} |
This file contains 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 glob = require('glob'); | |
const util = require('util'); | |
const fs = require('fs'); | |
const path = require('path'); | |
// icons.js | |
const icons= [ | |
'account', | |
'plus' | |
]; |
This file contains 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
# If you come from bash you might have to change your $PATH. | |
# export PATH=$HOME/bin:/usr/local/bin:$PATH | |
# Path to your oh-my-zsh installation. | |
export ZSH="/Users/yrenaudin/.oh-my-zsh" | |
# Set name of the theme to load --- if set to "random", it will | |
# load a random theme each time oh-my-zsh is loaded, in which case, | |
# to know which specific one was loaded, run: echo $RANDOM_THEME | |
# See https://github.com/robbyrussell/oh-my-zsh/wiki/Themes |
This file contains 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
// Future versions of Hyper may add additional config options, | |
// which will not automatically be merged into this file. | |
// See https://hyper.is#cfg for all currently supported options. | |
module.exports = { | |
config: { | |
// choose either `'stable'` for receiving highly polished, | |
// or `'canary'` for less polished but more frequent updates | |
updateChannel: 'canary', |
This file contains 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 Router from 'next/router'; | |
import { format, resolve, parse } from 'url'; | |
import Link from 'next/link'; | |
import PropTypes, { exact } from 'prop-types'; | |
import { execOnce, warn } from 'next/dist/lib/utils'; | |
import { Component } from 'react'; | |
export const prefetch = async href => { | |
// if we're running server side do nothing | |
if (typeof window === 'undefined') return; |
This file contains 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 { Action } from 'redux'; | |
import { ThunkAction } from 'redux-thunk'; | |
import { AppState } from '../reducers'; | |
export type AppAction<A = Action, P = any> = A & { payload: P }; | |
export function makeActionCreator<P, T extends string = string>(type: T) { | |
function actionCreator(payload?: P): AppAction<Action<typeof type>, P> { | |
return { | |
type, |
This file contains 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 { makeActionCreator } from '../actions/actionCreators'; | |
import { Call } from '@jive/realtime-events'; | |
export enum ActionsType { | |
START_INCOMING_CALL = 'callEvents/startIncomingCall', | |
START_INCOMING_CONVERSATION = 'callEvents/startIncomingConversation', | |
} | |
type ActionPayload = { call: Call } |
This file contains 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 { CallEventsActions } from './callEvents.action'; | |
export interface CallState { | |
latestCall: string | null; | |
byId: { [id: string]: Call }; | |
allIds: string[]; | |
} | |
export const CALLS_INITIAL_STATE = { | |
latestCall: null, |