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

First things first

  • $ git clone https://github.com/hyperledger/sawtooth-seth
  • $ cd sawtooth-seth

To get official latest docs

  • Build with $ docker build . -f docs/Dockerfile -t seth-build-docs
  • Run with $ docker run -v $(pwd)/docs:/project/sawtooth-seth/docs seth-build-docs
You can ssh into the VM by finding the IP (from kubectl config view) and using username "docker" password "tcuser":
ssh docker@192.168.XX.XX
@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
refs: {
[string: string]: any;
textarea: any; // this should be the same as the html tag
selectedTabTitle: any;
}
<textarea > </textarea>
// 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>
class ClassBase extends React.Component<any, any>{
componentWillMount = function (): any {
const {topicList, dispatch} = this.props;
dispatch(fetchTopics());
};
render() {
return (
<div></div>
);
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);
}
@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;
@c9s
c9s / .babelrc
Last active October 21, 2023 14:04
webpack + babel + typescript + es6 - total solutions!
{
"presets": ["es2015"],
"plugins": ["transform-runtime"]
}