Skip to content

Instantly share code, notes, and snippets.

View RealDeanZhao's full-sized avatar
🤒
Out sick

Dean Zhao RealDeanZhao

🤒
Out sick
View GitHub Profile
@tsabat
tsabat / zsh.md
Last active October 16, 2024 14:43
Getting oh-my-zsh to work in Ubuntu
@c9s
c9s / .babelrc
Last active October 21, 2023 14:04
webpack + babel + typescript + es6 - total solutions!
{
"presets": ["es2015"],
"plugins": ["transform-runtime"]
}
@rluiten
rluiten / redux-form.d.ts
Last active August 5, 2016 14:59
Basic typescript definition for redux-form v6. This is new and I am new to creating type definitions and I am only just getting into redux-form so it may well have errors, and be less strict than it can be. Updated 2016-07-08 again.
/**
* Type definitions for Redux-form v6.
* Updated for 6.0.0-rc.3 including splitting of Field properties to 'input'.
*/
import {Component, ComponentClass, StatelessComponent, ReactElement, ReactEventHandler, SyntheticEvent} from 'react';
import {Dispatch, Reducer, Action} from 'redux';
declare namespace ReduxForm {
export type FieldValue = any;
router.get('/api/v1/auth/github/callback',
return passport.authenticate('github', {sucessRedirect: '/'});
);
==>
router.get('/api/v1/auth/github/callback',
async (ctx: any, next: any) => {
return passport.authenticate('github', (user: any, info: any, status: any) => {
ctx.redirect('/');
})(ctx, next);
}
class ClassBase extends React.Component<any, any>{
componentWillMount = function (): any {
const {topicList, dispatch} = this.props;
dispatch(fetchTopics());
};
render() {
return (
<div></div>
);
// a Form
class FormBase extends React.Component<any, {}>{
render() {
return (
<form onSubmit={this.props.handleSubmit}>
<div>
<label>Username</label>
<Field component='input' className="form-control" type="text" placeholder="First Name" name='username'/>
</div>
</form>
refs: {
[string: string]: any;
textarea: any; // this should be the same as the html tag
selectedTabTitle: any;
}
<textarea > </textarea>
@RealDeanZhao
RealDeanZhao / redux form unfocus when input the first charactor
Last active August 23, 2016 05:45
redux form unfocus when input the first charactor
// https://github.com/erikras/redux-form/releases/tag/v6.0.0-alpha.14
Let's look at what that means:
WRONG: :cry: :-1:
class MyForm extends Component {
render() {
const { handleSubmit } = this.props
You can ssh into the VM by finding the IP (from kubectl config view) and using username "docker" password "tcuser":
ssh [email protected]