Skip to content

Instantly share code, notes, and snippets.

View CiceroLino's full-sized avatar
⚙️
RTFM and STFW = 42

Cícero Lino CiceroLino

⚙️
RTFM and STFW = 42
View GitHub Profile
@CiceroLino
CiceroLino / readAndWrite.tsx
Created September 1, 2023 15:22 — forked from sethdavis512/readAndWrite.tsx
Node read and write async functions
const read = async (filePath: string) => {
return new Promise((resolve, reject) => {
fs.readFile(filePath, 'utf8', (err: any, data: string) => {
if (err) reject(err)
resolve(data)
})
})
}
const write = (filePath: string, fileName: string, fileExtension: string, content: any) => {
@davialcantaraa
davialcantaraa / settings.json
Last active July 19, 2022 07:16
VSCode Settings
{
"workbench.startupEditor": "none",
"workbench.iconTheme": "material-icon-theme",
// Good for Recording
"editor.quickSuggestions": false,
"editor.mouseWheelZoom": true,
"editor.renderLineHighlight": "gutter",
"explorer.compactFolders": false,
"workbench.colorCustomizations": {
"[Name of the Current Theme you are using]": {
@sethdavis512
sethdavis512 / custom-file-generator-cli-tutorial.md
Last active October 25, 2023 10:51
Custom File Generator CLI Tutorial

As a developer who works on multiple React projects daily, I like having a tool that can help me quickly and efficiently write consistent code. One of the best ways I've found is writing a custom command line tool to rapidly scaffold out my most common code patterns.

My tool of choice is Plop.js. Plop is a powerful "micro-generator framework" built to help maintain patterns as well as speed up your project build time. From the documenation:

If you boil plop down to its core, it is basically glue code between inquirer prompts and handlebar templates.

In this tutorial, we'll build out a simple React component generator for your Typescript projects. By the end, you'll have a fully functioning CLI that is customized to your file generating needs. Let's get started.

Prerequisites

@FernandoLins8
FernandoLins8 / javascript.md
Last active February 18, 2022 12:20
JS Presentation

JavaScript

O que é o JavaScript

Linguagem de programação multiparadigma, interpretada e de alto nível.

Obedece a especificação ECMAScript.

É usada principalmente para criar interatividade para páginas web.

Banco de Dados

Conceitos: dados, tabela e banco

Segundo Navathe: Podemos descrever um banco de dados como uma coleção de dados relacionados.

Sendo "dados" certos fatos conhecidos que podem ser registrados e que possuem um significado implícito.

@FernandoLins8
FernandoLins8 / exemplo.sql
Created October 30, 2020 21:18
Exemplos básicos de SQL
create schema empresa;
use empresa;
show tables;
create table empregado(
Matricula int auto_increment,
Nome varchar(60),
Nasc date,
@FernandoLins8
FernandoLins8 / sql.md
Created October 30, 2020 21:08
Notas do curso de MySQL do Curso em Vídeo

Notas feitas com base no curso de Banco de Dados MySQL do canal Curso em Video.

1 - Criando a Primeira Tabela

Login:

mysql -u root -p

Tipos

  • Numerico
@sethdavis512
sethdavis512 / readAndWrite.tsx
Created September 11, 2020 21:15
Node read and write async functions
const read = async (filePath: string) => {
return new Promise((resolve, reject) => {
fs.readFile(filePath, 'utf8', (err: any, data: string) => {
if (err) reject(err)
resolve(data)
})
})
}
const write = (filePath: string, fileName: string, fileExtension: string, content: any) => {
{
"editor.fontSize": 12,
"editor.tabSize": 4,
"editor.multiCursorModifier": "ctrlCmd",
"editor.snippetSuggestions": "top",
"beautify.language": {
"js": {
"type": [
"javascript",
"typescript",
var path = require('path')
module.exports = {
'config': path.resolve('server', 'config', 'database.json'),
'migrations-path': path.resolve('server', 'migrations'),
'models-path': path.resolve('server', 'models'),
'seeders-path': path.resolve('server', 'seeders'),
}