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
location /policy/ { | |
alias /var/www/policy/; | |
index tyc.pdf; | |
} |
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
https://www.freecodecamp.org/news/how-to-get-push-notifications-working-with-ionic-4-and-firebase-ad87cc92394e/ |
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
// libreria para disminuir el tamaño y redimensrionar a un width, pero a un heigth automatico para que mantenga el aspect, lo cual no necesitamos, pero es lo que hay, entonces antes que eso, se la redminesiona realmente a WxH que queremos, pero con el metodo canvas, el tamaño se va al pingo. entonces recien ahi usamos la libreria esta para achicar los KB. | |
-- npm install --save image-resize | |
import ResizeImage from 'image-resize'; | |
croppFoto(foto) {// la foto tiene que ser base64: data:image/jpg;base64,.... si o si el data:image..... | |
const img = document.createElement('img'); | |
// When the event "onload" is triggered we can resize the image. | |
img.onload = () => { |
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
// parametros: array de la respuesta a agrupar | |
// groupBy: propiedad por la que se quiere agrupar EJ: id repetidos | |
// newProp: nueva propiedad a generar con la informacion que me genera lineas repetidas | |
// props: array de propiedades a generar en la newProp y finalmente borrarlas | |
//===================================================================================== | |
// EJEMPLO DE USO | |
// listar() { | |
// return this.http.get<any>(`${urlServidor}/`).toPromise() | |
// .then(res => { | |
// return this.agruparSegun(res.respuesta, 'idEvento', 'precios', ['importe', 'tipo', 'idPrecio', 'precioEstado']) |
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
dpkg-reconfigure tzdata |
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 * as moment from 'moment'; | |
moment.locale('es'); | |
const fechaAlta = moment(fecha).utc().format('DD/MM/YY HH:mm:ss') |
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
// VERSION LIGTH VANILLA JAVASCRIPT FUENTE: https://www.npmjs.com/package/hotkeys-js | |
// teclas posibles Supported Keys | |
//HotKeys understands the following modifiers: ⇧, shift, option, ⌥, alt, ctrl, control, command, and ⌘. | |
//The following special keys can be used for shortcuts: backspace, tab, clear, enter, return, esc, escape, space, up, down, left, right, home, end, pageup, pagedown, del, delete and f1 through f19. | |
<script src="https://unpkg.com/hotkeys-js/dist/hotkeys.min.js"></script> | |
<script type="text/javascript"> | |
hotkeys('ctrl+a,ctrl+b,r,f', function(event,handler) { | |
switch(handler.key){ | |
case "ctrl+a":alert('you pressed ctrl+a!');break; |
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
// boton ejecuta impruimir | |
<button nz-button nzGhost (click)="printer()"> | |
<i nz-icon type="printer" theme="outline"></i>Imprimir | |
</button> | |
//DIV a imprimir | |
<div style="visibility: hidden;" id="print" class="print"> | |
<div nz-col style="text-align: center;"> | |
<h2>Comprobante número: {{respuesta?.numeroComprobante}}</h2> | |
<h3>Informacion del alumno:</h3> |
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
// esto sirve para parsear una fecha de javascript al formato de MYSQL contemplando el UTC -3 | |
import * as moment from 'moment'; | |
moment.locale('es'); | |
funcion(fecha){ | |
// | |
let aux = moment(fecha).format('YYYY-MM-DD HH:mm:ss') | |
// ahora AUX tiene el formato de fecha año-mes-dia hora:min:segundos reales, sin necesidad de andar restando o sumando | |
} |
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
//HTML | |
<div> | |
<nz-upload nzType="drag" [nzBeforeUpload]="beforeUpload" [nzLimit]="1" nzAccept="image/*" nzFIleType="image/*" [nzData]="img" | |
[nzShowUploadList]="false" [hidden]="disableUpload"> | |
<h2>Subir Flyer</h2> | |
<p class="ant-upload-drag-icon" *ngIf="!disableUpload"> | |
<i nz-icon type="upload" theme="outline"></i> | |
</p> | |
<p class="ant-upload-text" *ngIf="!disableUpload">Click o arrastre la foto a esta zona para subir</p> | |
</nz-upload> |
NewerOlder