Skip to content

Instantly share code, notes, and snippets.

View nullx5's full-sized avatar
:octocat:
๐ŸŽฏ Keep Calm and Code in Python! ๐Ÿ

Blessed nullx5

:octocat:
๐ŸŽฏ Keep Calm and Code in Python! ๐Ÿ
View GitHub Profile

Conexiรณn a bases de datos dockerizadas postgresql y mariadb por consola y DBeaver Universal DataBase

dockerhub/postgres

dockerhub/mariadb

pwd
sudo docker run -d --name mi-postgres -p 5432:5432 -v ~/docker-postgres:/var/lib/postgresql/data -e POSTGRES_PASSWORD=pass123 postgres:16-bookworm
sudo docker ps
sudo ss -tlpn |grep 5432
@nullx5
nullx5 / .bash_aliases
Created July 8, 2019 20:22 — forked from vratiu/.bash_aliases
Git shell coloring
# Customize BASH PS1 prompt to show current GIT repository and branch.
# by Mike Stewart - http://MediaDoneRight.com
# SETUP CONSTANTS
# Bunch-o-predefined colors. Makes reading code easier than escape sequences.
# I don't remember where I found this. o_O
# Reset
Color_Off="\[\033[0m\]" # Text Reset
@bradtraversy
bradtraversy / vscode_shortcuts.md
Last active April 18, 2025 13:45
Helpful shortcuts for VSCode

VSCode Shortcuts

List of helpful shortcuts for faster coding

If you have any other helpful shortcuts, feel free to add in the comments of this gist :)

Official List of all commands

@tesuji
tesuji / bobp-python.md
Created June 20, 2018 17:40 — forked from sloria/bobp-python.md
A "Best of the Best Practices" (BOBP) guide to developing in Python.

The Best of the Best Practices (BOBP) Guide for Python

A "Best of the Best Practices" (BOBP) guide to developing in Python.

In General

Values

  • "Build tools for others that you want to be built for you." - Kenneth Reitz
  • "Simplicity is alway better than functionality." - Pieter Hintjens
@vista-
vista- / .chromatermrc
Last active October 5, 2019 15:18
A fully-loaded configuration for highlighting Cisco keywords for Chromaterm (Linux)
#config regex on
#event {SESSION DISCONNECTED} {#end}
#highlight {{^([^$#(]+)(\$|#|\([^)]+\)#)}} {bold white}
#highlight {{(?:[\W\s]|^)([0-9a-f]{4}\.){2}[0-9a-f]{4}(?=[\W\s]|$)}} {bold light jade}
#highlight {{(?:[\W\s]|^)((::FFFF)?::?(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9]?[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9]?[0-9]))(?=[\W\s]|$)}} {bold cyan}
#highlight {{(?:[\W\s]|^)(\[\d{1,10}:\d{1,10}\](?:(?:[0-9A-Fa-f]{1,4}:){7}[0-9A-Fa-f]{1,4}|(?=(?:[0-9A-Fa-f]{0,4}:){0,7}[0-9A-Fa-f]{0,4}(?![:.\w]))(([0-9A-Fa-f]{1,4}:){1,7}|:)((:[0-9A-Fa-f]{1,4}){1,7}|:)|(?:[0-9A-Fa-f]{1,4}:){7}:|:(:[0-9A-Fa-f]{1,4}){7})(?![:.\w]))(?=[\W\s]|$)}} {bold cyan}
#highlight {{(?:[\W\s]|^)(\[\d{1,3}(\.\d{1,3}){3}:\d{1,10}\](?:(?:[0-9A-Fa-f]{1,4}:){7}[0-9A-Fa-f]{1,4}|(?=(?:[0-9A-Fa-f]{0,4}:){0,7}[0-9A-Fa-f]{0,4}(?![:.\w]))(([0-9A-Fa-f]{1,4}:){1,7}|:)((:[0-9A-Fa-f]{1,4}){1,7}|:)|(?:[0-9A-Fa-f]{1,4}:){7}:|:(:[0-9A-Fa-f]{1,4}){7})(?![:.\w]))(?=[\W\s]|$)}} {bold cyan}
#highlight {{(?:[\W\s]|^)((\d{1,10}:){2}(?:(?:25[0-5]|2[0-4]
@rxaviers
rxaviers / gist:7360908
Last active April 24, 2025 18:48
Complete list of github markdown emoji markup

People

:bowtie: :bowtie: ๐Ÿ˜„ :smile: ๐Ÿ˜† :laughing:
๐Ÿ˜Š :blush: ๐Ÿ˜ƒ :smiley: โ˜บ๏ธ :relaxed:
๐Ÿ˜ :smirk: ๐Ÿ˜ :heart_eyes: ๐Ÿ˜˜ :kissing_heart:
๐Ÿ˜š :kissing_closed_eyes: ๐Ÿ˜ณ :flushed: ๐Ÿ˜Œ :relieved:
๐Ÿ˜† :satisfied: ๐Ÿ˜ :grin: ๐Ÿ˜‰ :wink:
๐Ÿ˜œ :stuck_out_tongue_winking_eye: ๐Ÿ˜ :stuck_out_tongue_closed_eyes: ๐Ÿ˜€ :grinning:
๐Ÿ˜— :kissing: ๐Ÿ˜™ :kissing_smiling_eyes: ๐Ÿ˜› :stuck_out_tongue:
@fqxp
fqxp / fabfile.py
Created May 11, 2013 13:22
Set up Postgres server, user and database with fabric. Put into fabfile.py
def _run_as_pg(command):
return sudo('sudo -u postgres %s' % command)
def pg_user_exists(username):
with settings(hide('running', 'stdout', 'stderr', 'warnings'), warn_only=True):
res = _run_as_pg('''psql -t -A -c "SELECT COUNT(*) FROM pg_user WHERE usename = '%(username)s';"''' % locals())
return (res == "1")
def pg_database_exists(database):
with settings(hide('running', 'stdout', 'stderr', 'warnings'), warn_only=True):
@perrygeo
perrygeo / django_model_graph.sh
Created April 13, 2013 21:44
Generate UML diagram of django app models
apt-get install python-pygraphviz
pip install django-extensions
# add 'django_extensions' to INSTALLED_APPS in settings.py
python manage.py graph_models trees -o test.png