Skip to content

Instantly share code, notes, and snippets.

@CarsonF
CarsonF / example.tsx
Last active November 2, 2017 05:44
Redux Form V6 typescript definition
// This doesn't have everything but it gives an idea of how the interfaces and decorator should be used.
interface LoginFormData {
username?: string;
password?: string;
}
interface LoginFormProps extends FormProps<LoginFormData, AppState> {
dispatch?: Dispatch<AppState>,
}
@CarsonF
CarsonF / .bash_profile
Created August 24, 2016 20:14
Symfony Console Bash Completion
#!/usr/bin/env bash
function _symfony_complete {
local CMDLINE_CONTENTS="$COMP_LINE"
local CMDLINE_CURSOR_INDEX="$COMP_POINT"
local CMDLINE_WORDBREAKS="$COMP_WORDBREAKS";
export CMDLINE_CONTENTS CMDLINE_CURSOR_INDEX CMDLINE_WORDBREAKS
local RESULT STATUS;
@CarsonF
CarsonF / ForcedSelectionAutoComplete.jsx
Last active December 20, 2016 05:50
Material UI AutoComplete Forced Selection
import React from 'react';
import ReactDOM from 'react-dom';
import { FormattedMessage } from 'react-intl';
import { AutoComplete as MuiAutoComplete } from 'material-ui';
class AutoComplete extends MuiAutoComplete {
/**
* Added callback param
*/
close(cb?: () => any) {