Skip to content

Instantly share code, notes, and snippets.

View bitoiu's full-sized avatar

Vitor Monteiro bitoiu

View GitHub Profile
@bitoiu
bitoiu / MyToken.sol
Created January 25, 2018 15:47 — forked from anonymous/MyToken.sol
Created using browser-solidity: Realtime Ethereum Contract Compiler and Runtime. Load this file by pasting this gists URL or ID at https://ethereum.github.io/browser-solidity/#version=soljson-v0.4.19+commit.c4cbbb05.js&optimize=false&gist=
//contract FixedSupplyToken is ERC20Interface, Owned {
//https://ethernaut.zeppelin.solutions/
contract MyToken {
uint totalTokens;
uint tokenCost;
mapping(address => uint) reserve;
mapping(address => uint) balances;
mapping(address => Account) accounts;
@bitoiu
bitoiu / Wallet.sol
Created January 25, 2018 14:41 — forked from anonymous/Wallet.sol
Created using browser-solidity: Realtime Ethereum Contract Compiler and Runtime. Load this file by pasting this gists URL or ID at https://ethereum.github.io/browser-solidity/#version=soljson-v0.4.19+commit.c4cbbb05.js&optimize=false&gist=
contract Wallet {
address owner;
address approver;
unit amountToWithdrawal;
function Wallet(address app) {
owner = msg.sender;
approver = app;
}
@bitoiu
bitoiu / electron-prerequisites.md
Created September 7, 2017 12:23 — forked from hollenberry/electron-prerequisites.md
Electron Workshop Prerequisites

Prerequisites

  • Install Git
  • Get familiar with Git commands
  • Install a text editor
  • Install Node.js

Install Git

macOS

@bitoiu
bitoiu / GithubPullRequestDeficiencies.md
Created October 23, 2015 15:55 — forked from skingsland/GithubPullRequestDeficiencies.md
Reasons why Crucible/Fisheye is better than Github (Enterprise) Pull Requests for reviewing code

GENERAL:

  • You can't include commits from different repos in a single code review using github pull requests, whereas you can with Crucible code reviews.
  • It's risky to use a pull request for code that isn't ready to be merged yet. What if someone doesn't see the "DON'T MERGE" comment/title, and clicks the big green merge button?

VIEWING:

  • You can't adjust the line width in which files are displayed, even if you make your browser window wider than the page. Some XML/HTML content extends well past 80 characters.
    • There are numerous Chrome extensions which purport to provide this feature, but I haven't been able to get any of them to work for gh:e.
  • You can't choose to ignore white space, so if a change involved indenting a lot of lines, you'll have a hard time figuring out what changed. In Crucible, you can choose to ignore white space.
  • You can't see the full file name, if the file name and path are longer than ~70 characters, and the HTML element that contains the file name is absolutely sized so y
@bitoiu
bitoiu / background.html
Last active October 28, 2015 16:15 — forked from srsudar/background.html
Pasting from the system clipboard using a Chrome extension.
<!DOCTYPE html>
<html>
<head>
<script src="background.js"></script>
</head>
<body>
<textarea id="sandbox"></textarea>
</body>