Skip to content

Instantly share code, notes, and snippets.

🦄
Working from home

Andre Caetano webcaetano

View GitHub Profile
@webcaetano
webcaetano / SomeCoin.sol
Created Aug 6, 2018
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=
View SomeCoin.sol
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 / Utils.sol
Created Aug 6, 2018
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=
View Utils.sol
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 Aug 6, 2018
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=
View SomeCoin.sol
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 / file.md
Created Jun 14, 2017
Split commit in multiple
View file.md

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

View file.md

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 / markdown.md
Created Apr 20, 2017
Mac timelapse screencapture
View markdown.md

while [ 1 ];do vardate=$(date +%d-%m-%Y_%H.%M.%S); screencapture -t jpg -x ~/Desktop/screencapture/$vardate.jpg; sleep 5; done

View Default (OSX).sublime-keymap
[
{ "keys": ["super+shift+q"], "command": "run_macro_file", "args": {"file": "res://Packages/Default/Delete Line.sublime-macro"} },
{ "keys": ["super+up"], "command": "toggle_word"},
{ "keys": ["super+down"], "command": "toggle_word"},
{ "keys": ["super+shift+1"], "command": "open_terminal_project_folder" },
{
"keys": ["super+shif+e"],
"command": "chain",
"args": {
"commands": [
View Default (OSX).sublime-keymap
[
{ "keys": ["super+shift+q"], "command": "run_macro_file", "args": {"file": "res://Packages/Default/Delete Line.sublime-macro"} },
{ "keys": ["super+up"], "command": "toggle_word"},
{ "keys": ["super+down"], "command": "toggle_word"},
{ "keys": ["super+shift+1"], "command": "open_terminal" },
{
"keys": ["super+f"],
"command": "chain",
"args": {
"commands": [
You can’t perform that action at this time.