Skip to content

Instantly share code, notes, and snippets.

View Bigomby's full-sized avatar

Diego Fernández Bigomby

  • Morón de la Frontera, Spain
View GitHub Profile
### Keybase proof
I hereby claim:
* I am bigomby on github.
* I am bigomby (https://keybase.io/bigomby) on keybase.
* I have a public key ASDYt3a8ZczX8ezR_W8fAJNg320ryfnwFimqk3xTJkfGOAo
To claim this, I am signing this object:
swagger: '2.0'
info:
version: 0.1.0
title: license-manager-api
basePath: /api/v0
paths:
'/users/{id}/accessTokens/{fk}':
get:
tags:
- user
const Wallet = require('ethereumjs-wallet')
const key = Buffer.from('<tu clave privada>', 'hex')
const wallet = Wallet.fromPrivateKey(key)
console.log(wallet.toV3String('<tu contraseña>'))
@Bigomby
Bigomby / MultiCatch.js
Last active October 30, 2017 11:46
Catch multiple throws using map
await Promise.all(
elements
.map(elem => functionThatThrows(elem))
.map(p => p.catch(e => console.error(e))
);
import java.util.ArrayList;
interface Servicio {
void asignarValor(int valor);
int getValor();
}
class Servicio1 implements Servicio {
private int valor;
@Bigomby
Bigomby / datos.h
Last active January 22, 2018 20:04
ejemplo
// Las estructuras comunes a lectura y escritura se introducen en un fichero
// de cabecera y se importa.
#define MAX_CHARS 30
struct datos {
char usuario[MAX_CHARS];
char password[MAX_CHARS];
};
abstract class Mamífero {
abstract amamantar(otro: this);
}
class Perro extends Mamífero {
amamantar(otro: Perro) {
// Implementación para Perros
}
}
### Keybase proof
I hereby claim:
* I am bigomby on github.
* I am bigomby (https://keybase.io/bigomby) on keybase.
* I have a public key ASBFlH7pkEYz5R5T4n02Um1RhIMlpODw7WhoCmQ-8W6Tnwo
To claim this, I am signing this object:
pragma solidity ^0.4.20;
import "./ERC20Basic.sol";
contract BasicToken is ERC20Basic {
// Evento que se ejecuta cuando se realiza una compra. Se emite en el evento
// la dirección de quien ha comprado tokens y la cantidad.
event Buy(address buyer, uint256 amount);
import { Wallet, Chat, Identity } from './';
import { RequestSigner } from './request-signer';
import { MemorySignalStore } from './signal-account/stores/memory-signal-store';
import { SignalAccount } from './signal-account';
const chatUrl = 'https://chat.development.service.toshi.org';
const identityUrl = 'https://identity.development.service.toshi.org';
function createMessage(destinationRegistrationId: number, destination: string) {
return {