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.js
Created November 1, 2017 00:45
Testes Nightmare.js webscrapper
const Nightmare = require('nightmare');
const urlLogin = 'http://nomedosite.com.br/login.php'
const urlReset = '';
const buscaH1 = 'ASUSfacil2FormHeaderFontV'
const tdValue = 'SOLICITAÇÃO AGUARDANDO RESERVA'
// usei: document.querySelector('html > body > table > tbody > tr > td > table > tbody > tr > td > table.preto12 > tbody > tr > td > table.preto12 > tbody > tr > td > table > tbody > tr > td.ASUSfacil2FieldCaptionTD > a.ASUSfacil2DataLink')
const nightmare = Nightmare({
show: true,
typeInterval: 100
});
@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 / exercicio_wall.py
Created April 5, 2017 01:58
Python testador de primos...
# Primo:
# Exceto 2, não pode ser par.
# Deve ser divisivel somente por 1 e por ele mesmo.
# Não pode ter outro divisor.
def ehPrimo(n):
divisivel = 0
x = 2
while x <= n:
#print("Dividindo", n, "por", x)
if (n % x == 0):
@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) => {