| Game Type | Main Focus | Player Role | Example |
|---|---|---|---|
| Incremental | Exponential growth through clicks or upgrades | Active player | Cookie Clicker |
| Idle | Passive progress through automation | Observer + optimizer | Idle Miner Tycoon |
| Tycoon | Business growth and strategic management | Decision-maker | RollerCoaster Tycoon |
- Sign up and sign in to Cloudflare https://dash.cloudflare.com/sign-up.
- In your Cloudflare dashboard, select the
Domain Registration > Register Domainstab. - Search for your favorite domain and purchase it. In my case, I purchased the domain https://nivethan.me/ for my portfolio.
- Sign in to Vercel and go to your dashboard, where you can see all your projects in the
Overviewtab. - Click on a project and on the top right, select
Domains. - Type your domain in the text box, e.g.,
nivethan.me, and clickAdd. - Select the recommended option:
Add www.nivethan.me and redirect nivethan.me to it. - Vercel will show an invalid configuration under your domains and display the relevant A record IP under
nivethan.meand a CNAME IP underwww.nivethan.me. These need to be set up on Cloudflare to make it work.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| .data | |
| prompt1: .asciiz "Ingrese el primer número: " | |
| prompt2: .asciiz "Ingrese el segundo número: " | |
| prompt3: .asciiz "Ingrese el tercer número: " | |
| result: .asciiz "El número mayor es: " | |
| .text | |
| main: | |
| # Solicitar al usuario que ingrese el primer número | |
| li $v0, 4 # Cargar el servicio de impresión de cadena |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| .data | |
| prompt1: .asciiz "Ingrese el primer número: " | |
| prompt2: .asciiz "Ingrese el segundo número: " | |
| prompt3: .asciiz "Ingrese el tercer número: " | |
| result: .asciiz "El número menor es: " | |
| .text | |
| main: | |
| # Solicitar al usuario que ingrese el primer número | |
| li $v0, 4 # Cargar el servicio de impresión de cadena |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| .data | |
| prompt: .asciiz "Ingrese un número para generar la serie de Fibonacci: " | |
| result: .asciiz "La serie de Fibonacci es: " | |
| .text | |
| main: | |
| # Solicitar al usuario que ingrese un número | |
| li $v0, 4 # Cargar el servicio de impresión de cadena | |
| la $a0, prompt # Cargar la dirección del mensaje | |
| syscall # Llamar al servicio de impresión |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import { Combobox } from '@headlessui/react'; | |
| interface InputAutocompleteProps<T> { | |
| multiple?: boolean; | |
| labelExtractor: (item: T) => string; | |
| handleChange: (query: string) => void; | |
| } | |
| export function InputAutocomplete<T>({ | |
| multiple, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| function sum(arr) { | |
| return arr.reduce((accumulator, num) => (accumulator + num), 0) | |
| } | |
| function minValueToBalance(arr) { | |
| const middleIndex = Math.ceil(arr.length / 2); | |
| const leftHalf = arr.slice(0, middleIndex); | |
| const rightdHalf = arr.slice(middleIndex, arr.length); | |
| return Math.abs(sum(leftHalf) - sum(rightdHalf)); | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| const generatePasswordHash = async (password) => { | |
| try { | |
| const salt = await bcrypt.genSalt(saltRounds); | |
| const passwordHashed = await bcrypt.hash(password, salt); | |
| return passwordHashed; | |
| } catch (err) { | |
| throw new Error(`The salt or the hash couldn't be generated`) | |
| } | |
| }; |
React Hook for showing custom "Add to homescreen" prompt
Demo:
Twitter
Simple React Hook for showing the user a custom "Add to homescreen" prompt.
const [prompt, promptToInstall] = useAddToHomescreenPrompt();