This file contains hidden or 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
| # Add these to /etc/hosts | |
| # 127.0.0.1 localhost | |
| # 127.0.0.1 local.host | |
| server { | |
| server_name localhost local.host; | |
| access_log /var/log/nginx/access.log; | |
| error_log /var/log/nginx/error.log; | |
| index index.html; |
This file contains hidden or 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
| alias android='/bin/sh /opt/android-studio/bin/studio.sh' | |
| alias postman='cd /opt/postman/app;./Postman' | |
| alias www='cd /var/www/html && clear && ls' | |
| alias cdpython='cd ~/Documentos/desarrollo/python && clear && ls' | |
| alias cddjango='cd ~/Documentos/desarrollo/python/django && clear && ls' | |
| alias cdandroid='cd ~/Documentos/desarrollo/android && clear && ls' | |
| alias cddocker='cd ~/Documentos/desarrollo/docker && clear && ls' | |
| alias buildpython='make -j2 -s' | |
| alias djangorun='python3 manage.py runserver' | |
| alias djangoshell='python3 manage.py shell' |
This file contains hidden or 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 subprocess | |
| try: | |
| resultado = subprocess.check_output("sudo systemctl status odoo12 | grep 'Active: failed'", shell=True) | |
| if "Active: failed" in resultado: | |
| subprocess.check_output("sudo systemctl stop odoo12", shell=True) | |
| subprocess.check_output("sudo systemctl start odoo12", shell=True) | |
| print("activado 1") | |
| else: | |
| resultado = subprocess.check_output("sudo systemctl status odoo12 | grep inactive", shell=True) |
This file contains hidden or 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 re | |
| def anagram(a, b): | |
| regex = f"^(?!.*(.).*\1)[{a}]*$" | |
| if re.search(regex, b, flags=re.IGNORECASE): | |
| return True | |
| return False |
This file contains hidden or 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
| name: Continous Integration | |
| on: | |
| pull_request: | |
| branches: | |
| - development | |
| jobs: | |
| build: |
This file contains hidden or 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 sys | |
| import os | |
| # ... | |
| # settings.py extra configurations | |
| # ... | |
| if sys.argv[1] == 'test': | |
| DATABASES = { | |
| 'default': { |
NewerOlder