Skip to content

Instantly share code, notes, and snippets.

View aybruhm's full-sized avatar
🚂
Continuous Improvement (改善)

Abram aybruhm

🚂
Continuous Improvement (改善)
View GitHub Profile
@Yiinka
Yiinka / my_text-based_adventure_game.py
Created February 10, 2023 00:32
Well, here's a text-based game I tried. Still a work in progress as I have only just begun.
game_name = "The Home"
question = " "
game_is_active = True
choose_an_answer = ["a", "b", "c"]
player_name = " "
sub_answer = ["a", "b", "c"]
choose_a_method = ["The Home Shall Grant Your Wish!"]
while game_is_active:
print("Welcome to The Home: A place where dreams come true, or not.\n"
@aybruhm
aybruhm / cheatsheet.py
Created April 14, 2021 14:47 — forked from jacklinke/cheatsheet.py
Django models cheatsheet
import uuid
from django.db import models
# Use the import below instead, if using GeoDjango fields
# from django.contrib.gis.db import models
from django.utils.translation import ugettext_lazy as _
from django.contrib.postgres.fields import (
ArrayField,
CICharField,
CIEmailField,
@ddanier
ddanier / fastapi_globals.py
Last active December 4, 2024 08:16
flask.g for FastAPI.
"""
This allows to use global variables inside the FastAPI application using async mode.
# Usage
Just import `g` and then access (set/get) attributes of it:
```python
from your_project.globals import g
@arielweinberger
arielweinberger / strong-password-regex.md
Last active December 19, 2024 20:52
Strong password Regular Expression - NestJS Course
  • Passwords will contain at least 1 upper case letter
  • Passwords will contain at least 1 lower case letter
  • Passwords will contain at least 1 number or special character
  • There is no length validation (min, max) in this regex!

Regular expression for JavaScript:

/((?=.*\d)|(?=.*\W+))(?![.\n])(?=.*[A-Z])(?=.*[a-z]).*$/