(Serial port or com port? - Serial ports are often refered as COM ports. It is the same to be short. You can read abut it in the Wiki article )
Discover gists
Table of Contents:
This file contains 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 { useSyncExternalStore } from "react"; | |
// For more on the useSyncExternalStore hook, see https://react.dev/reference/react/useSyncExternalStore | |
// The code is almost identical to the source code of zustand, without types and some features stripped out. | |
// Check the links to see the references in the source code. | |
// The links are referencing the v5 of the library. If you plan on reading the source code yourself v5 is the best way to start. | |
// The current v4 version contains lot of deprecated code and extra stuff that makes it hard to reason about if you're new to this. | |
// https://github.com/pmndrs/zustand/blob/fe47d3e6c6671dbfb9856fda52cb5a3a855d97a6/src/vanilla.ts#L57-L94 | |
function createStore(createState) { |
This file contains 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
<div id="app"> | |
<div class="container"> | |
<div class="row"> | |
<div class="col-sm-12"> | |
<h1>Generate a WhatsApp link</h1> | |
<p>This little helper will generate a whatsapp message link to use in your <a href="https://htmlsig.com">htmlsig.com</a> email signature social icons or other social posts. </p> | |
</div> | |
</div> |
Un algoritmo es un proceso para resolver un problema, define las acciones y en qué orden tenes que ejecutarlas.
Pseudocódigo es un lenguaje informal en el que expresamos las instrucciones que definen un Algoritmo. Este utiliza las convenciones estructurales de un lenguaje de programacion real, pero es más fácil leerlo para un humano que para una computadora. No existe una síntaxis estandar para el pseudocodigo, en nuestros ejemplos vamos a usar un subgrupo de instrucciones:
- Variables: vamos a poder definir variables y darle valores. Podemos usar cualquier nombre para las variables y luego referinos a ellas con esos nombres:
This file contains 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
#!/usr/bin/env bash | |
# Retrieve AWS credentials from AWS CloudShell | |
# shellcheck disable=SC2001 | |
HOST=$(echo "$AWS_CONTAINER_CREDENTIALS_FULL_URI" | sed 's|/latest.*||') | |
TOKEN=$(curl -s -X PUT "$HOST"/latest/api/token -H "X-aws-ec2-metadata-token-ttl-seconds: 60") | |
OUTPUT=$(curl -s "$HOST/latest/meta-data/container/security-credentials" -H "X-aws-ec2-metadata-token: $TOKEN") | |
echo "export AWS_ACCESS_KEY_ID=$(echo "$OUTPUT" | jq -r '.AccessKeyId')" | |
echo "export AWS_SECRET_ACCESS_KEY=$(echo "$OUTPUT" | jq -r '.SecretAccessKey')" |
NewerOlder