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
<div (paste)="onPaste($event)"> | |
Este div escucha el Ctrl + V | |
</div> | |
public onPaste($event: ClipboardEvent) { | |
// @ts-ignore | |
const items = ($event.clipboardData || $event.originalEvent.clipboardData).items; | |
let blob = null; | |
for (const item of items) { | |
if (item.type.indexOf('image') === 0) { |
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
<script> | |
(function () { | |
window.SDKlm = { config: 'leifer' }; | |
var s = document.createElement("script"); | |
s.type = "text/javascript"; | |
s.async = true; | |
s.src = "https://saas-sdk.web.app/main.js"; | |
var x = document.getElementsByTagName("script")[0]; | |
x.parentNode.insertBefore(s, x); |
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
(()=>{"use strict";var n,r,e,t,o,a,i,s,l,c,d,p,m,u,f={426:(n,r,e)=>{e.d(r,{Z:()=>s});var t=e(81),o=e.n(t),a=e(645),i=e.n(a)()(o());i.push([n.id,"@import url(https://cdnjs.cloudflare.com/ajax/libs/animate.css/4.1.1/animate.min.css);"]),i.push([n.id,"@import url(https://fonts.googleapis.com/css2?family=Hind+Siliguri:wght@300;400;500&display=swap);"]),i.push([n.id,".lm {\r\n font-family: 'Hind Siliguri', sans-serif;\r\n background-color: #fff;\r\n min-width: 50px;\r\n height: 50px;\r\n display: flex;\r\n justify-content: center;\r\n align-items: center;\r\n flex-direction: column;\r\n align-content: center;\r\n border-radius: 100px;\r\n position: fixed;\r\n bottom: 0;\r\n right: 0;\r\n font-weight: 600;\r\n margin: 15px;\r\n transition: all ease 0.2s;\r\n border: solid 2px #fff;\r\n background-image: url('https://avatars.githubusercontent.com/u/15802366?v=4');\r\n background-position: bottom;\r\n background-size: cover;\r\n background-repeat: no-repeat;\r\n box-shadow: 0 0 20px rgba(0, 0, 0 |
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
cd && echo "GET http://apphotel-1690390007.us-east-2.elb.amazonaws.com" | vegeta attack -duration=30s -rate=20 -output=results-veg-httpbin-get.bin && cat results-veg-httpbin-get.bin | vegeta plot --title="HTTP Bin GET 10 rps for 30 seconds" > http-pagina.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
<IfModule mod_rewrite.c> | |
RewriteEngine On | |
RewriteBase / | |
RewriteRule ^index\.html$ - [L] | |
RewriteCond %{REQUEST_FILENAME} !-f | |
RewriteCond %{REQUEST_FILENAME} !-d | |
RewriteRule . /index.html[L] | |
</IfModule> |
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
const myReducer = createReducer(...); | |
export function reducer(state, action){ | |
return myReducer(state, action) | |
} |
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 { Directive } from '@angular/core'; | |
import { ControlValueAccessor, NgControl } from '@angular/forms'; | |
@Directive({ //TODO: 🤓 Usaremos en un input del formulario reactivo | |
selector: '[appTrimValue]' | |
}) | |
export class TrimValueDirective { | |
constructor(private ngControl: NgControl) { | |
this.trimValueAccess(this.ngControl.valueAccessor) |
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
const express = require('express') | |
const cors = require('cors') | |
const app = express(); | |
app.use(cors({ | |
origin: { | |
cors: ['http://localhost:4200'] | |
} | |
})) |
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
<script type="text/javascript"> | |
(function(){ | |
window.console.error = ($event, more) => { | |
console.log('** Event 🤦♂️***', $event); | |
console.log('** Trace 👉️***', more); | |
const data = JSON.stringify({ | |
text: more.stack | |
}); |
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 'zone.js/dist/zone-node'; | |
import { ngExpressEngine } from '@nguniversal/express-engine'; | |
import * as express from 'express'; | |
import * as compression from 'compression'; | |
import { join } from 'path'; | |
import { AppServerModule } from './src/main.server'; | |
import { APP_BASE_HREF } from '@angular/common'; | |
import { existsSync } from 'fs'; |