Skip to content

Instantly share code, notes, and snippets.

View GiuseppeMP's full-sized avatar
:shipit:
https://giuseppematheus.com/

Giuseppe Matheus GiuseppeMP

:shipit:
https://giuseppematheus.com/
View GitHub Profile
set nocompatible " be iMproved, required
filetype off " required
" set the runtime path to include Vundle and initialize
set rtp+=~/.vim/bundle/Vundle.vim
call vundle#begin()
" alternatively, pass a path where Vundle should install plugins
"call vundle#begin('~/some/path/here')
" let Vundle manage Vundle, required
import React, { PureComponent } from 'react';
import Radar from '@bit/recharts.recharts.radar';
import RadarChart from '@bit/recharts.recharts.radar-chart';
import PolarGrid from '@bit/recharts.recharts.polar-grid';
import PolarAngleAxis from '@bit/recharts.recharts.polar-angle-axis';
import PolarRadiusAxis from '@bit/recharts.recharts.polar-radius-axis';
const data = [
{
subject: 'Devops', A: 120, B: 110, fullMark: 150,
@GiuseppeMP
GiuseppeMP / semantic-commit-messages.md
Created September 28, 2020 19:00 — forked from joshbuchea/semantic-commit-messages.md
Semantic Commit Messages

Semantic Commit Messages

See how a minor change to your commit message style can make you a better programmer.

Format: <type>(<scope>): <subject>

<scope> is optional

Example

@GiuseppeMP
GiuseppeMP / cachesingeton.cs
Created October 6, 2020 01:08 — forked from srkirkland/cachesingeton.cs
Singleton for creating a cache factory for Azure Caching. Creates the DataCacheFactory only once and stores it in CacheFactory.Instance. Can then get a desired DataCache by calling CacheFactory.Instance.GetCache("CacheName");
public static class CacheFactory
{
/// <summary>
/// This is a thread-safe, lazy singleton. See http://www.yoda.arachsys.com/csharp/singleton.html
/// for more details about its implementation.
/// </summary>
public static DataCacheFactory Instance
{
get { return Nested.CacheFactory; }
}
'use strict';
import { WriteStream, createWriteStream } from "fs";
process.stdin.resume();
process.stdin.setEncoding('utf-8');
let inputString: string = '';
let inputLines: string[] = [];
let currentLine: number = 0;
@GiuseppeMP
GiuseppeMP / Hackerrank
Created May 23, 2021 02:28
Data Structures > Stacks > Poisonous Plants (Javascript)
'use strict';
const fs = require('fs');
process.stdin.resume();
process.stdin.setEncoding('utf-8');
let inputString = '';
let currentLine = 0;
{
"terminal.integrated.fontFamily": "MesloLGS NF",
"editor.codeLensFontFamily": "Fira Code",
"editor.fontFamily": "Cascadia Code Light, Fira Code, Menlo, Monaco, 'Courier New', monospace",
"editor.fontLigatures": true,
"maven.terminal.useJavaHome": true,
"editor.suggestSelection": "first",
"vsintellicode.modify.editor.suggestSelection": "choseToUpdateConfiguration",
"files.exclude": {
"**/.classpath": true,
@GiuseppeMP
GiuseppeMP / gist:25b2a67c246c08e18542d0a8aee88c39
Created June 1, 2021 19:58
vscode settings Beppe 01/06/21
{
"terminal.integrated.fontFamily": "MesloLGS NF",
"editor.codeLensFontFamily": "Fira Code",
"editor.fontFamily": "Cascadia Code Light, Fira Code, Menlo, Monaco, 'Courier New', monospace",
"editor.fontLigatures": true,
"maven.terminal.useJavaHome": true,
"editor.suggestSelection": "first",
"vsintellicode.modify.editor.suggestSelection": "choseToUpdateConfiguration",
"files.exclude": {
"**/.classpath": true,
@GiuseppeMP
GiuseppeMP / jest-eslint.config.js
Created June 17, 2021 22:59 — forked from wldcordeiro/jest-eslint.config.js
Jest Multi Project Example
const { resolve } = require('path')
const root = resolve(__dirname, '..')
module.exports = {
rootDir: root,
displayName: 'eslint',
runner: 'jest-runner-eslint',
testMatch: ['<rootDir>/src/**/*.js', '<rootDir>/config/*.js'],
}
@GiuseppeMP
GiuseppeMP / mock-type-with-jest.ts
Created June 18, 2021 14:25
Como mockar usando jest e type auxiliar
export type MockType<T> = {
[P in keyof T]?: jest.Mock<unknown>;
};
const mockKnexConnection : () => MockType<Knex<any, unknown>>
= jest.fn(() => ({
destroy: jest.fn(() => { console.log }),
raw: jest.fn((query) => {
return new Promise<any>( (res) => {
res(query)