Skip to content

Instantly share code, notes, and snippets.

View fhdez's full-sized avatar
🎯
Focusing

Fatima Hernández fhdez

🎯
Focusing
  • Puebla, México
View GitHub Profile
@fhdez
fhdez / postgres-cheatsheet.md
Created October 19, 2020 21:22 — forked from Kartones/postgres-cheatsheet.md
PostgreSQL command line cheatsheet

PSQL

Magic words:

psql -U postgres

Some interesting flags (to see all, use -h or --help depending on your psql version):

  • -E: will describe the underlaying queries of the \ commands (cool for learning!)
  • -l: psql will list all databases and then exit (useful if the user you connect with doesn't has a default database, like at AWS RDS)
{
"count": 95,
"next": "?page=2",
"previous": null,
"results": {
"Preescolar": {
"2do": {
"Lenguaje y comunicación": {
"med": [
{
Bitacora
28/11/2019 Se hizo desplieque a producción de CourseWork / Classroom. Al liberarse Google Classroom,
se activaron banderas de upgrade de permisos de usuario automaticamente. Al hacer pruebas con usuario
completamente nuevo dió el error de "Esta app no ha sido verificada". Mientras que usuarios
que ya estaban habilitados, hicieron el proceso sin problemas.
29/11/2019 Se solicito por medio de Bertha Francisco que se revisará el caso de usuarios potencia,
que no podían entrar a la plataforma de redmagisterial, error de verificación por parte
de Google.
function hasElement(item){
return item !== undefined && item !== null && item !== '';
}
function updateAnswers() {
imagen1 = angular.element('#id_imagen1').val();
imagen2 = angular.element('#id_imagen2').val();
imagen3 = angular.element('#id_imagen3').val();
imagen4 = angular.element('#id_imagen4').val();
image_answers = [imagen1, imagen2, imagen3, imagen4];
@fhdez
fhdez / .gitconfig
Created January 17, 2019 17:59 — forked from pksunkara/config
Sample of git config file (Example .gitconfig)
[user]
name = Pavan Kumar Sunkara
email = pavan.sss1991@gmail.com
username = pksunkara
[core]
editor = vim
whitespace = fix,-indent-with-non-tab,trailing-space,cr-at-eol
excludesfile = ~/.gitignore
[sendemail]
smtpencryption = tls
@fhdez
fhdez / importar_aprendizajes_nme.py
Last active September 26, 2018 20:06 — forked from jantonio471/importar_aprendizajes_nme.py
Importar aprendizajes esperados | Nuevo modelo educativo
# -*- coding: utf-8 -*-
from __future__ import unicode_literals
import itertools
import unicodecsv as csv
from optparse import make_option
from django.core.exceptions import ObjectDoesNotExist
from django.core.management.base import BaseCommand
@fhdez
fhdez / aprendizajes_meds.sql
Created September 21, 2018 17:27 — forked from jantonio471/consultas_nme.sql
Reporte de claves para aprendizajes meds nme
SELECT
nuevomodelo_aprendizajeesperadonme."id" AS "aprendizaje_id",
nuevomodelo_aprendizajeesperadonme.nombre AS "aprendizaje_nombre",
nuevomodelo_objetivonme."id" AS "objetivo_id",
nuevomodelo_objetivonme.nombre AS "objetivo_nombre",
nuevomodelo_temanme."id" AS "tema_id",
nuevomodelo_temanme.nombre AS "tema_nombre",
nuevomodelo_asignaturanme."id" AS "asignatura_id",
nuevomodelo_asignaturanme.nombre AS "asignatura_nombre",
acuerdo_grado."id" AS "grado_id",
def grado(self, grado_str, nivel):
"""
Obtiene y retorna el grado, tomando como referencia el nivel y el
grado leído del documento.
"""
grado_str = grado_str.replace("\xba", "")
return Grado.objects.get(
ciclo__nivel=nivel,
texto__istartswith=grado_str
# -*- coding: utf-8 -*-
from __future__ import unicode_literals
import datetime
import re
import unicodecsv as csv
from datetime import date, timedelta
from optparse import make_option
@fhdez
fhdez / nuevoNME.html
Last active September 18, 2018 16:43
{% extends 'website/base.html' %}
{% load staticfiles static %}
{% block page_title %}
{% if object %}Editar{% else %}Enviar{% endif %} Material Educativo Digital
{% endblock %}
{% block content %}
<div