Prerequisites:
- Heroku CLI installed on your computer
- A project deployed to Heroku
import { useCallback, useMemo, useState } from 'react'; | |
export interface useLocalStorageProps<T> { | |
id: string; | |
defaultValue: T; | |
} | |
export interface useLocalStorageReturn<T> { | |
setValue: (value: T) => void; | |
value: T; |
version: '3.7' | |
# make sure everything is running with: | |
# docker ps --format "table {{.ID}}\t{{.Names}}\t{{.Ports}}\t{{.Status}}" | grep "nginx-" | |
#networks | |
networks: | |
#network reverse-proxy | |
reverse-proxy: | |
external: true |
export function magicMethods (clazz) { | |
// A toggle switch for the __isset method | |
// Needed to control "prop in instance" inside of getters | |
let issetEnabled = true | |
const classHandler = Object.create(null) | |
// Trap for class instantiation | |
classHandler.construct = (target, args, receiver) => { | |
// Wrapped class instance |
Prerequisites:
/* | |
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; |
# Let the device unmounted | |
sudo umount /dev/sdb | |
# Optional: change the content to zeros | |
sudo dd if=/dev/zero of=THE_DEVICE bs=512 count=1 | |
# Normally this is not nessecary. Then to create a new layout on the drive: | |
sudo fdisk /dev/THE_DEVICE | |
# Then: |
#!/bin/bash | |
NC='\033[0m' | |
CO='\033[0;31m' | |
function display { | |
echo -e "$CO $1 $NC" | |
} | |
display "RPM FUSION FREE AND NONFREE" |
#!/bin/bash | |
DB_HOST="" | |
DB_DATABASE="" | |
DB_USERNAME="" | |
DB_PASSWORD="" | |
read -r -d '' tableSizesQuery << EOF | |
SELECT | |
table_schema as 'Database', |
According to the MDN reference, it is:
ECMAScript 5's strict mode is a way to opt in to a restricted variant of JavaScript [sic].
It goes on to say:
This is a proposal for a lightning talk at the Reactive 2016 conference. If you like this, star the Gist.
In regular websites, it is common to send multiple events to track user clicks. Single Page Applications change the way you look at metrics. This is a talk about a simple pattern we created at Globo.com to manage a metrics layer for http://globoplay.globo.com. The talk will cover how to track user flow using Google Analytics and other services. We solved the challenge of tying metrics and components, keeping information across pages and having global data. Also some React, React Router and React Side Effects concepts like context, higher order components, history state will be covered.