Skip to content

Instantly share code, notes, and snippets.

Vinícius Krolow krolow

Block or report user

Report or block krolow

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@krolow
krolow / example-react-form-hook.js
Last active Jan 14, 2019
Simple react form using hooks
View example-react-form-hook.js
import React from 'react';
import { useRef } from 'react';
export default function AddMemberPage({ addMember }) {
const formRef = useRef();
async function handleSave(event) {
event.preventDefault();
@krolow
krolow / how-to-start-side-project.md
Created Feb 16, 2018
I like to build side projects, I will describe here how I start those
View how-to-start-side-project.md

Idea

Name / Email

Once you have a name I do use godaddy.com after register I go to cloudflare and create a register for domain, and get the DNS NS from cloudflare to go update it in godaddy.

Once the DNS is updated in godaddy, I like to setup a custom email like: hello@project.com, twitter@project.com etc... To do such a thing, I normally go in gmail and register a new email myproject@gmail.com and so I go to https://improvmx.com/ that supports email forward. I get the two MX DNS and go back to cloudflare to add them. Once the DNS is updated

View working-days-in-this-month.sh
ncal | grep -vE "^S|^ |^$" | sed "s/[[:alpha:]]//g" | fmt -w 1 | sort -n | wc -l
View things_to_consider_if_refactor_users
- api2 token expires after a given period, we should automate the token refresh
@krolow
krolow / colors.txt
Created Sep 30, 2016
Slack atom dark ui sidebar
View colors.txt
#20242A,#272B33,#4182C4,#FFFFFF,#353B45,#FFFFFF,#96C277,#DF6A73
View Readme.md

Minimum Viable Async with Node 6

With the release of Node 6.0.0, the surface of code that needs transpilation to use ES6 features has been reduced very dramatically.

This is what my current workflow looks like to set up a minimalistic and fast microservice using micro and async + await.

The promise

@krolow
krolow / brasileirao-ical.js
Last active Aug 25, 2016
Brasileirao em node.js
View brasileirao-ical.js
var request = require('request');
var Handlebars = require('handlebars');
var crypto = require('crypto');
var CHAMPIONSHIP_URL = 'https://webtask.it.auth0.com/api/run/wt-krolow-gmail_com-0/brasileirao?serie=%serie%';
function fetchChampionship (serie) {
return new Promise(function (resolve, reject) {
View nice-font.css
h1, h2, h3, h4, h5, h6 {
font-family: 'OfficinaSerifStd-Bold', 'Baskerville', 'Cambria', 'Constantia', 'Palatino Linotype', 'Palatino', 'Georgia', 'Times', 'Times New Roman', serif;
font-weight: bold;
color: rgb(51, 51, 51);
line-height: 30px;
}
p {
margin: 15px 0;
font-family: "Helvetica Neue",Helvetica,Arial,sans-serif;
font-size: 14px;
You can’t perform that action at this time.