Skip to content

Instantly share code, notes, and snippets.

View birobirobiro's full-sized avatar
🏠
Working from home

João Inácio Neto birobirobiro

🏠
Working from home
View GitHub Profile
@chornthorn
chornthorn / password-input.tsx
Created December 28, 2023 16:23 — forked from mjbalcueva/password-input.tsx
shadcn ui custom password input
"use client"
import { forwardRef, useState } from "react"
import { EyeIcon, EyeOffIcon } from "lucide-react"
import { Button } from "@/components/ui/button"
import { Input, InputProps } from "@/components/ui/input"
import { cn } from "@/lib/utils"
const PasswordInput = forwardRef<HTMLInputElement, InputProps>(
({ className, ...props }, ref) => {
@mjbalcueva
mjbalcueva / password-input.tsx
Last active November 14, 2024 22:10
shadcn ui custom password input
'use client'
import * as React from 'react'
import { EyeIcon, EyeOffIcon } from 'lucide-react'
import { Button } from '@/components/ui/button'
import { Input, type InputProps } from '@/components/ui/input'
import { cn } from '@/lib/utils'
const PasswordInput = React.forwardRef<HTMLInputElement, InputProps>(({ className, ...props }, ref) => {
@daltonmenezes
daltonmenezes / pixelToRem.ts
Created February 16, 2022 02:38
A pixel to rem utility function
function pixelToRem(...values: number[]) {
return values
.reduce((acc, current) => (acc += current / 16 + `rem `), "")
.trim();
}
pixelToRem(13, 20) // 0.8125rem 1.25rem
@fernospam
fernospam / Amazfit Bip-U.md
Last active June 11, 2024 10:32
How to create watch faces for Amazfit Bip U (also GTR and GTS)

Creación de Esferas para Amazfit Bip U (también GTR y GTS)

A continuación se relata lo mínimo necesario que hay que saber para crear esferas para varios relojes Amazfit. La explicación esta especialmente indicada para el modelo Bip-U, del cual apenas hay nada en internet, pero la mayoría de pasos son aplicables a otros modelos como GTS y GTR en sus distintas variedades, pues se utilizan las mismas herramientas.

Acceso a la app de creación de la esfera

Las esferas de varios modelos de Amazfit utilizan la app para este propósito que se encuentra en la web de Huami (los relojes Xiaomi, Amazfit y Zepp los fabrica Huami).

Primero hay que darse de alta en Huami como developer (descripción en https://amazfitwatchfaces.com/forum/viewtopic.php?t=2090)

@icastilhog
icastilhog / .hyper.js
Created April 27, 2020 15:55
Configurações do Hyper
// Future versions of Hyper may add additional config options,
// which will not automatically be merged into this file.
// See https://hyper.is#cfg for all currently supported options.
module.exports = {
config: {
// choose either `'stable'` for receiving highly polished,
// or `'canary'` for less polished but more frequent updates
updateChannel: 'stable',
@8bitbuddhist
8bitbuddhist / create-android-display.sh
Last active October 6, 2023 14:03
Bash script to use an Android device as a second monitor for Linux. See https://blog.8bitbuddhism.com/2019/12/01/how-to-use-your-android-tablet-as-second-monitor/ for detailed instructions.
#!/bin/bash
# Make sure your Android device is plugged in and accessible over adb.
#### Remember to enable virtual displays in xorg by adding the following to your configuration (e.g. /usr/share/X11/xorg.conf.d/20-virtual.conf)
# Section "Device"
# Identifier "intelgpu0"
# Driver "intel"
# Option "VirtualHeads" "1"
#EndSection
[alias]
ci = commit
co = checkout
cm = checkout master
cb = checkout -b
st = status -sb
sf = show --name-only
lg = log --pretty=format:'%Cred%h%Creset %C(bold)%cr%Creset %Cgreen<%an>%Creset %s' --max-count=30
incoming = !(git fetch --quiet && git log --pretty=format:'%C(yellow)%h %C(white)- %C(red)%an %C(white)- %C(cyan)%d%Creset %s %C(white)- %ar%Creset' ..@{u})
outgoing = !(git fetch --quiet && git log --pretty=format:'%C(yellow)%h %C(white)- %C(red)%an %C(white)- %C(cyan)%d%Creset %s %C(white)- %ar%Creset' @{u}..)

Ambiente Mac

Vamos configurar nosso ambiente de desenvolvimento, instalando ferramentas básicas para iniciarmos no mundo da programação.

Instalar as Ferramentas

Homebrew

Homebrew é um gerenciador de pacotes que nos ajudará a instalar os programas de maneira programática, pelo terminal do Mac.

Ambiente Windows

Vamos configurar nosso ambiente de desenvolvimento, instalando ferramentas básicas para iniciarmos no mundo da programação.

Instalar Chocolatey

Chocolatey é um gerenciador de programas e nos ajudará a instalar os programas de maneira programática, pelo terminal do Windows.

  1. Abra o PowerShell como administrador ( clique com o botão direto do mouse no ícone do PowerShell e procure a opção Abrir como Administrador )
  2. Coloque o código abaixo e dê ENTER
@diego3g
diego3g / NODE.md
Last active November 15, 2024 15:01
VSCode Settings (Updated)

⚠️ Note!

With VSCode version 1.94, the APC extension broke and there is no fix yet.

So, for those having issues with APC after the VSCode update, I recommend downloading the previous version of VSCode for now (https://code.visualstudio.com/updates/v1_93) and setting updates to manual by adding this to the editor's configuration:

"update.mode": "manual",