Skip to content

Instantly share code, notes, and snippets.

View hiagop's full-sized avatar

Hiago Prata hiagop

View GitHub Profile
@hiagop
hiagop / errors
Last active February 4, 2020 20:15
TypeScript Errors
/Users/hiago/Workspace/ts-node-boilerplate/node_modules/ts-node/src/index.ts:421
return new TSError(diagnosticText, diagnosticCodes)
^
TSError: ⨯ Unable to compile TypeScript:
src/routes.ts:8:8 - error TS2769: No overload matches this call.
Overload 1 of 2, '(...handlers: RequestHandler<ParamsDictionary, any, any>[]): IRoute', gave the following error.
Argument of type '(req: Request<ParamsDictionary>, res: Response, next: NextFunction) => void' is not assignable to parameter of type 'RequestHandler<ParamsDictionary, any, any>'.
Types of parameters 'req' and 'req' are incompatible.
Property 'user' is missing in type 'Request<ParamsDictionary, any, any>' but required in type 'Request<ParamsDictionary>'.
Overload 2 of 2, '(...handlers: RequestHandlerParams<ParamsDictionary, any, any>[]): IRoute', gave the following error.

Keybase proof

I hereby claim:

  • I am hiagop on github.
  • I am hiagop (https://keybase.io/hiagop) on keybase.
  • I have a public key ASCrwDCFe8kOG8MLqecsVNAEc1FEZeQ2NDZdzM0unUIKkQo

To claim this, I am signing this object:

@hiagop
hiagop / grafos.py
Created May 27, 2018 17:44
A simple graphs object oriented implementation
class Node:
def __init__(self, name=None, value=None):
self.name = name
self.value = value
def __repr__(self):
return "Node (name={0}, value={1})".format(self.name, self.value)
def __str__(self):
version: '3.1'
services:
imap:
image: cyrus
hostname: cyrus
volumes:
- volume1
- volume2
- volume3
@hiagop
hiagop / csv2txt.go
Created June 10, 2017 03:11
Quick way to have a CSV into a more readable format.
package main
import (
"encoding/csv"
"fmt"
"os"
)
func main() {
@hiagop
hiagop / cramer.py
Created February 14, 2016 14:46
Simple Linear Systems solver in Python
#!/usr/bin/python
# -*- coding: utf-8 -*-
import numpy as num
# cont = True
print('***Linear System solver***\n')
print('Insert the coeficient matrix like this:\n \
|a1||b1||c1| \n \
|a2||b2||c2| \n \