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
@kentcdodds
kentcdodds / object.entries.js
Last active November 7, 2020 23:36
Example of using Object.entries
// http://www.dogbreedchart.com
const dogShedding = {
foxhound: 3,
'basset hound': 2,
beagle: 3,
'bernese mountain dog': 1,
poodle: 5,
}
// 🔥🔥
@callmeloureiro
callmeloureiro / comoSerChatoNoWhatsapp.js
Last active January 15, 2024 20:44
Como fazer alguém te responder no whatsapp
/*
Hoje iremos MUDAR a vida da pessoa que não te responde no whatsappp...
Que tal enviar mensagens pra ela até obter uma resposta?!
Sensacional não acha?! Mas, somos devs, correto?! Então vamos automatizar esse paranauê!
Para utilizar:
- Abra o web.whatsapp.com;
- Selecione a conversa que você quer;
- Abra o console e cole o código que está no gist;
@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):
@vinicius73
vinicius73 / atom.md
Last active July 13, 2020 21:44
My default Atom packages and theme
@basham
basham / css-media-queries-best-practices.md
Last active May 21, 2024 16:49
CSS Media Queries: Best Practices

CSS Media Queries: Best Practices

@gorangajic
gorangajic / es6-spread-immutable-cheatsheet.md
Last active April 11, 2024 08:32
es6 spread immutable cheatsheet

update object

var state = {
    id: 1,
    points: 100,
    name: "Goran"
};

var newState = {
@ericelliott
ericelliott / defaults-overrides.md
Last active May 7, 2023 13:52
ES6 defaults / overrides pattern

ES6 Defaults / Overrides Pattern

Combine default parameters and destructuring for a compact version of the defaults / overrides pattern.

function foo ({
    bar = 'no',
    baz = 'works!'
  } = {}) {
@foosel
foosel / README.md
Last active January 12, 2023 16:25
Getting the fingerprint reader of a Thinkpad x240 to work under Ubuntu 14.04

lsusb lists the fingerprint reader in the x240 as follows:

Bus 002 Device 003: ID 138a:0017 Validity Sensors, Inc.

There exists experimental driver support for this in a fork of libfprint for vfs5011 sensors, however you'll need to compile the driver yourself. To get the fingerprint sensor to work for lightdm login, su etc, follow these steps.

  1. Install fingerprint-gui:

    sudo add-apt-repository ppa:fingerprint/fingerprint-gui
    
@basham
basham / css-units-best-practices.md
Last active July 14, 2024 16:03
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

@soheilhy
soheilhy / nginxproxy.md
Last active May 16, 2024 08:59
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