This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* eslint-disable no-underscore-dangle */ | |
// This is a example of my|problem | |
import { SchemaDirectiveVisitor } from 'graphql-tools' | |
import { GraphQLField, defaultFieldResolver, GraphQLResolveInfo } from 'graphql' | |
export interface UserToken { | |
id: number | |
instituicao?: number |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"branch": "master", | |
"plugins": [ | |
[ | |
"@semantic-release/commit-analyzer", | |
{ | |
"releaseRules": [ | |
{ | |
"type": "refactor", | |
"release": "patch" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<# | |
This is a workaround for "node-gyp is unable to find msbuild if VS2019 is installed" | |
https://github.com/nodejs/node-gyp/issues/1663 | |
It create a shim EXE as "MSBuild\15.0\Bin\MSBuild.exe" to target "MSBuild\Current\Bin\MSBuild.exe" | |
By noseratio - MIT license - use at your own risk! | |
It requires admin mode, I use wsudo/wsudox (https://chocolatey.org/packages/wsudo) for that: | |
wsudo powershell -f make-msbuild-shim.ps1 | |
#> | |
#Requires -RunAsAdministrator |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"version": "0.2.0", | |
"configurations": [ | |
{ | |
"type": "node", | |
"request": "launch", | |
"name": "nodemon", | |
// path to nodemon inside your project | |
"runtimeExecutable": "${workspaceFolder}/node_modules/.bin/nodemon", | |
// script to initialize the server |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { useEffect, useState } from 'react'; | |
/** | |
* Exemple of sizes: | |
* mobile: '(min-width: 425px)' | |
* tablet: '(min-width: 768px)' | |
* laptop: '(min-width: 1024px)' | |
* @param {String} size | |
* @returns {boolean} | |
*/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"aac": "audio/aac", | |
"abw": "application/x-abiword", | |
"arc": "application/x-freearc", | |
"avi": "video/x-msvideo", | |
"azw": "application/vnd.amazon.ebook", | |
"bin": "application/octet-stream", | |
"bmp": "image/bmp", | |
"bz": "application/x-bzip", | |
"bz2": "application/x-bzip2", |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
SELECT | |
E'@Column({ name: \'' || column_name || E'\', type: \'' || data_type || E'\'})' | |
FROM | |
INFORMATION_SCHEMA.COLUMNS | |
WHERE | |
TABLE_NAME = 'yourtable' | |
AND TABLE_SCHEMA = 'your schema if necessary'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
interface Example { | |
first_name: string, | |
last_name: string, | |
home_town: string, | |
} | |
type CamelizeString<T extends PropertyKey> = T extends string ? string extends T ? string : | |
T extends `${infer F}_${infer R}` ? `${F}${Capitalize<CamelizeString<R>>}` : T : T; | |
type Camelize<T> = { [K in keyof T as CamelizeString<K>]: T[K] } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
interface Api { | |
post: <R = any, P = any>(params: P) => Promise<R> | |
} | |
/* | |
A api espera user_login, user_password | |
E response user_name, user_age, user_status | |
*/ | |
type ApiResponse = { | |
user_name: string |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Example | |
// https://www.typescriptlang.org/play?#code/MYewdgziA2CmB0w4EMBOAKAlAKG6SALgATCqzIGwBKsAZrGWMLEQLxHpm0BcRYArgFsARg0y8IBVAEswAczYA+IgAMAOgBINAby4BfFXnCSSZCrAAKaZINiVUAaVgBPNhwDWLiVNlzxRSRl5JVVuHU9nA1x8EwIQAGUARQAZNwAeABUiWAAPSjAAEwgiEGEAK1hgYnZkMGdFdAgAR2hvILkAGiIAB2tbewheDP8AbUDfLtrnEYBdGZDtbCJlojhiLgBJQty3AEYllbW+WAB3eJa3ZugD5ZjiWDAfWGL2AHlyyoJ4B6eIdF7UDY7AwIDgViRjMQ0KgrIDBC8iLNcODaCAMHdEREugA3ZDQfiweYgWjZR4yZ6YIiLcHgjEAoH2NykciUWEMhhOZzoCJgmm3SFEMhyHbsMCnIg0OQAURy3X+fWBqC6AHI5MreXyMVwGA9mEyzJQaPRGMxOHQtgVcjgbjSxWcLqLTudoPAyN1oMhTULcl1tSbYNa+ctoWz4fBuvwIAALdC4-EBm3gzbbHIAalTNr0yJWZAI-FQYERdudk1QML6EBm2Cz2Fk9lonpYoeK1JWYCBbV8NrRltQvGVAEF4gBhZVEAA+RGVABEpSPlTboNJBNICLwBCIGNXcAB6HdECJ8IFEWREWjSVAmbogCCr6TgIyEHoV3a8ZtuVvLdu2fuCZA5ZUOm7VBe37IdRyA8ElxXNciF2AAGICaz3A8XCPWwT0LD0rxvO8HzpCsACY3wrD9gNAqdwMAxdl1XXgEMgtsOynP8AKQ6IBSuNxDHBCBYDgKoiETFYACpGL5bhoNXIghxPfIIAAfW6BglOQYUbVoVAQEEISgyIAhkGEOBdJWE4ox1Ey+TAbSWHYbhv1gciGCIYRXAcohuB7LcoNo4hJN87BDEfEwyAgfhoAIXY3DiJJkjSZsGiuLp6XhXYcC1Z5woIQjooSFJ4orRKWmSojr |
OlderNewer