- Go into VSCode
- Install typescript
npm i typescript
for local ORnpm i -g typescript
for global - Run either
node_modules/.bin/tsc --init
for local installation ortsc --init
for global - Open the generated file
tsconfig.json
and pressCTRL+F
- Make sure to tick the regex filter for search on the far right of the search input (third icon)
- Pase that regex
\s* \/\* .* \*\/
- Replace by "nothing"
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 free and unencumbered software released into the public domain. | |
Anyone is free to copy, modify, publish, use, compile, sell, or | |
distribute this software, either in source code form or as a compiled | |
binary, for any purpose, commercial or non-commercial, and by any | |
means. | |
In jurisdictions that recognize copyright laws, the author or authors | |
of this software dedicate any and all copyright interest in the |
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
[alias] | |
ci = commit | |
co = checkout | |
cm = checkout master | |
cb = checkout -b | |
st = status -sb | |
sf = show --name-only | |
lg = log --pretty=format:'%Cred%h%Creset %C(bold)%cr%Creset %Cgreen<%an>%Creset %s' --max-count=30 | |
incoming = !(git fetch --quiet && git log --pretty=format:'%C(yellow)%h %C(white)- %C(red)%an %C(white)- %C(cyan)%d%Creset %s %C(white)- %ar%Creset' ..@{u}) | |
outgoing = !(git fetch --quiet && git log --pretty=format:'%C(yellow)%h %C(white)- %C(red)%an %C(white)- %C(cyan)%d%Creset %s %C(white)- %ar%Creset' @{u}..) |
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
{ | |
"workbench.startupEditor": "newUntitledFile", | |
"editor.fontSize": 15, | |
"editor.lineHeight": 1.8, | |
"javascript.suggest.autoImports": true, | |
"javascript.updateImportsOnFileMove.enabled": "always", | |
"editor.rulers": [ | |
80, | |
120 | |
], |
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 Source Code Form is subject to the terms of the Mozilla Public | |
# License, v. 2.0. If a copy of the MPL was not distributed with this | |
# file, You can obtain one at https://mozilla.org/MPL/2.0/. | |
import tkinter as tk | |
import platform | |
# ************************ | |
# Scrollable Frame Class | |
# ************************ |
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
//ROUTER | |
//Silly small javascript router to help me learn how they worked in a very simple way | |
(function (){ | |
const appDiv = "app"; | |
// Both set of different routes and template generation functions | |
let routes = {}; | |
let templates = {}; |
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
/** | |
* Consume update args object for document and can handle one level nesting. | |
* Returns object for leverage by $set in Mongoose update function. | |
* | |
* @param args | |
* @returns {{}} | |
*/ | |
const objectToDotNotation = (args) => { | |
const setObject = {}; | |
Object.keys(args).forEach((key) => { |
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
generatePagesArray: function(currentPage, collectionLength, rowsPerPage, paginationRange) | |
{ | |
var pages = []; | |
var totalPages = Math.ceil(collectionLength / rowsPerPage); | |
var halfWay = Math.ceil(paginationRange / 2); | |
var position; | |
if (currentPage <= halfWay) { | |
position = 'start'; | |
} else if (totalPages - halfWay < currentPage) { |
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
{ | |
"estadoPorDdd": { | |
"11": "SP", | |
"12": "SP", | |
"13": "SP", | |
"14": "SP", | |
"15": "SP", | |
"16": "SP", | |
"17": "SP", | |
"18": "SP", |
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
Para CPF | |
/^\d{3}\.\d{3}\.\d{3}\-\d{2}$/ | |
Para CNPJ | |
/^\d{2}\.\d{3}\.\d{3}\/\d{4}\-\d{2}$/ | |
Para ambos ao mesmo tempo |
NewerOlder