Skip to content

Instantly share code, notes, and snippets.

View igidio's full-sized avatar
🎯
Focusing

Salvador Cáceres C. igidio

🎯
Focusing
View GitHub Profile
@Klerith
Klerith / time-since.ts
Created November 9, 2022 19:56
Time Since
export const timeSince = ( date: string ) => {
const baseDate = new Date(date)
const seconds = Math.floor(( new Date().getTime() - baseDate.getTime() ) / 1000);
let interval = seconds / 31536000;
if (interval > 1) {
@Klerith
Klerith / index.ts
Last active June 26, 2024 18:52
Vuex + TypeScript - Store Structure Strongly Typed
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;
@trandaison
trandaison / starUML.md
Last active July 28, 2024 18:21
Get full version of StarUML