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
abstract class Mamífero {
abstract amamantar(otro: this);
}
class Perro extends Mamífero {
amamantar(otro: Perro) {
// Implementación para Perros
}
}
@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];
};
import java.util.ArrayList;
interface Servicio {
void asignarValor(int valor);
int getValor();
}
class Servicio1 implements Servicio {
private int valor;
@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))
);
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>'))
swagger: '2.0'
info:
version: 0.1.0
title: license-manager-api
basePath: /api/v0
paths:
'/users/{id}/accessTokens/{fk}':
get:
tags:
- user
### 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:
0x3670ec6BE115639c8E83F584140181b853339c61
/* eslint no-alert: "off"*/
const LON_MIN = 8;
const LON_MAX = 15;
const ERRORS = {
1: `La contrasea no tiene una longitud minima (${LON_MIN})`,
2: `La contraseña no tiene una longitud maxima (${LON_MAX})`,
3: 'La contraseña debe tener al menos un numero',
4: 'La contraseña debe tener al menos una Mayuscula',
@Bigomby
Bigomby / salas-watcher.py
Last active January 9, 2017 14:44
Script para comprobar si una sala se queda libre
#!/usr/bin/python3
import requests
import time
import datetime
import gi
gi.require_version('Notify', '0.7')
from gi.repository import Notify