Skip to content

Instantly share code, notes, and snippets.

View webcaetano's full-sized avatar
🦄
Working from home

Andre Caetano webcaetano

🦄
Working from home
View GitHub Profile
@webcaetano
webcaetano / file.md
Created June 14, 2017 21:55
Fix gulp-cli

Run

sudo rm /usr/local/bin/gulp
sudo rm -rf /usr/local/lib/node_modules/gulp
npm uninstall gulp -g
npm uninstall gulp-cli -g
npm cache clean
npm install gulp-cli -g
@webcaetano
webcaetano / file.md
Created June 14, 2017 21:56
Split commit in multiple

git rebase -i will do it.

To split apart your most recent commit, first:

$ git reset HEAD~ Now commit the pieces individually in the usual way, producing as many commits as you need.

If it was farther back in the tree, then

$ git rebase -i HEAD~3

@webcaetano
webcaetano / SomeCoin.sol
Created August 6, 2018 14:12
Created using remix-ide: Realtime Ethereum Contract Compiler and Runtime. Load this file by pasting this gists URL or ID at https://remix.ethereum.org/#version=soljson-v0.4.24+commit.e67f0147.js&optimize=false&gist=
pragma solidity ^0.4.22;
contract SafeMath {
function SafeMath() {
}
function safeAdd(uint256 _x, uint256 _y) internal returns (uint256) {
uint256 z = _x + _y;
assert(z >= _x);
return z;
@webcaetano
webcaetano / Utils.sol
Created August 6, 2018 14:15
Created using remix-ide: Realtime Ethereum Contract Compiler and Runtime. Load this file by pasting this gists URL or ID at https://remix.ethereum.org/#version=soljson-v0.4.24+commit.e67f0147.js&optimize=false&gist=
pragma solidity ^0.4.22;
contract Utils {
function Utils() public {
}
// function compareStrings (string a, string b) view returns (bool){
// return keccak256(a) == keccak256(b);
// }
@webcaetano
webcaetano / SomeCoin.sol
Created August 6, 2018 19:30
Created using remix-ide: Realtime Ethereum Contract Compiler and Runtime. Load this file by pasting this gists URL or ID at https://remix.ethereum.org/#version=soljson-v0.4.24+commit.e67f0147.js&optimize=false&gist=
pragma solidity ^0.4.22;
contract Utils {
function Utils() public {
}
// function compareStrings (string a, string b) view returns (bool){
// return keccak256(a) == keccak256(b);
// }