Skip to content

Instantly share code, notes, and snippets.

View devonwesley's full-sized avatar
Probably at coffee shop in Oakland, CA.

Devon Wesley devonwesley

Probably at coffee shop in Oakland, CA.
  • Oakland, CA
View GitHub Profile
@devonwesley
devonwesley / process.js
Created March 8, 2017 23:51
Run 'node process.js' in the same folder/directory that the file lives.
process.on('exit', code => {
console.log(`About to exit with code: ${code}`)
})
process.on('uncaughtException', err => {
console.error(err)
// comment line 9 out, then run the command in the
// description. Then comment it back in. and run that same command from
// the description again.
@devonwesley
devonwesley / Artifact-Story-1589-Jusdev89-mellow-albatross
Created April 19, 2017 06:24
Implement tabs that display "All Projects" and "Projects that need Review".
https://app.clubhouse.io/learnersguild/story/1589/as-a-reviewer-i-can-see-which-projects-need-reviewing
@devonwesley
devonwesley / Cycle42Devon.md
Created May 2, 2017 00:10
Artifact for the week

This Cycle, I commit to:

  • logging 20 hours on Literator app.
  • Help assist Ethan with the Job hunt.
  • Have at least someone look at my Resume (Ethan)
  • Look into education companies.
@devonwesley
devonwesley / Artifact.md
Last active May 13, 2017 02:10
Artifact for the week of May 7 - 12.
  • I applied to 15 job
  • Interview for 4
  • Completed work for Literator Start up
Interviewed with 6 jobs.
Completed a take home for a job.
Worked on Literator.
@devonwesley
devonwesley / Artifact.md
Created May 30, 2017 18:42
Artifact for the week of 46
  • Write a todolist with Python.
  • 3 hours of coaching, Split into 3, 1 hour sessions.
  • Brownbag.
@devonwesley
devonwesley / gist:5ebc063fa95135d195af5e6ff2a4f047
Created August 13, 2017 07:22
jusdev89_ethereum_address_wallet
0x1418191f236A1ADdAC71848f09461593415084d9
@devonwesley
devonwesley / Victim.sol
Created October 8, 2017 21:02
A Ethereum contract with the "Reentrancy" vulnerability (DO NOT DEPLOY, for demonstration only).
pragma solidity ^0.4.8;
contract Victim {
function withdraw() {
uint transferAmt = 1 ether;
if (!msg.sender.call.value(transferAmt)()) throw;
}
function deposit() payable {}
@devonwesley
devonwesley / Attacker.sol
Created October 8, 2017 21:14
This is an "Attacker"s smart contract that drains the balance of a "Victim"s contract that it calls recursively.
pragma solidity ^0.4.8;
import './Victim.sol';
contract Attacker {
Victim v;
uint public count;
event LogFallback(uint c, uint balance);
@devonwesley
devonwesley / 2_deploy_contracts.js
Created October 9, 2017 01:05
This is the flow of how we're going to deploy our contracts for our reentrancy attack demonstration.
const Victim = artifacts.require('./Victim.sol')
const Attacker = artifacts.require('./Attacker.sol')
module.exports = function(deployer) {
deployer
.deploy(Victim)
.then(() =>
deployer.deploy(Attacker, Victim.address)
)
}