Skip to content

Instantly share code, notes, and snippets.

View flushentitypacket's full-sized avatar

Ronald Hong flushentitypacket

View GitHub Profile
@flushentitypacket
flushentitypacket / addTodo.ts
Created January 20, 2018 19:38
Typescript Redux todo combination feature
// store/todo/addTodo.ts
import {Reducer} from 'redux'
import {Action} from 'store/redux' // our fancy new generic type!
interface Todo {
id: number
text: string
completed: boolean
}
@flushentitypacket
flushentitypacket / addTodo.ts
Created January 20, 2018 19:36
Typescript Redux todo feature
// store/todo/addTodo.ts
import {Reducer} from 'redux'
import {Action} from 'store/redux' // our fancy new generic type!
interface Todo {
id: number
text: string
}
@flushentitypacket
flushentitypacket / redux.d.ts
Created January 20, 2018 19:33
Typescript Redux generic Action
// store/redux.d.ts
import {Action as ReduxAction} from 'redux'
export interface Action<
T extends string,
P = undefined
> extends ReduxAction {
type: T
payload: P
@flushentitypacket
flushentitypacket / ron.zsh-theme
Last active November 17, 2016 16:27
ron's oh-my-zsh theme
local ret_status="%(?:%{$fg_bold[green]%}$ :%{$fg_bold[red]%}$ %s)"
PROMPT='%{$fg[cyan]%}%c %{$fg_bold[blue]%}$(git_prompt_info) ${ret_status}%{$fg_bold[blue]%}% %{$reset_color%}'
ZSH_THEME_GIT_PROMPT_PREFIX="%{$fg[red]%}"
ZSH_THEME_GIT_PROMPT_SUFFIX="%{$reset_color%}"
ZSH_THEME_GIT_PROMPT_DIRTY="%{$fg[blue]%}%{$fg[yellow]%}*%{$reset_color%}"
ZSH_THEME_GIT_PROMPT_CLEAN="%{$fg[blue]%}"