npx react-native init AwesomeTSProject --template react-native-template-typescript
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 { useState } from 'react'; | |
export const useForm = <T extends Object>( initState: T ) => { | |
const [state, setState] = useState( initState ); | |
const onChange = ( value: string, field: keyof T ) => { | |
setState({ | |
...state, | |
[field]: value |
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
#!/bin/bash | |
username=$1; | |
password=$2; | |
#CREATE USER IN REGISTRY | |
docker run --rm -it -v $(pwd):/data httpd htpasswd -Bb /data/registrypasswords $username $password | |
#CREATE USER IN CATALOG | |
docker run --rm -it -v $(pwd):/data httpd htpasswd -b /data/auth $username $password | |
#UPDATE REGISTRY USERS | |
pass=`cat registrypasswords| base64 -w 0` | |
sed "s/^\(\s*htpasswd\s*:\s*\).*/\1 ${pass}/" secret.yaml > deploy.yaml |
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
# Imports | |
import requests | |
import re | |
import pandas as pd | |
import numpy as np | |
# Initialising Variables | |
names = [] |
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
// al usar Type indica que esto es un objeto | |
type Curso { | |
// al usar el signo ! indica que | |
// el valor es obligatrio | |
id: ID! | |
descripcion: String | |
// la utilizar [] indica que es una lista | |
// los que nos indica que puedes tener 1 o mas | |
// profesores | |
profesores: [Profesor] |
Want to inject some flavor into your everyday text chat? You're in luck! Discord uses Markdown, a simple plain text formatting system that'll help you make your sentences stand out. Here's how to do it! Just add a few characters before & after your desired text to change your text! I'll show you some examples...
Italics *italics* or _italics_
Underline italics __*underline italics*__
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
## docker-compose para correr wordpress con una base de datos en mysql | |
## by PeladoNerd https://youtu.be/eoFxMaeB9H4 | |
version: '3.1' | |
services: | |
wordpress: | |
image: wordpress:php7.1-apache | |
ports: |
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
$ git clone git@github.com:xxxxx/xxxx.git my-awesome-proj | |
Cloning into 'my-awesome-proj'... | |
ssh: connect to host github.com port 22: Connection timed out | |
fatal: Could not read from remote repository. | |
$ # This should also timeout | |
$ ssh -T git@github.com | |
ssh: connect to host github.com port 22: Connection timed out | |
$ # but this might work |
NewerOlder