Skip to content

Instantly share code, notes, and snippets.

View hackingbeauty's full-sized avatar
🎯
Focusing

Mark Joseph (Muskardin) hackingbeauty

🎯
Focusing
View GitHub Profile
pragma solidity ^0.6.10;
import './DAOWallet.sol';
contract ReentrancyAttack {
DAOWallet public daoWallet;
constructor(address _daoWalletAddress) public {
daoWallet = DAOWallet(_daoWalletAddress);
}
@hackingbeauty
hackingbeauty / gist:8b673e4e0d0df30c079d7794a45ed7d5
Created September 14, 2020 21:16
DAOWallet.sol (SmartContractSecurity.com)
pragma solidity ^0.6.10;
contract DAOWallet {
mapping(address => uint) public balances;
bool internal locked;
function deposit() public payable {
balances[msg.sender] += msg.value;
}

Keybase proof

I hereby claim:

  • I am hackingbeauty on github.
  • I am markmuskardin (https://keybase.io/markmuskardin) on keybase.
  • I have a public key ASDfxFH28621ppjKGpS9To4RuKxc_E4w4wXgjQXN0FADjgo

To claim this, I am signing this object:

{
"rules": {
"users": {
".write": "auth != null",
"$user_id" : {
".read": true,
".write": "$user_id === auth.uid"
}
},
"publicRecordings": {
...
export default withStyles(widthBreakpoints)(
withRouter(connect(mapStateToProps, mapDispatchToProps)(PublishedRecordingView))
)
...
@hackingbeauty
hackingbeauty / ModalBody.js
Created May 20, 2018 19:31
ModalBody component for a large-scale React application as taught in the course "How To Write A Single Page Application" - www.singlepageapplication.com
import React, { Component } from 'react'
import PropTypes from 'prop-types'
import { styles } from './styles.scss'
import { Modal as ReactBootstrapModal } from 'react-bootstrap'
class ModalBody extends Component {
constructor(props) {
super(props)
}
@hackingbeauty
hackingbeauty / ModalFooter.js
Created May 20, 2018 19:18
ModalFooter component for a large-scale React application as taught in the course "How To Write A Single Page Application" - www.singlepageapplication.com
import React, { Component } from 'react'
import PropTypes from 'prop-types'
import { modalFooterStyles } from './styles.scss'
import { Modal as ReactBootstrapModal } from 'react-bootstrap'
class ModalFooter extends Component {
constructor(props) {
super(props)
}
@hackingbeauty
hackingbeauty / ModalHeader.js
Last active May 20, 2018 05:39
ModalHeader component for a large-scale React application as taught in the course "How To Write A Single Page Application" - www.singlepageapplication.com
import React, { Component } from 'react'
import PropTypes from 'prop-types'
import { modalHeaderStyles } from './styles.scss'
import { Modal as ReactBootstrapModal } from 'react-bootstrap'
class ModalHeader extends Component {
constructor(props) {
super(props)
}
@hackingbeauty
hackingbeauty / Modal.js
Last active March 22, 2022 10:53
Main parent Modal component for large-scale React application as taught in the course "How To Write A Single Page Application" - www.singlepageapplication.com
import React, { Component } from 'react'
import PropTypes from 'prop-types'
import { modalStyles } from './styles.scss'
import { Modal as ReactBootstrapModal } from 'react-bootstrap'
class Modal extends Component {
constructor(props) {
super(props)
this.state = {
show: false
/* In src/core/utils create a file called routing.js and add this code (I'm assuming you're using hash-based URLs) */
import { createHashHistory } from 'history'
export default createHashHistory()
/* Then, in your Action Creators, import this file and you can use React-Router to navigate programatically */
import history from 'core/utils/routing'