Skip to content

Instantly share code, notes, and snippets.

View lsmoura's full-sized avatar
😀
Happy!

Sergio Moura lsmoura

😀
Happy!
View GitHub Profile
@lsmoura
lsmoura / world-bosses.json
Last active October 17, 2022 20:05
Guild Wars 2
[
{
"name": "Champion Svanir Shaman Chief",
"level": 10,
"region": "Shiverpeak Mountains",
"zone": "Wayfarer Foothills",
"area": "Frunsenfell Creek",
"times": [
"0:15",
"2:15",
@lsmoura
lsmoura / nfl-2022.json
Created August 31, 2022 20:42
NFL games in json format
[
{ "year": 2022, "time": "2022-9-8 8:20 PM EDT", "week": "REG1", "away": "BUF", "home": "LA" },
{ "year": 2022, "time": "2022-9-11 1:00 PM EDT", "week": "REG1", "away": "NO", "home": "ATL" },
{ "year": 2022, "time": "2022-9-11 1:00 PM EDT", "week": "REG1", "away": "CLE", "home": "CAR" },
{ "year": 2022, "time": "2022-9-11 1:00 PM EDT", "week": "REG1", "away": "SF", "home": "CHI" },
{ "year": 2022, "time": "2022-9-11 1:00 PM EDT", "week": "REG1", "away": "PIT", "home": "CIN" },
{ "year": 2022, "time": "2022-9-11 1:00 PM EDT", "week": "REG1", "away": "PHI", "home": "DET" },
{ "year": 2022, "time": "2022-9-11 1:00 PM EDT", "week": "REG1", "away": "IND", "home": "HOU" },
{ "year": 2022, "time": "2022-9-11 1:00 PM EDT", "week": "REG1", "away": "NE", "home": "MIA" },
{ "year": 2022, "time": "2022-9-11 1:00 PM EDT", "week": "REG1", "away": "BAL", "home": "NYJ" },
@lsmoura
lsmoura / markdown-details-collapsible.md
Created June 15, 2022 14:00 — forked from pierrejoubert73/markdown-details-collapsible.md
How to add a collapsible section in markdown.

A collapsible section containing markdown

Click to expand!

Heading

  1. A numbered
  2. list
    • With some
    • Sub bullets
@lsmoura
lsmoura / init.sh
Created March 4, 2020 15:45
Init expressjs repo
#!/bin/sh
yarn init . -y
mkdir -p src/db/
yarn add express winston express-winston
yarn add --dev eslint babel-eslint prettier nodemon
cat > src/logger.js <<EOF
import winston from 'winston';
@lsmoura
lsmoura / init.sh
Last active February 10, 2020 18:21
Init nextjs repo
#!/bin/sh
git init .
yarn init . -y
echo "node_modules/" > .gitignore
echo "coverage/" >> .gitignore
echo ".next" >> .gitignore
echo ".nyc_output" >> .gitignore
echo "public/" >> .gitignore
@lsmoura
lsmoura / lists-sample-1.js
Created June 24, 2019 19:31
Material UI demo with class components
import React from 'react';
import { makeStyles } from '@material-ui/core/styles';
import List from '@material-ui/core/List';
import ListItem from '@material-ui/core/ListItem';
import ListItemIcon from '@material-ui/core/ListItemIcon';
import ListItemText from '@material-ui/core/ListItemText';
import Divider from '@material-ui/core/Divider';
import InboxIcon from '@material-ui/icons/Inbox';
import DraftsIcon from '@material-ui/icons/Drafts';
@lsmoura
lsmoura / REG-schedule-2018.json
Last active June 20, 2018 18:05
NFL Games Schedule (JSON)
[
{ "date": "2018-09-06", "time": "8:20pm", "away": "Falcons", "home": "Eagles", "tv": "NBC" },
{ "date": "2018-09-09", "time": "1:00pm", "away": "Bills", "home": "Ravens", "tv": "CBS" },
{ "date": "2018-09-09", "time": "1:00pm", "away": "Steelers", "home": "Browns", "tv": "CBS" },
{ "date": "2018-09-09", "time": "1:00pm", "away": "Bengals", "home": "Colts", "tv": "CBS" },
{ "date": "2018-09-09", "time": "1:00pm", "away": "Titans", "home": "Dolphins", "tv": "FOX" },
{ "date": "2018-09-09", "time": "1:00pm", "away": "49ers", "home": "Vikings", "tv": "FOX" },
{ "date": "2018-09-09", "time": "1:00pm", "away": "Texans", "home": "Patriots", "tv": "CBS" },
{ "date": "2018-09-09", "time": "1:00pm", "away": "Buccaneers", "home": "Saints", "tv": "FOX" },
{ "date": "2018-09-09", "time": "1:00pm", "away": "Jaguars", "home": "Giants", "tv": "FOX" },
@lsmoura
lsmoura / add.brainfuck
Created April 11, 2018 14:51
Brainfuck snippets
[
Simple adder. Adds all available inputs and outputs the sum
Use it on https://codepen.io/lsmoura/full/ZxPqyE/
Make sure to set the result type to 'number'
]
> Leave current memory position blank
>,[>,] Read all the inputs until zero
<< Go to the memory space to accumulate the number from the next space
@lsmoura
lsmoura / first-app.sh
Created December 28, 2017 19:36
Quick-n-dirty first react app
brew update
brew upgrade
brew install node npm yarn
cd ~
npm install -g create-react-app
create-react-app first-app
cd first-app
// Returns true if *all* parameters are true
const all = (...args) => (
args.reduce(
(answer, current) => answer && current,
true
)
);
// Returns true if *any* of the parameters is true
const any = (...args) => (