Skip to content

Instantly share code, notes, and snippets.

View carlosaore's full-sized avatar
๐Ÿ’ช

Carlos Orellana carlosaore

๐Ÿ’ช
View GitHub Profile
@carlosaore
carlosaore / GIT
Created September 10, 2021 12:13
Best Practices - Git
These are recommendations. They should be followed in the absence of good, justifiable reasons to do things differently.
General
Small and frequent commits, to facilitate the handling of any problems that may arise.
Commits with a significant name about the feature itโ€™s implementing.
Branches with a significant name about the feature that is being worked on.
Pull requests done often, to make sure that everyone in the team is working on the same version. This also means that the work is adequately split into user stories that can be translated into features.
Pull requests have to be reviewed and approved by at least one person before being merged into the main branch.
Branches
const H1 = styled.h1`
margin: none;
position: absolute;
transform: translate(0, -60%);
top: 40%;
margin: 2em;
font-size: 2.8em;
font-family: Arial, Helvetica, sans-serif;
letter-spacing: 2px;
line-height: 1.5em;
@carlosaore
carlosaore / index.js
Created July 7, 2021 07:19 — forked from marcllopis/index.js
Weird JS questions
// 1. falsy values example
// [null, undefined, '', 0, -1].map(function (x) {
// console.log(!!x);
// });
// false, false, false, false, true
// 2. Object compare (memory position)
@carlosaore
carlosaore / gist:eab6ab4d45c1e6229fb1adf554a6c724
Created May 11, 2021 13:26 — forked from rxaviers/gist:7360908
Complete list of github markdown emoji markup

People

:bowtie: :bowtie: ๐Ÿ˜„ :smile: ๐Ÿ˜† :laughing:
๐Ÿ˜Š :blush: ๐Ÿ˜ƒ :smiley: โ˜บ๏ธ :relaxed:
๐Ÿ˜ :smirk: ๐Ÿ˜ :heart_eyes: ๐Ÿ˜˜ :kissing_heart:
๐Ÿ˜š :kissing_closed_eyes: ๐Ÿ˜ณ :flushed: ๐Ÿ˜Œ :relieved:
๐Ÿ˜† :satisfied: ๐Ÿ˜ :grin: ๐Ÿ˜‰ :wink:
๐Ÿ˜œ :stuck_out_tongue_winking_eye: ๐Ÿ˜ :stuck_out_tongue_closed_eyes: ๐Ÿ˜€ :grinning:
๐Ÿ˜— :kissing: ๐Ÿ˜™ :kissing_smiling_eyes: ๐Ÿ˜› :stuck_out_tongue:

Tricks For Getting Unstuck During a Coding Interview

From Interview Cake

Getting stuck during a coding interview is rough.

If you werenโ€™t in an interview, you might take a break or ask Google for help. But the clock is ticking, and you donโ€™t have Google.

You just have an empty whiteboard, a smelly marker, and an interviewer whoโ€™s looking at you expectantly. And all you can think about is how stuck you are.

Best Practices - Git

These are recommendations. They should be followed in the absence of good, justifiable reasons to do things differently.

General

  • Small and frequent commits, to facilitate the handling of any problems that may arise.
  • Commits with a significant name about the feature itโ€™s implementing.
  • Branches with a significant name about the feature that is being worked on.
  • Pull requests done often, to make sure that everyone in the team is working on the same version. This also means that the work is adequately split into user stories that can be translated into features.
  • Pull requests have to be reviewed and approved by at least one person before being merged into the main branch.

Fetch API cheatsheet

Simple GET request with the Fetch API

fetch('{url}')
    .then(response => console.log(response));

Simple POST request with the Fetch API

JAD-like project planning

After some initial brainstorming, if you are close to a consensus for what you want to do, you can establish the need for it by asking the following questions:

  • What are the expected benefits?
  • What opportunities does it address?
  • What problems would it resolve?
  • What are the risks?

Then, if you are up for it, try to agree on a "Project Scope Statement" by defining these scope deliverables:

  • Project Objectives (if what is on the slides is not enough)
  • Project Constraints
// Use caesar("word", 7) to encode
// Use caesar("dfhu", -7) to decode
// Basically, key to encode and -key to encode
// "I'm well, I'm alive. I'm in a refugee camp near the border. Will send more messages soon"
// "P't dlss, P't hspcl. P't pu h ylmbnll jhtw ulhy aol ivykly. Dpss zluk tvyl tlzzhnlz zvvu"
//
// "Your camp was in the news yesterday. They said you will get some relief packages soon. Stay strong!"
// "Fvby jhtw dhz pu aol uldz flzalykhf. Aolf zhpk fvb dpss nla zvtl ylsplm whjrhnlz zvvu. Zahf zayvun!"
@carlosaore
carlosaore / index.js
Created January 20, 2021 15:32
express 5
const express = require("express");
const movies = require("./movies");
const connection = require("./config");
const port = 3000;
const app = express();
connection.connect(function(err) {
if (err) {
console.error('error connecting: ' + err.stack);