Skip to content

Instantly share code, notes, and snippets.

View fpontef's full-sized avatar
👋
Working from home

Fernando Ponte Filho fpontef

👋
Working from home
  • Brazil - Fortaleza, CE
View GitHub Profile
@fpontef
fpontef / css-media-queries-best-practices.md
Created November 23, 2019 22:03 — forked from basham/css-media-queries-best-practices.md
CSS Media Queries: Best Practices

CSS Media Queries: Best Practices

@fpontef
fpontef / css-units-best-practices.md
Created November 23, 2019 22:03 — forked from basham/css-units-best-practices.md
CSS Units Best Practices

CSS units

Recommendations of unit types per media type:

Media Recommended Occasional use Infrequent use Not recommended
Screen em, rem, % px ch, ex, vw, vh, vmin, vmax cm, mm, in, pt, pc
Print em, rem, % cm, mm, in, pt, pc ch, ex px, vw, vh, vmin, vmax

Relative units

Relative units

@fpontef
fpontef / README.md
Created March 15, 2018 20:17 — forked from hofmannsven/README.md
My simply Git Cheatsheet
@fpontef
fpontef / index.jsx
Created October 9, 2017 21:22 — forked from jbinto/index.jsx
Egghead tutorial - Getting Started with Redux - JSBin implementation
/* global ReactRedux, Redux, ReactDOM */
// "Getting Started with Redux" (by Dan Abramov)
// https://egghead.io/series/getting-started-with-redux
// This file on JSBin (by Jesse Buchanan):
// http://jsbin.com/wuwezo/74/edit?js,console,output
////////////////////////////////////////////////
//
@fpontef
fpontef / gist:778ca0d850d368c7330b9c2990485abc
Created October 14, 2016 20:53 — forked from chad3814/gist:2924672
deleting array items in javascript with forEach() and splice()
// This is from my comment here: http://wolfram.kriesing.de/blog/index.php/2008/javascript-remove-element-from-array/comment-page-2#comment-466561
/*
* How to delete items from an Array in JavaScript, an exhaustive guide
*/
// DON'T use the delete operator, it leaves a hole in the array:
var arr = [4, 5, 6];
delete arr[1]; // arr now: [4, undefined, 6]
<template>
<root-header></root-header>
<!-- BEGIN CONTAINER -->
<div class="page-container">
<root-sidebar></root-sidebar>
<!-- BEGIN CONTENT -->
<div class="page-content-wrapper">
<!-- BEGIN CONTENT BODY -->
<slot></slot>
<!-- END CONTENT BODY -->
@fpontef
fpontef / arch-on-mb.md
Created September 25, 2016 15:33
Installing Arch on a MacBook
@fpontef
fpontef / request.js
Created September 16, 2016 20:33 — forked from anonymous/request.js
const stringfy = (value) => JSON.stringify([value]);
const stringfyAndTransformToObject = (value) => ({ object: stringfy(value) })
const makeRequest = () => {
const context = arguments[0] || this;
const post = (url, data, options) => context.$http(url, stringfyAndTransformToObject(data), options);
return { post };
};
const install = (VueInstance) => {
@fpontef
fpontef / nginxproxy.md
Created June 30, 2016 14:54 — forked from soheilhy/nginxproxy.md
How to proxy web apps using nginx?

Virtual Hosts on nginx (CSC309)

When hosting our web applications, we often have one public IP address (i.e., an IP address visible to the outside world) using which we want to host multiple web apps. For example, one may wants to host three different web apps respectively for example1.com, example2.com, and example1.com/images on the same machine using a single IP address.

How can we do that? Well, the good news is Internet browsers