Skip to content

Instantly share code, notes, and snippets.

View gughog's full-sized avatar
⚛️
Keep on learning!

Gustavo Pereira gughog

⚛️
Keep on learning!
View GitHub Profile
@gughog
gughog / test.json
Created January 12, 2024 10:59
test.json
{
"test": "OK",
"test2": 200
}
@gughog
gughog / README.md
Last active July 30, 2020 17:23
Javascript Utility Functions

Javascript Utility Functions

This is a collection of utility functions (work in progress) that do a range of things. If you have some to contribute, please, contribute! 😄

Current:

  • Finding missing objects/elements between two arrays;
  • Check if a object is completely empty;
  • Sorting an array by Brazillian date;
  • Change an array's item index to another;
@gughog
gughog / script.js
Created November 5, 2019 12:52
Executando comandos bash (Linux) com Node.js
const { exec } = require('child_process'); // Responsavel por executar os comandos
const fs = require('fs');
const cm = { update: 'sudo apt update -y', upgrade: 'sudo apt upgrade -y' };
// Criando um timestamp:
const dd = new Date();
const timestamp = dd.toLocaleString('pt-BR', {hour12: false}).replace(' ', '_');
// Função para escrever num arquivo:
const writeToLog = (filename, content) => {
fs.writeFile(filename, content, (err) => {
if (err) console.log(err)
@gughog
gughog / fcc-project-list.md
Last active July 13, 2019 13:58 — forked from mikesprague/fcc-project-list.md
Free Code Camp - Projects (Updated)

My Free Code Camp Projects

Collection of projects I'm doing while working through the Free Code Camp full stack web developer certifications.

Front End Development Certification

Basic Front End Development Projects