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
package main | |
import ( | |
"fmt" | |
"time" | |
) |
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 from "react"; | |
import { connect } from "react-redux"; | |
const Sports = props => { | |
return <div>Sports</div>; | |
}; | |
const mapStateToProps = ({ volleyball, soccer }) => ({ | |
volleyball, | |
soccer |
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
// wrap-transform.js | |
const fs = require('fs'); | |
const parser = require('@babel/parser').parse; | |
const traverse = require('@babel/traverse').default; | |
const generate = require('@babel/generator').default; | |
const prettier = require('prettier'); | |
const file = fs.readFileSync('wrap-before.js').toString(); | |
const ast = parser(file, {sourceType: 'module', plugins: ['jsx']}); | |
let exportDefaultPath; |
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
// wrap-before.js | |
import React from "react"; | |
import { connect } from "react-redux"; | |
const Sports = (props) => { | |
return <div>Sports</div>; | |
}; | |
export default Sports; |
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
// transformed.js | |
import dogs from "./dogs"; | |
import cats from "./cats"; | |
import mice from "./mice"; | |
export default { | |
dogs, | |
cats, | |
mice | |
}; |
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
// transform.js | |
const fs = require('fs'); | |
const parser = require('@babel/parser').parse; | |
const traverse = require('@babel/traverse').default; | |
const generate = require('@babel/generator').default; | |
const t = require("@babel/types"); | |
const prettier = require('prettier'); | |
const fileLocation = './reducers.js'; | |
const file = fs.readFileSync(fileLocation).toString(); |
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
// reducers.js | |
import dogs from "./dogs"; | |
import cats from "./cats"; | |
export default { | |
dogs, | |
cats | |
}; |
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
function add(){ | |
//blah | |
} |
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
### Get geth up and running | |
geth --datadir ./mychaindata --nodiscover | |
### Attach | |
geth attach ./mychaindata/geth.ipc | |
### See accounts | |
`eth.accounts` |
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
- State machines |