Skip to content

Instantly share code, notes, and snippets.

View gsoldateli's full-sized avatar

Guilherme Soldateli gsoldateli

  • Freelancer
  • Lajeado/RS - Brazil
View GitHub Profile
@gsoldateli
gsoldateli / detalhe-pedido.json
Last active April 30, 2020 09:32
Formato lista detalhes do pedido
{
"number": "Id do pedido",
"details": {
"date": "data que o pedido foi feito formato: 23/02/2020",
"deliveryStatus": "Aceito|Pendente| tem que ver opções desse campo"
},
"shippingAddress": {
"identifier": "Minha Casa X",
"street": "Rua do labirinto",
"number": "215",
/9j/4AAQSkZJRgABAQAAAQABAAD/2wBDAAEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEB AQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQH/2wBDAQEBAQEBAQEBAQEBAQEBAQEBAQEB AQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQH/wAARCAHgAoADASIA AhEBAxEB/8QAHwAAAQUBAQEBAQEAAAAAAAAAAAECAwQFBgcICQoL/8QAtRAAAgEDAwIEAwUFBAQA AAF9AQIDAAQRBRIhMUEGE1FhByJxFDKBkaEII0KxwRVS0fAkM2JyggkKFhcYGRolJicoKSo0NTY3 ODk6Q0RFRkdISUpTVFVWV1hZWmNkZWZnaGlqc3R1dnd4eXqDhIWGh4iJipKTlJWWl5iZmqKjpKWm p6ipqrKztLW2t7i5usLDxMXGx8jJytLT1NXW19jZ2uHi4+Tl5ufo6erx8vP09fb3+Pn6/8QAHwEA AwEBAQEBAQEBAQAAAAAAAAECAwQFBgcICQoL/8QAtREAAgECBAQDBAcFBAQAAQJ3AAECAxEEBSEx BhJBUQdhcRMiMoEIFEKRobHBCSMzUvAVYnLRChYkNOEl8RcYGRomJygpKjU2Nzg5OkNERUZHSElK U1RVVldYWVpjZGVmZ2hpanN0dXZ3eHl6goOEhYaHiImKkpOUlZaXmJmaoqOkpaanqKmqsrO0tba3 uLm6wsPExcbHyMnK0tPU1dbX2Nna4uPk5ebn6Onq8vP09fb3+Pn6/9oADAMBAAIRAxEAPwD+H+ii igAooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKK ACiiigAooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigAooooA KKKKACiiigAooooAKKKKACi
@gsoldateli
gsoldateli / toggler.js
Last active February 25, 2018 11:47
toggler.js
console.log('Toggler loaded from GitHub!');
toggler = function(selector) {
return (function() {
var toggles = document.querySelectorAll(selector);
var _toggleContent = function(toggleFunction) {
return function() {
if(toggleFunction) {
return (toggleFunction.bind(this))();
}
@gsoldateli
gsoldateli / meter-progress.md
Created November 9, 2017 12:50
Article describing how meter and progress html elements works.

Describe the function of the meter and progress tags and give an example usage of each of these tags.

Displaying Number and Numbers Ranges in HTML

Category: Mastering HTML

meter and progress elements are useful to express visually the current state of a numeric range. Eg: Loading bars, heat control and any sort of gauges.

progress

@gsoldateli
gsoldateli / using-float.md
Created October 3, 2017 13:29
An short article on how to deal properly with floats.

Explain the purpose and function of thefloat property in positioning elements. List and explain the different values this property can take. Give an example of how to use this property

The CSS float Property

Category: Positioning Elements

The float property is responsible by placing the element at left or right side of its container enabling texts or any inline element to conform around it.

Flow and float

@gsoldateli
gsoldateli / git-config.md
Created October 3, 2017 13:24
A short introduction on how to use git config command.

Discuss the purpose and importance of the .gitconfig, located in your $HOME directory.

.gitconfig and your development environment.

.gitconfig file in your $HOME directory is where you place all the git configurations for your OS user.

Why should you use .gitconfig?

Using .gitconfig enables you to configure your git to meet your preferences of colors/workflow/personal data.

@gsoldateli
gsoldateli / box-model-calculation.md
Created October 3, 2017 13:23
A brief explanation on how browsers calculates HTML elements sizing.

Explain how the width of an element is calculated, taking into account the element's content, padding, border, margin, etc.

The math behind element width calculations.

The browser ability to calculate HTML element's width is fundamental to placing them at the right place at the right time.

Anatomy of element sizing.

Browsers calculates the size of any element by its box model parameters.

@gsoldateli
gsoldateli / bind-method.md
Created October 3, 2017 13:22
Basic concepts on how to use the bind method.

The JavaScript bind method returns a different function set to a specified context. Explain how this function works and give at least one example of its usage.

Understanding the bind execution context.

When you call the bind method of a function, it creates and return a new version of your function (Known as bound function) with its this context defined to the object you've passed to the first argument of bind.

Example:

var name = "John";

Describe how the JavaScript built-in functions apply and call work. Use examples to demonstrate how each one works.

Setting The Context of a JavaScript Function

Category: Working with The JavaScript this Keyword.

apply and call methods were developed to give you more flexibility in your code avoiding writing duplicated functions. This reason per se is strong enough to read this article or any other on the subject.

Excuse me, can you lend me this function?