Configurar Nombre y Correo que salen en los commits
git config --global user.name "Joseph Boscan"
git config --global user.email "joeypc.py@gmail.com"
Marco de colores para los comando
git config --global color.ui true
android.overridePathCheck=true |
Coincidencias Basicas | |
. - Cualquier Caracter, excepto nueva linea | |
\d - Cualquier Digitos (0-9) | |
\D - No es un Digito (0-9) | |
\w - Caracter de Palabra (a-z, A-Z, 0-9, _) | |
\W - No es un Caracter de Palabra. | |
\s - Espacios de cualquier tipo. (espacio, tab, nueva linea) | |
\S - No es un Espacio, Tab o nueva linea. | |
(?i) - Empieza el modo case-insensitive. | |
(?-i) - Desactiva el modo case-insensitive. |
def my_view(request): | |
... | |
... | |
client_ip = request.META['REMOTE_ADDR'] | |
#or client_ip = request.META['X_FORWARDED_FOR'] | |
... |
# Created by https://www.toptal.com/developers/gitignore/api/django | |
# Edit at https://www.toptal.com/developers/gitignore?templates=django | |
### Django ### | |
*.log | |
*.pot | |
*.pyc | |
__pycache__/ | |
local_settings.py |
# In this article you will learn how to fix problem of not loading static files | |
# and media in Django even the DEBUG is FALSE. This is the easiest and safest solution. | |
# Django static and media files not working when debug is false | |
# Problem: | |
DEBUG = False #True | |
ALLOWED_HOSTS = ['*'] #Host name | |
# Problem Fix: |
Folder structure for SASS | |
scss | |
|---- index.scss | |
|---- base | |
| |---- _animations.scss | |
| |---- _base.scss | |
| |---- _typography.scss | |
| |---- _utilities.scss | |
|---- abstracts |
1. You mast have a public key from your mashine stored on github as SSH key here: | |
https://github.com/settings/ssh | |
How to create ssh key on unix/mac os x: | |
- Open terminal, go to the root typing: $ cd ~ (recommended) | |
- Type: ssh-keygen -t rsa -C "your@email.address" | |
- To secure your ssh key ststem will ask you for passphrase (recommended) but you can skip it also | |
- That's you have the ssh key | |
- Check it with: $ ls -al ~/.ssh | |
- Type: $ cd .ssh |
18 Python scripts that help you write code faster | |
Python is a no-BS programming language. Readability and simplicity of design are two of the biggest reasons for its immense popularity. | |
This is why it is worthwhile to remember some common Python tricks to help improve your code design. These will save you the trouble of surfing Stack Overflow every time you need to do something. | |
The following tricks will prove handy in your day-to-day coding exercises. | |
1. Finding Unique Elements in a String | |
The following snippet can be used to find all the unique elements in a string. We use the property that all elements in a set are unique. | |
my_string = "aavvccccddddeee" |