// Option.ts
// definition
export class None {
readonly tag: 'None' = 'None'
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
Mute these words in your settings here: https://twitter.com/settings/muted_keywords | |
ActivityTweet | |
generic_activity_highlights | |
generic_activity_momentsbreaking | |
RankedOrganicTweet | |
suggest_activity | |
suggest_activity_feed | |
suggest_activity_highlights | |
suggest_activity_tweet |
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
// Lazy Getters | |
/* What enables Tail Recursion Modulo Cons in Javascript is a thunk in Weak Head Normal Form. | |
An expression in weak head normal form has been evaluated to the outermost data constructor, | |
but contains sub-expressions that may not have been fully evaluated. In Javascript only thunks | |
can prevent sub-expressions from being immediately evaluated. */ | |
const cons = (head, tail) => ({head, tail}); | |
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
☐ Put JWT in a cookie | |
☐ HTTPOnly cookie | |
☐ Secure cookie | |
☐ Domain w/ a subdomain (never root) | |
☐ No authorization in the JWT body (look it up serverside ya lazy asses) | |
☐ Userid in cookie should NOT exist anywhere but auth service | |
☐ Short window ( < 15 min) for JWT authentication token | |
☐ Ability to deauthorize a refresh token chain serverside (but long life on a refresh token is OK) | |
☐ Ability to monitor requests by refresh token chain |
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 Maybe from 'folktale/maybe'; | |
const Inc = 'Inc'; | |
const Dec = 'Dec'; | |
const IncBy = 'IncBy'; | |
const IncFn = state => state + 1; | |
const DecFn = state => state - 1; | |
const IncByFn = (state, action) => state + action.incBy; |
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, ActionCreator, Dispatch} from 'redux'; | |
import {ThunkAction} from 'redux-thunk'; | |
// Redux action | |
const reduxAction: ActionCreator<Action> = (text: string) => { | |
return { | |
type: SET_TEXT, | |
text | |
}; | |
}; |
These are instructions for setting up git to authenticate with GitHub when you have 2-factor authentication set up. This authentication should be inherited by any GUI client you are using. These are intentionally brief instructions, with links to more detail in the appropriate places.
-
Download and install the git command-line client (if required).
-
Open the git bash window and introduce yourself to git (if required):
git config --global user.name 'Firstname Lastname' git config --global user.email '[email protected]'
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 React, { Component, PropTypes } from 'react'; | |
import { setPropTypes, withState, lifecycle, mapProps, compose } from 'recompose'; | |
export const ImageComponent = compose( | |
setPropTypes({ src: PropTypes.string.isRequired }), | |
withState('imgState', 'updateImgState', ({ src }) => ({ origSrc: src, currentSrc: src })), | |
lifecycle({ | |
componentWillReceiveProps(nextProps) { | |
// if Image components src changes, make sure we update origSrc and currentSrc | |
if (nextProps.src !== nextProps.imgState.origSrc) { |
Operator Mono w/ Italics on OSX Vim
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
RDS_HOSTNAME=db | |
RDS_USERNAME=root | |
RDS_PASSWORD=some_pass | |
NODE_PATH=/app | |
MESSAGE_SERVICE_USERNAME=guest | |
MESSAGE_SERVICE_PASSWORD=guest | |
MESSAGE_SERVICE_PORT=5672 | |
MESSAGE_SERVICE_VHOST=/ | |
MESSAGE_SERVICE_HOST=rabbit |
NewerOlder