Skip to content

Instantly share code, notes, and snippets.

@gmocamilotd
gmocamilotd / noname
Created March 12, 2024 20:55
se usa entre otros el comando VISUDO que sirve para editar un arhivo con algunos datos y permisos de usuarios para salir de la edición de ese archivo. considerar: Press insert to go into editing mode. Make your changes - for example: user ALL=(ALL
el procedimiento está en el archivo adjunto y debo decir que sí funciona
@gmocamilotd
gmocamilotd / la solucion
Last active May 24, 2023 21:17
cuando se intent instala una extension, sale el error de download interruoted, o descarga interrumpida
la explcacion está en https://www.pinterest.cl/pin/584201382883825025/
pero basicamente es borrar del archivo HOST de system32
todo lo que referencie a clients.google.com
que apunta al 127.0.0.1
en la imagen se explica todo
si cuando estmoas instalando mailbird
no quiere ingresar al correo de la unsa
1- se debe de poner la direccion completa al crear lanueva identidad: gtorres@unsa...
2- al salir error, elegir identificacion x usuario y contraseña
y colocar en servidor: imap.google,com
3- luego colocar auth2.0
4- asegurar que quede como la imagen de aqui:
@gmocamilotd
gmocamilotd / texto
Last active November 25, 2019 16:15
BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
# which means :
# "BASE_DIR is the parent folder of the parent folder of the file this line is in (settings.py).".
# os.path.dirname() gives the parent folder path, and os.path.abspath()
# the absolute path (you need it to give os.path.dirname() enough informations to get the parent dirnames).
#exportar los settings.
I'm sorry for your inconvenience.
The only way to reset it is to clear registry -
please run regedit and delete following keys -
HKEY_CURRENT_USER\Software\Ordinarysoft\Start Menu X\RunLatest
HKEY_CURRENT_USER\Software\Ordinarysoft\Start Menu X\RunPaths
LUEGO CERRARLO Y VOVLERLO A ABRIR
Also you may switch to Start Menu X style that give you direct access to whole list so you don't need to use recent list.
## Comparison operations
* {% if %} with {% elif %} {% else %}.-
The {% if %} statement is the primary building block to evaluate conditions. The {% if %} statement is typically used in conjunction with the {% elif %} and {% else %} statements to evaluate more than one condition. An {% if %} statement with an argument variable evaluates to true if a variable exists and is not empty or if the variable holds a True boolean value. Listing 4-14 illustrates a series of {% if %} statement examples.
```
{% if drinks %} {% if drinks %} {% if drinks %}
We have drinks! We have drinks We have drinks
{% endif %} {% else %} {% elif drinks_on_sale %}
No drinks,sorry We have drinks on sale!
Considere
```
# base.html template
{% macro coffeestore(name, id='', address='', city='San Diego', state='CA', email=None) -%}
<a id="{{id}}"></a>
<h4>{{name}}</h4>
<p>{{address}} {{city}},{{state}}</p>
{% if email %}<p><a href='mailto:{{email}}'>{{email}}</a></p>{% endif %}
{%- endmacro %}
```
# antiguo
from django.conf.urls import url
url(r'^login/$', views.user_login, name='login'),
url(r'^detail/(?P<id>\d+)/(?P<slug>[-\w]+)/$',views.image_detail, name='detail'),
url(r'^users/(?P<username>[-\w]+)/$', views.user_detail, name='user_detail'),
# nuevo
from django.urls import path
path('login/', views.user_login, name='login')
@gmocamilotd
gmocamilotd / mysql
Last active September 20, 2019 13:39
sistema de victor
set @fechainicio = '2019-07-01';
set @fechafin = '2019-08-31';
select zca.grupo, zca.categoria, p.apellidos, p.nombres, d.*
from personal p
inner join (
select
a.IdPersonal,
year(a.fecha) as anyo,
month(a.fecha) as nromes, a.orden,
max( case when DAY(a.fecha) = 1 then a.Hora else '' end ) as d01,