Skip to content

Instantly share code, notes, and snippets.

💻
Man At Work 🚜

Eduardo Pereira eduardonunesp

💻
Man At Work 🚜
Block or report user

Report or block eduardonunesp

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@eduardonunesp
eduardonunesp / player.cs
Created Nov 28, 2018
Unity Move Towards Angle
View player.cs
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class Player : MonoBehaviour
{
public float rotateSpeed = 30f;
public float moveSpeed = 200f;
private Rigidbody2D rb;
@eduardonunesp
eduardonunesp / sign-offline.js
Created Oct 15, 2018 — forked from neuhaus/sign-offline.js
Ethereum: Sign an offline transaction
View sign-offline.js
#!/usr/bin/env node
'use strict';
// ethereum: generate signed transactions
const fs = require('fs-extra');
const rls = require('readline-sync');
const Accounts = require('web3-eth-accounts');
const web3utils = require('web3-utils');
const accounts = new Accounts();
@eduardonunesp
eduardonunesp / loom-umd-test.html
Last active Aug 2, 2018
Using `loom-umd` on browser, this code works with `truffle-dappchain-example`
View loom-umd-test.html
<!DOCTYPE html>
<html>
<head>
<link rel="stylesheet" href="style.css">
<script language="javascript" type="text/javascript" src="https://cdn.rawgit.com/ethereum/web3.js/1.0/dist/web3.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/loom-js@1.15.0/dist/loom.umd.js"></script>
</head>
@eduardonunesp
eduardonunesp / fibonacci_merkle.js
Last active Sep 1, 2018
Fibonacci List + Merkle Tree
View fibonacci_merkle.js
const crypto = require('crypto');
// Generate the SHA256 from an input
const SHA256 = (input) => (
crypto
.createHash('sha256')
.update(input)
.digest()
.toString('hex')
);
View flatten_array.js
const flatten = (array) => {
const flat = [].concat(...array);
return flat.some(Array.isArray) ? flatten(flat) : flat;
}
View keybase.md

Keybase proof

I hereby claim:

  • I am eduardonunesp on github.
  • I am eduardonunesp (https://keybase.io/eduardonunesp) on keybase.
  • I have a public key whose fingerprint is 43B7 1627 A20F 85F2 65DE 5F3C 6CCD 4315 7B42 C783

To claim this, I am signing this object:

View keybase.md

Keybase proof

I hereby claim:

  • I am eduardonunesp on github.
  • I am eduardonunesp (https://keybase.io/eduardonunesp) on keybase.
  • I have a public key whose fingerprint is 86F2 9471 B6F1 5057 E7E1 85A1 36F2 A763 9C0C 2DF3

To claim this, I am signing this object:

View keybase.md

Keybase proof

I hereby claim:

  • I am eduardonunesp on github.
  • I am eduardonunesp (https://keybase.io/eduardonunesp) on keybase.
  • I have a public key whose fingerprint is 7CB8 C87F C76E 6606 6C2C 95B0 AD17 F281 4EE9 E408

To claim this, I am signing this object:

View Destiny.ex
defmodule Pinger.Destiny do
@moduledoc """
Module responsible for the destiny struct,
which is the name and address of the ping target
"""
defstruct name: nil,
address: nil,
active: false
View hourglass_array_sum.js
var arr = [
[-1, 1, -1, 0, 0, 0],
[ 0, -1, 0, 0, 0, 0],
[-1, -1, -1, 0, 0, 0],
[ 0, -9, 2, -4, -4, 0],
[-7, 0, 0, -2, 0, 0],
[ 0, 0, -1, -2, -4, 0]
];
const sum = (a, b) => a + b;
You can’t perform that action at this time.