This file contains 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
from jose import jwt | |
from jose.jwt import JWTClaimsError, JWTError, ExpiredSignatureError | |
from datetime import datetime, timedelta | |
import time | |
key = 'secret#%$sdfasdkflj@#%RFsaior82340-fweASDFSD928354940k' | |
expdelta = timedelta(seconds=10) | |
now = datetime.utcnow() | |
exp = now + expdelta |
This file contains 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
(use-package js2-mode | |
:ensure t | |
:mode "\\.js\\'" | |
:config | |
(setq js2-basic-offset 2) | |
(setq-default js2-mode-show-parse-errors nil | |
js2-mode-show-strict-warnings nil | |
js2-idle-timer-delay 0.4) | |
(with-eval-after-load 'dumb-jump | |
(define-key js2-mode-map (kbd "M-.") 'dumb-jump-go) |
This file contains 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
(defhydra js2-refactor-hydra (:color blue :hint nil) | |
" | |
^Functions^ ^Variables^ ^Buffer^ ^sexp^ ^Debugging^ | |
------------------------------------------------------------------------------------------------------------------------------ | |
[_lp_] Localize Parameter [_ev_] Extract variable [_wi_] Wrap buffer in IIFE [_k_] js2 kill [_lt_] log this | |
[_ef_] Extract function [_iv_] Inline variable [_ig_] Inject global in IIFE [_ss_] split string [_dt_] debug this | |
[_ip_] Introduce parameter [_rv_] Rename variable [_ee_] Expand node at point [_sl_] forward slurp | |
[_em_] Extract method [_vt_] Var to this [_cc_] Contract node at point [_ba_] forward barf | |
[_ao_] Arguments to object [_sv_] Split var decl. [_uw_] unwrap | |
[_tf_] Toggle fun exp and decl [_ag_] Add var to globals |
This file contains 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 os | |
whitelist = ('a', 'b', 'c.ext', '.gitignore') | |
curpath = os.getcwd() | |
for file in os.listdir(curpath): | |
if file not in whitelist: | |
os.remove(os.path.join(curpath, file)) |
This file contains 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
// En http://localhost:8000/sculpt.html | |
app._stateManager.reset() | |
// Pintar lo que sea | |
var w = app._stateManager.getUndoAndRedoStates() | |
// Deshacer todos los cambios | |
app._stateManager._redos.length = 0; app._stateManager._curUndoIndex = -1; app._stateManager._undos.length = 0; | |
app._stateManager.restoreFromDict(w) |
This file contains 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
;; navigating hydra | |
(defhydra hydra-text (:columns 3) | |
"Movement and text manipulation hydra" | |
("i" previous-line "up") | |
("k" next-line "down") | |
("j" backward-char "back") | |
("l" forward-char "forward") | |
("dd" kill-whole-line "kill the whole line") | |
("de" kill-line "kill until the end of the line") | |
("da" my/kill-to-line-beg "kill until beginning of line") |
This file contains 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
#include <stdlib.h> | |
#include <stdio.h> | |
#include <math.h> | |
#define ERROR_ACEPTABLE (0.00001) | |
double segundointegrando(double x){ | |
return (1+(x*x))*log((x*x))*log((x*x))*2*sqrt((x*x))/((1-(x*x)*(x*x)*(x*x))); | |
} |
This file contains 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
CREATE TABLE `alertas_alarma` ( | |
`id` int(11) NOT NULL AUTO_INCREMENT, | |
`formula` longtext NOT NULL, | |
`email` varchar(100) NOT NULL, | |
`dispositivo_id` int(11) NOT NULL, | |
PRIMARY KEY (`id`), | |
KEY `a_dispositivo_id_46651386577e44c9_fk_dispositivos_dispositivo_id` (`dispositivo_id`), | |
CONSTRAINT `a_dispositivo_id_46651386577e44c9_fk_dispositivos_dispositivo_id` FOREIGN KEY (`dispositivo_id`) REFERENCES `dispositivos_dispositivo` (`id`) | |
) ENGINE=InnoDB DEFAULT CHARSET=utf8; |
This file contains 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
from django.db import models | |
class TipoDato(models.Model): | |
magnitud = models.CharField(max_length=100) | |
unidad = models.CharField(max_length=100) | |
class Datos(models.Model): | |
timestamp = models.DateTimeField() | |
valor = models.IntegerField() |
This file contains 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
\documentclass[12pt,letterpaper]{report} | |
\usepackage[spanish]{babel} | |
\usepackage[ansinew]{inputenc} | |
\usepackage[right=2cm,left=3cm,top=2cm,bottom=2cm,headsep=0cm,footskip=0.5cm]{geometry} | |
\usepackage{graphicx} | |
\usepackage{wrapfig} %Inclusión de gráficos al lado de texto | |
\title{\Huge Título \\ Bajada \\ Informe} | |
\author{Nicolás Salas V.} |