Moved to https://gist.github.com/magmax/ee53b853f6e55d8278af85fd1c751188
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
--- | |
env: | |
contexts: | |
- name: "Local" | |
urls: | |
- "http://localhost:8001" | |
includePaths: | |
- "robots.txt" | |
parameters: | |
failOnError: true |
- Ensure
config.hcl
file is inconfig
directory - run
docker compose up -d
- run
docker compose exec vault chown -R vault:vault /vault
- run
docker compose exec vault apk add curl
- run
docker compose exec vault curl --request POST --data '{"secret_shares": 1, "secret_threshold": 1}' http://127.0.0.1:8200/v1/sys/init
- Save the output from the previous command, what should look like:
{
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 | |
if [ ! -f "README.md" ]; then | |
( | |
echo "# FIXME" | |
echo | |
echo "Please, fill this file in" | |
) > README.md | |
fi |
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
class blog(models.Model): | |
title = models.CharField(max_length=50) | |
body = models.TextField() | |
creation = models.DateField() |
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
DATABASES = { | |
'default': { | |
'ENGINE': 'django.db.backends.sqlite3', # Add 'postgresql_psycopg2', 'postgresql', 'mysql', 'sqlite3' or 'oracle'. | |
'NAME': 'database.db', # Or path to database file if using sqlite3. | |
'USER': '', # Not used with sqlite3. | |
'PASSWORD': '', # Not used with sqlite3. | |
'HOST': '', # Set to empty string for localhost. Not used with sqlite3. | |
'PORT': '', # Set to empty string for default. Not used with sqlite3. | |
} | |
} |
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
$ python manage.py syncdb | |
Creating tables ... | |
Creating table auth_permission | |
Creating table auth_group_permissions | |
Creating table auth_group | |
Creating table auth_user_user_permissions | |
Creating table auth_user_groups | |
Creating table auth_user | |
Creating table auth_message | |
Creating table django_content_type |
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
$ django-admin startproject myblog | |
$ cd myblog | |
$ python manage.py startapp blog | |
$ tree | |
. | |
|-- blog | |
| |-- __init__.py | |
| |-- models.py | |
| |-- tests.py | |
| `-- views.py |
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
public enum Enumerado { | |
item1(0) { | |
@Override | |
public void realizarTarea() { | |
// Aquí va el código | |
} | |
; | |
}, | |
item2(1) { | |
@Override |
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
public enum Enumerado implements Serializable () { | |
item1(0), | |
item2(1), | |
item3(200), | |
; | |
private int value; | |
EnumeradoBasico(int v) { | |
this.value = v; | |
} | |
} |
NewerOlder