Comando con Ruby instalado
ruby -rsecurerandom -e 'puts SecureRandom.hex(20)'
Ejemplo: No usar en producción
4510c8cf2fe423f8be5afccbdd30c678677e172b
| <!-- Fuente: https://tailwindcomponents.com/component/chat-layout --> | |
| <template> | |
| <div class="bg-gray-100 h-screen flex flex-col max-w-lg mx-auto"> | |
| <div class="bg-blue-500 p-4 text-white flex justify-between items-center"> | |
| <span>Mi esposa</span> | |
| </div> | |
| <div class="flex-1 overflow-y-auto p-4"> | |
| <div class="flex flex-col space-y-2"> | |
| <!-- Messages go here --> |
Comando con Ruby instalado
ruby -rsecurerandom -e 'puts SecureRandom.hex(20)'
Ejemplo: No usar en producción
4510c8cf2fe423f8be5afccbdd30c678677e172b
| export const regularExps = { | |
| email: /^[a-zA-Z0-9._-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,6}$/, | |
| } |
| openssl req -x509 -sha256 -nodes -days 365 -newkey rsa:2048 -keyout server.key -out server.crt | |
| export const timeSince = ( date: string ) => { | |
| const baseDate = new Date(date) | |
| const seconds = Math.floor(( new Date().getTime() - baseDate.getTime() ) / 1000); | |
| let interval = seconds / 31536000; |
| import { createStore } from 'vuex'; | |
| // My custom modules | |
| import exampleModule from './module-template'; | |
| import { ExampleStateInterface } from './module-template/state'; | |
| export interface StateInterface { | |
| // Define your own store structure, using submodules if needed | |
| // example: ExampleStateInterface; |
| /* | |
| AWS SDK for Node.js provides the s3.listObjects API which | |
| lists the objects from a bucket. However, if you have a lot | |
| of objects in your bucket then the response of this API is | |
| truncated. So, the entire contents of a bucket cannot be | |
| fetched in a single API call and you need to call the API | |
| multiple times, each time passing a `marker` parameter which | |
| is the `Key` of the last element of the previous response. | |
| This gist is demonstrating the same. This script uses async/await | |
| feature of the Node.js so make sure you have the appropirate |