Skip to content

Instantly share code, notes, and snippets.

View nurdism's full-sized avatar
🥂
Lets make cool stuff!

Nurdism nurdism

🥂
Lets make cool stuff!
View GitHub Profile
@nurdism
nurdism / generate.ts
Last active July 7, 2024 21:16
Emoji CSS tile sheet and keywords generator
import * as fs from 'fs'
import * as path from 'path'
import sharp from 'sharp'
import { fileURLToPath } from 'url'
import emoji from 'emoji-datasource-twitter/emoji.json'
import converter from 'discord-emoji-converter'
import emojilib from 'emojilib'
export interface DataGroupList {
@nurdism
nurdism / vue-markdown-discord.ts
Last active July 7, 2024 20:17
This is a faithful recreation of discord flavored markdown as of 2024.
/**
* Discord Markdown
* ===============
*
* This is a faithful recreation of discord flavored markdown as of 2024.
*
* Required: [vue-markdown.ts](https://gist.github.com/nurdism/f2e8a8d21aa11969b595f6b7698d7d62)
* Made by [nurdism](https://github.com/nurdism)
*/
/**
* Simple-Markdown
* ===============
*
* Simple-Markdown's primary goal is to be easy to adapt. It aims
* to be compliant with John Gruber's [Markdown Syntax page][1],
* but compatiblity with other markdown implementations' edge-cases
* will be sacrificed where it conflicts with simplicity or
* extensibility.
*
@nurdism
nurdism / app.ts
Created February 5, 2023 08:34
example of how a reactive might be used for the page obejct
import type { UnwrapNestedRefs } from 'vue'
import { createHeadManager, Page, PageProps, router } from '@inertiajs/core'
import { DefineComponent, defineComponent, h, markRaw, Plugin, PropType, ref, reactive, shallowRef } from 'vue'
import remember from './remember'
import { VuePageHandlerArgs } from './types'
import useForm from './useForm'
export interface InertiaAppProps {
initialPage: Page
initialComponent?: object
@nurdism
nurdism / ColorPicker.vue
Last active July 7, 2024 20:17
Very simple color picker for Vue 3
<script setup lang="ts">
/**
* ColorPicker.vue
* Very simple color picker for vue 3
* Only has 1 dependency tinycolor2 can be replaced with dedicated functions
*
* Preview: https://i.imgur.com/RjFUHsI.png
*/
import tinycolor from 'tinycolor2'
@nurdism
nurdism / AppLink.vue
Created December 27, 2022 20:40
Navigation guards for Inertia JS + vue 3 + typescript